vidioc-g-priority.xml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <refentry id="vidioc-g-priority">
  2. <refmeta>
  3. <refentrytitle>ioctl VIDIOC_G_PRIORITY, VIDIOC_S_PRIORITY</refentrytitle>
  4. &manvol;
  5. </refmeta>
  6. <refnamediv>
  7. <refname>VIDIOC_G_PRIORITY</refname>
  8. <refname>VIDIOC_S_PRIORITY</refname>
  9. <refpurpose>Query or request the access priority associated with a
  10. file descriptor</refpurpose>
  11. </refnamediv>
  12. <refsynopsisdiv>
  13. <funcsynopsis>
  14. <funcprototype>
  15. <funcdef>int <function>ioctl</function></funcdef>
  16. <paramdef>int <parameter>fd</parameter></paramdef>
  17. <paramdef>int <parameter>request</parameter></paramdef>
  18. <paramdef>enum v4l2_priority *<parameter>argp</parameter></paramdef>
  19. </funcprototype>
  20. </funcsynopsis>
  21. <funcsynopsis>
  22. <funcprototype>
  23. <funcdef>int <function>ioctl</function></funcdef>
  24. <paramdef>int <parameter>fd</parameter></paramdef>
  25. <paramdef>int <parameter>request</parameter></paramdef>
  26. <paramdef>const enum v4l2_priority *<parameter>argp</parameter></paramdef>
  27. </funcprototype>
  28. </funcsynopsis>
  29. </refsynopsisdiv>
  30. <refsect1>
  31. <title>Arguments</title>
  32. <variablelist>
  33. <varlistentry>
  34. <term><parameter>fd</parameter></term>
  35. <listitem>
  36. <para>&fd;</para>
  37. </listitem>
  38. </varlistentry>
  39. <varlistentry>
  40. <term><parameter>request</parameter></term>
  41. <listitem>
  42. <para>VIDIOC_G_PRIORITY, VIDIOC_S_PRIORITY</para>
  43. </listitem>
  44. </varlistentry>
  45. <varlistentry>
  46. <term><parameter>argp</parameter></term>
  47. <listitem>
  48. <para>Pointer to an enum v4l2_priority type.</para>
  49. </listitem>
  50. </varlistentry>
  51. </variablelist>
  52. </refsect1>
  53. <refsect1>
  54. <title>Description</title>
  55. <para>To query the current access priority
  56. applications call the <constant>VIDIOC_G_PRIORITY</constant> ioctl
  57. with a pointer to an enum v4l2_priority variable where the driver stores
  58. the current priority.</para>
  59. <para>To request an access priority applications store the
  60. desired priority in an enum v4l2_priority variable and call
  61. <constant>VIDIOC_S_PRIORITY</constant> ioctl with a pointer to this
  62. variable.</para>
  63. <table frame="none" pgwide="1" id="v4l2-priority">
  64. <title>enum v4l2_priority</title>
  65. <tgroup cols="3">
  66. &cs-def;
  67. <tbody valign="top">
  68. <row>
  69. <entry><constant>V4L2_PRIORITY_UNSET</constant></entry>
  70. <entry>0</entry>
  71. <entry></entry>
  72. </row>
  73. <row>
  74. <entry><constant>V4L2_PRIORITY_BACKGROUND</constant></entry>
  75. <entry>1</entry>
  76. <entry>Lowest priority, usually applications running in
  77. background, for example monitoring VBI transmissions. A proxy
  78. application running in user space will be necessary if multiple
  79. applications want to read from a device at this priority.</entry>
  80. </row>
  81. <row>
  82. <entry><constant>V4L2_PRIORITY_INTERACTIVE</constant></entry>
  83. <entry>2</entry>
  84. <entry></entry>
  85. </row>
  86. <row>
  87. <entry><constant>V4L2_PRIORITY_DEFAULT</constant></entry>
  88. <entry>2</entry>
  89. <entry>Medium priority, usually applications started and
  90. interactively controlled by the user. For example TV viewers, Teletext
  91. browsers, or just "panel" applications to change the channel or video
  92. controls. This is the default priority unless an application requests
  93. another.</entry>
  94. </row>
  95. <row>
  96. <entry><constant>V4L2_PRIORITY_RECORD</constant></entry>
  97. <entry>3</entry>
  98. <entry>Highest priority. Only one file descriptor can have
  99. this priority, it blocks any other fd from changing device properties.
  100. Usually applications which must not be interrupted, like video
  101. recording.</entry>
  102. </row>
  103. </tbody>
  104. </tgroup>
  105. </table>
  106. </refsect1>
  107. <refsect1>
  108. &return-value;
  109. <variablelist>
  110. <varlistentry>
  111. <term><errorcode>EINVAL</errorcode></term>
  112. <listitem>
  113. <para>The requested priority value is invalid.</para>
  114. </listitem>
  115. </varlistentry>
  116. <varlistentry>
  117. <term><errorcode>EBUSY</errorcode></term>
  118. <listitem>
  119. <para>Another application already requested higher
  120. priority.</para>
  121. </listitem>
  122. </varlistentry>
  123. </variablelist>
  124. </refsect1>
  125. </refentry>