vidioc-dqevent.xml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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>&v4l2-event-frame-sync;</entry>
  85. <entry><structfield>frame_sync</structfield></entry>
  86. <entry>Event data for event V4L2_EVENT_FRAME_SYNC.</entry>
  87. </row>
  88. <row>
  89. <entry></entry>
  90. <entry>__u8</entry>
  91. <entry><structfield>data</structfield>[64]</entry>
  92. <entry>Event data. Defined by the event type. The union
  93. should be used to define easily accessible type for
  94. events.</entry>
  95. </row>
  96. <row>
  97. <entry>__u32</entry>
  98. <entry><structfield>pending</structfield></entry>
  99. <entry></entry>
  100. <entry>Number of pending events excluding this one.</entry>
  101. </row>
  102. <row>
  103. <entry>__u32</entry>
  104. <entry><structfield>sequence</structfield></entry>
  105. <entry></entry>
  106. <entry>Event sequence number. The sequence number is
  107. incremented for every subscribed event that takes place.
  108. If sequence numbers are not contiguous it means that
  109. events have been lost.
  110. </entry>
  111. </row>
  112. <row>
  113. <entry>struct timespec</entry>
  114. <entry><structfield>timestamp</structfield></entry>
  115. <entry></entry>
  116. <entry>Event timestamp.</entry>
  117. </row>
  118. <row>
  119. <entry>u32</entry>
  120. <entry><structfield>id</structfield></entry>
  121. <entry></entry>
  122. <entry>The ID associated with the event source. If the event does not
  123. have an associated ID (this depends on the event type), then this
  124. is 0.</entry>
  125. </row>
  126. <row>
  127. <entry>__u32</entry>
  128. <entry><structfield>reserved</structfield>[8]</entry>
  129. <entry></entry>
  130. <entry>Reserved for future extensions. Drivers must set
  131. the array to zero.</entry>
  132. </row>
  133. </tbody>
  134. </tgroup>
  135. </table>
  136. <table frame="none" pgwide="1" id="v4l2-event-vsync">
  137. <title>struct <structname>v4l2_event_vsync</structname></title>
  138. <tgroup cols="3">
  139. &cs-str;
  140. <tbody valign="top">
  141. <row>
  142. <entry>__u8</entry>
  143. <entry><structfield>field</structfield></entry>
  144. <entry>The upcoming field. See &v4l2-field;.</entry>
  145. </row>
  146. </tbody>
  147. </tgroup>
  148. </table>
  149. <table frame="none" pgwide="1" id="v4l2-event-ctrl">
  150. <title>struct <structname>v4l2_event_ctrl</structname></title>
  151. <tgroup cols="4">
  152. &cs-str;
  153. <tbody valign="top">
  154. <row>
  155. <entry>__u32</entry>
  156. <entry><structfield>changes</structfield></entry>
  157. <entry></entry>
  158. <entry>A bitmask that tells what has changed. See <xref linkend="changes-flags" />.</entry>
  159. </row>
  160. <row>
  161. <entry>__u32</entry>
  162. <entry><structfield>type</structfield></entry>
  163. <entry></entry>
  164. <entry>The type of the control. See &v4l2-ctrl-type;.</entry>
  165. </row>
  166. <row>
  167. <entry>union (anonymous)</entry>
  168. <entry></entry>
  169. <entry></entry>
  170. <entry></entry>
  171. </row>
  172. <row>
  173. <entry></entry>
  174. <entry>__s32</entry>
  175. <entry><structfield>value</structfield></entry>
  176. <entry>The 32-bit value of the control for 32-bit control types.
  177. This is 0 for string controls since the value of a string
  178. cannot be passed using &VIDIOC-DQEVENT;.</entry>
  179. </row>
  180. <row>
  181. <entry></entry>
  182. <entry>__s64</entry>
  183. <entry><structfield>value64</structfield></entry>
  184. <entry>The 64-bit value of the control for 64-bit control types.</entry>
  185. </row>
  186. <row>
  187. <entry>__u32</entry>
  188. <entry><structfield>flags</structfield></entry>
  189. <entry></entry>
  190. <entry>The control flags. See <xref linkend="control-flags" />.</entry>
  191. </row>
  192. <row>
  193. <entry>__s32</entry>
  194. <entry><structfield>minimum</structfield></entry>
  195. <entry></entry>
  196. <entry>The minimum value of the control. See &v4l2-queryctrl;.</entry>
  197. </row>
  198. <row>
  199. <entry>__s32</entry>
  200. <entry><structfield>maximum</structfield></entry>
  201. <entry></entry>
  202. <entry>The maximum value of the control. See &v4l2-queryctrl;.</entry>
  203. </row>
  204. <row>
  205. <entry>__s32</entry>
  206. <entry><structfield>step</structfield></entry>
  207. <entry></entry>
  208. <entry>The step value of the control. See &v4l2-queryctrl;.</entry>
  209. </row>
  210. <row>
  211. <entry>__s32</entry>
  212. <entry><structfield>default_value</structfield></entry>
  213. <entry></entry>
  214. <entry>The default value value of the control. See &v4l2-queryctrl;.</entry>
  215. </row>
  216. </tbody>
  217. </tgroup>
  218. </table>
  219. <table frame="none" pgwide="1" id="v4l2-event-frame-sync">
  220. <title>struct <structname>v4l2_event_frame_sync</structname></title>
  221. <tgroup cols="3">
  222. &cs-str;
  223. <tbody valign="top">
  224. <row>
  225. <entry>__u32</entry>
  226. <entry><structfield>frame_sequence</structfield></entry>
  227. <entry>
  228. The sequence number of the frame being received.
  229. </entry>
  230. </row>
  231. </tbody>
  232. </tgroup>
  233. </table>
  234. <table pgwide="1" frame="none" id="changes-flags">
  235. <title>Changes</title>
  236. <tgroup cols="3">
  237. &cs-def;
  238. <tbody valign="top">
  239. <row>
  240. <entry><constant>V4L2_EVENT_CTRL_CH_VALUE</constant></entry>
  241. <entry>0x0001</entry>
  242. <entry>This control event was triggered because the value of the control
  243. changed. Special case: if a button control is pressed, then this
  244. event is sent as well, even though there is not explicit value
  245. associated with a button control.</entry>
  246. </row>
  247. <row>
  248. <entry><constant>V4L2_EVENT_CTRL_CH_FLAGS</constant></entry>
  249. <entry>0x0002</entry>
  250. <entry>This control event was triggered because the control flags
  251. changed.</entry>
  252. </row>
  253. <row>
  254. <entry><constant>V4L2_EVENT_CTRL_CH_RANGE</constant></entry>
  255. <entry>0x0004</entry>
  256. <entry>This control event was triggered because the minimum,
  257. maximum, step or the default value of the control changed.</entry>
  258. </row>
  259. </tbody>
  260. </tgroup>
  261. </table>
  262. </refsect1>
  263. <refsect1>
  264. &return-value;
  265. </refsect1>
  266. </refentry>