vidioc-dqevent.xml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <refentry id="vidioc-dqevent">
  2. <refmeta>
  3. <refentrytitle>ioctl VIDIOC_DQEVENT</refentrytitle>
  4. &manvol;
  5. </refmeta>
  6. <refnamediv>
  7. <refname>VIDIOC_DQEVENT</refname>
  8. <refpurpose>Dequeue event</refpurpose>
  9. </refnamediv>
  10. <refsynopsisdiv>
  11. <funcsynopsis>
  12. <funcprototype>
  13. <funcdef>int <function>ioctl</function></funcdef>
  14. <paramdef>int <parameter>fd</parameter></paramdef>
  15. <paramdef>int <parameter>request</parameter></paramdef>
  16. <paramdef>struct v4l2_event
  17. *<parameter>argp</parameter></paramdef>
  18. </funcprototype>
  19. </funcsynopsis>
  20. </refsynopsisdiv>
  21. <refsect1>
  22. <title>Arguments</title>
  23. <variablelist>
  24. <varlistentry>
  25. <term><parameter>fd</parameter></term>
  26. <listitem>
  27. <para>&fd;</para>
  28. </listitem>
  29. </varlistentry>
  30. <varlistentry>
  31. <term><parameter>request</parameter></term>
  32. <listitem>
  33. <para>VIDIOC_DQEVENT</para>
  34. </listitem>
  35. </varlistentry>
  36. <varlistentry>
  37. <term><parameter>argp</parameter></term>
  38. <listitem>
  39. <para></para>
  40. </listitem>
  41. </varlistentry>
  42. </variablelist>
  43. </refsect1>
  44. <refsect1>
  45. <title>Description</title>
  46. <para>Dequeue an event from a video device. No input is required
  47. for this ioctl. All the fields of the &v4l2-event; structure are
  48. filled by the driver. The file handle will also receive exceptions
  49. which the application may get by e.g. using the select system
  50. call.</para>
  51. <table frame="none" pgwide="1" id="v4l2-event">
  52. <title>struct <structname>v4l2_event</structname></title>
  53. <tgroup cols="4">
  54. &cs-str;
  55. <tbody valign="top">
  56. <row>
  57. <entry>__u32</entry>
  58. <entry><structfield>type</structfield></entry>
  59. <entry></entry>
  60. <entry>Type of the event.</entry>
  61. </row>
  62. <row>
  63. <entry>union</entry>
  64. <entry><structfield>u</structfield></entry>
  65. <entry></entry>
  66. <entry></entry>
  67. </row>
  68. <row>
  69. <entry></entry>
  70. <entry>&v4l2-event-vsync;</entry>
  71. <entry><structfield>vsync</structfield></entry>
  72. <entry>Event data for event V4L2_EVENT_VSYNC.
  73. </entry>
  74. </row>
  75. <row>
  76. <entry></entry>
  77. <entry>&v4l2-event-ctrl;</entry>
  78. <entry><structfield>ctrl</structfield></entry>
  79. <entry>Event data for event V4L2_EVENT_CTRL.
  80. </entry>
  81. </row>
  82. <row>
  83. <entry></entry>
  84. <entry>__u8</entry>
  85. <entry><structfield>data</structfield>[64]</entry>
  86. <entry>Event data. Defined by the event type. The union
  87. should be used to define easily accessible type for
  88. events.</entry>
  89. </row>
  90. <row>
  91. <entry>__u32</entry>
  92. <entry><structfield>pending</structfield></entry>
  93. <entry></entry>
  94. <entry>Number of pending events excluding this one.</entry>
  95. </row>
  96. <row>
  97. <entry>__u32</entry>
  98. <entry><structfield>sequence</structfield></entry>
  99. <entry></entry>
  100. <entry>Event sequence number. The sequence number is
  101. incremented for every subscribed event that takes place.
  102. If sequence numbers are not contiguous it means that
  103. events have been lost.
  104. </entry>
  105. </row>
  106. <row>
  107. <entry>struct timespec</entry>
  108. <entry><structfield>timestamp</structfield></entry>
  109. <entry></entry>
  110. <entry>Event timestamp.</entry>
  111. </row>
  112. <row>
  113. <entry>u32</entry>
  114. <entry><structfield>id</structfield></entry>
  115. <entry></entry>
  116. <entry>The ID associated with the event source. If the event does not
  117. have an associated ID (this depends on the event type), then this
  118. is 0.</entry>
  119. </row>
  120. <row>
  121. <entry>__u32</entry>
  122. <entry><structfield>reserved</structfield>[8]</entry>
  123. <entry></entry>
  124. <entry>Reserved for future extensions. Drivers must set
  125. the array to zero.</entry>
  126. </row>
  127. </tbody>
  128. </tgroup>
  129. </table>
  130. <table frame="none" pgwide="1" id="v4l2-event-vsync">
  131. <title>struct <structname>v4l2_event_vsync</structname></title>
  132. <tgroup cols="3">
  133. &cs-str;
  134. <tbody valign="top">
  135. <row>
  136. <entry>__u8</entry>
  137. <entry><structfield>field</structfield></entry>
  138. <entry>The upcoming field. See &v4l2-field;.</entry>
  139. </row>
  140. </tbody>
  141. </tgroup>
  142. </table>
  143. <table frame="none" pgwide="1" id="v4l2-event-ctrl">
  144. <title>struct <structname>v4l2_event_ctrl</structname></title>
  145. <tgroup cols="4">
  146. &cs-str;
  147. <tbody valign="top">
  148. <row>
  149. <entry>__u32</entry>
  150. <entry><structfield>changes</structfield></entry>
  151. <entry></entry>
  152. <entry>A bitmask that tells what has changed. See <xref linkend="changes-flags" />.</entry>
  153. </row>
  154. <row>
  155. <entry>__u32</entry>
  156. <entry><structfield>type</structfield></entry>
  157. <entry></entry>
  158. <entry>The type of the control. See &v4l2-ctrl-type;.</entry>
  159. </row>
  160. <row>
  161. <entry>union (anonymous)</entry>
  162. <entry></entry>
  163. <entry></entry>
  164. <entry></entry>
  165. </row>
  166. <row>
  167. <entry></entry>
  168. <entry>__s32</entry>
  169. <entry><structfield>value</structfield></entry>
  170. <entry>The 32-bit value of the control for 32-bit control types.
  171. This is 0 for string controls since the value of a string
  172. cannot be passed using &VIDIOC-DQEVENT;.</entry>
  173. </row>
  174. <row>
  175. <entry></entry>
  176. <entry>__s64</entry>
  177. <entry><structfield>value64</structfield></entry>
  178. <entry>The 64-bit value of the control for 64-bit control types.</entry>
  179. </row>
  180. <row>
  181. <entry>__u32</entry>
  182. <entry><structfield>flags</structfield></entry>
  183. <entry></entry>
  184. <entry>The control flags. See <xref linkend="control-flags" />.</entry>
  185. </row>
  186. <row>
  187. <entry>__s32</entry>
  188. <entry><structfield>minimum</structfield></entry>
  189. <entry></entry>
  190. <entry>The minimum value of the control. See &v4l2-queryctrl;.</entry>
  191. </row>
  192. <row>
  193. <entry>__s32</entry>
  194. <entry><structfield>maximum</structfield></entry>
  195. <entry></entry>
  196. <entry>The maximum value of the control. See &v4l2-queryctrl;.</entry>
  197. </row>
  198. <row>
  199. <entry>__s32</entry>
  200. <entry><structfield>step</structfield></entry>
  201. <entry></entry>
  202. <entry>The step value of the control. See &v4l2-queryctrl;.</entry>
  203. </row>
  204. <row>
  205. <entry>__s32</entry>
  206. <entry><structfield>default_value</structfield></entry>
  207. <entry></entry>
  208. <entry>The default value value of the control. See &v4l2-queryctrl;.</entry>
  209. </row>
  210. </tbody>
  211. </tgroup>
  212. </table>
  213. <table pgwide="1" frame="none" id="changes-flags">
  214. <title>Changes</title>
  215. <tgroup cols="3">
  216. &cs-def;
  217. <tbody valign="top">
  218. <row>
  219. <entry><constant>V4L2_EVENT_CTRL_CH_VALUE</constant></entry>
  220. <entry>0x0001</entry>
  221. <entry>This control event was triggered because the value of the control
  222. changed. Special case: if a button control is pressed, then this
  223. event is sent as well, even though there is not explicit value
  224. associated with a button control.</entry>
  225. </row>
  226. <row>
  227. <entry><constant>V4L2_EVENT_CTRL_CH_FLAGS</constant></entry>
  228. <entry>0x0002</entry>
  229. <entry>This control event was triggered because the control flags
  230. changed.</entry>
  231. </row>
  232. </tbody>
  233. </tgroup>
  234. </table>
  235. </refsect1>
  236. <refsect1>
  237. &return-value;
  238. </refsect1>
  239. </refentry>