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