1 .. SPDX-License-Identifier: GFDL-1.1-no-invari !! 1 .. Permission is granted to copy, distribute and/or modify this 2 .. c:namespace:: V4L !! 2 .. document under the terms of the GNU Free Documentation License, >> 3 .. Version 1.1 or any later version published by the Free Software >> 4 .. Foundation, with no Invariant Sections, no Front-Cover Texts >> 5 .. and no Back-Cover Texts. A copy of the license is included at >> 6 .. Documentation/userspace-api/media/fdl-appendix.rst. >> 7 .. >> 8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections 3 9 4 .. _VIDIOC_DQEVENT: 10 .. _VIDIOC_DQEVENT: 5 11 6 ******************** 12 ******************** 7 ioctl VIDIOC_DQEVENT 13 ioctl VIDIOC_DQEVENT 8 ******************** 14 ******************** 9 15 10 Name 16 Name 11 ==== 17 ==== 12 18 13 VIDIOC_DQEVENT - Dequeue event 19 VIDIOC_DQEVENT - Dequeue event 14 20 >> 21 15 Synopsis 22 Synopsis 16 ======== 23 ======== 17 24 18 .. c:macro:: VIDIOC_DQEVENT !! 25 .. c:function:: int ioctl( int fd, VIDIOC_DQEVENT, struct v4l2_event *argp ) >> 26 :name: VIDIOC_DQEVENT 19 27 20 ``int ioctl(int fd, VIDIOC_DQEVENT, struct v4l << 21 28 22 Arguments 29 Arguments 23 ========= 30 ========= 24 31 25 ``fd`` 32 ``fd`` 26 File descriptor returned by :c:func:`open( !! 33 File descriptor returned by :ref:`open() <func-open>`. 27 34 28 ``argp`` 35 ``argp`` 29 Pointer to struct :c:type:`v4l2_event`. 36 Pointer to struct :c:type:`v4l2_event`. 30 37 >> 38 31 Description 39 Description 32 =========== 40 =========== 33 41 34 Dequeue an event from a video device. No input 42 Dequeue an event from a video device. No input is required for this 35 ioctl. All the fields of the struct :c:type:`v 43 ioctl. All the fields of the struct :c:type:`v4l2_event` 36 structure are filled by the driver. The file h 44 structure are filled by the driver. The file handle will also receive 37 exceptions which the application may get by e. 45 exceptions which the application may get by e.g. using the select system 38 call. 46 call. 39 47 40 .. c:type:: v4l2_event << 41 48 42 .. tabularcolumns:: |p{3.0cm}|p{3.4cm}|p{10.9c !! 49 .. tabularcolumns:: |p{3.0cm}|p{4.4cm}|p{2.4cm}|p{7.7cm}| 43 50 >> 51 .. c:type:: v4l2_event >> 52 >> 53 .. cssclass: longtable 44 54 45 .. flat-table:: struct v4l2_event 55 .. flat-table:: struct v4l2_event 46 :header-rows: 0 56 :header-rows: 0 47 :stub-columns: 0 57 :stub-columns: 0 48 :widths: 1 1 2 58 :widths: 1 1 2 49 59 50 * - __u32 60 * - __u32 51 - ``type`` 61 - ``type`` 52 - Type of the event, see :ref:`event-typ 62 - Type of the event, see :ref:`event-type`. 53 * - union { 63 * - union { 54 - ``u`` 64 - ``u`` 55 * - struct :c:type:`v4l2_event_vsync` 65 * - struct :c:type:`v4l2_event_vsync` 56 - ``vsync`` 66 - ``vsync`` 57 - Event data for event ``V4L2_EVENT_VSYN 67 - Event data for event ``V4L2_EVENT_VSYNC``. 58 * - struct :c:type:`v4l2_event_ctrl` 68 * - struct :c:type:`v4l2_event_ctrl` 59 - ``ctrl`` 69 - ``ctrl`` 60 - Event data for event ``V4L2_EVENT_CTRL 70 - Event data for event ``V4L2_EVENT_CTRL``. 61 * - struct :c:type:`v4l2_event_frame_sync` 71 * - struct :c:type:`v4l2_event_frame_sync` 62 - ``frame_sync`` 72 - ``frame_sync`` 63 - Event data for event ``V4L2_EVENT_FRAM 73 - Event data for event ``V4L2_EVENT_FRAME_SYNC``. 64 * - struct :c:type:`v4l2_event_motion_det` 74 * - struct :c:type:`v4l2_event_motion_det` 65 - ``motion_det`` 75 - ``motion_det`` 66 - Event data for event V4L2_EVENT_MOTION 76 - Event data for event V4L2_EVENT_MOTION_DET. 67 * - struct :c:type:`v4l2_event_src_change` 77 * - struct :c:type:`v4l2_event_src_change` 68 - ``src_change`` 78 - ``src_change`` 69 - Event data for event V4L2_EVENT_SOURCE 79 - Event data for event V4L2_EVENT_SOURCE_CHANGE. 70 * - __u8 80 * - __u8 71 - ``data``\ [64] 81 - ``data``\ [64] 72 - Event data. Defined by the event type. 82 - Event data. Defined by the event type. The union should be used to 73 define easily accessible type for even 83 define easily accessible type for events. 74 * - } 84 * - } 75 - 85 - 76 * - __u32 86 * - __u32 77 - ``pending`` 87 - ``pending`` 78 - Number of pending events excluding thi 88 - Number of pending events excluding this one. 79 * - __u32 89 * - __u32 80 - ``sequence`` 90 - ``sequence`` 81 - Event sequence number. The sequence nu 91 - Event sequence number. The sequence number is incremented for 82 every subscribed event that takes plac 92 every subscribed event that takes place. If sequence numbers are 83 not contiguous it means that events ha 93 not contiguous it means that events have been lost. 84 * - struct timespec 94 * - struct timespec 85 - ``timestamp`` 95 - ``timestamp`` 86 - Event timestamp. The timestamp has bee 96 - Event timestamp. The timestamp has been taken from the 87 ``CLOCK_MONOTONIC`` clock. To access t 97 ``CLOCK_MONOTONIC`` clock. To access the same clock outside V4L2, 88 use :c:func:`clock_gettime`. 98 use :c:func:`clock_gettime`. 89 * - u32 99 * - u32 90 - ``id`` 100 - ``id`` 91 - The ID associated with the event sourc 101 - The ID associated with the event source. If the event does not 92 have an associated ID (this depends on 102 have an associated ID (this depends on the event type), then this 93 is 0. 103 is 0. 94 * - __u32 104 * - __u32 95 - ``reserved``\ [8] 105 - ``reserved``\ [8] 96 - Reserved for future extensions. Driver 106 - Reserved for future extensions. Drivers must set the array to 97 zero. 107 zero. 98 108 99 109 100 .. tabularcolumns:: |p{6.2cm}|p{2.6cm}|p{8.5cm !! 110 >> 111 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 101 112 102 .. cssclass:: longtable 113 .. cssclass:: longtable 103 114 104 .. _event-type: 115 .. _event-type: 105 116 106 .. flat-table:: Event Types 117 .. flat-table:: Event Types 107 :header-rows: 0 118 :header-rows: 0 108 :stub-columns: 0 119 :stub-columns: 0 109 :widths: 3 1 4 120 :widths: 3 1 4 110 121 111 * - ``V4L2_EVENT_ALL`` 122 * - ``V4L2_EVENT_ALL`` 112 - 0 123 - 0 113 - All events. V4L2_EVENT_ALL is valid on 124 - All events. V4L2_EVENT_ALL is valid only for 114 VIDIOC_UNSUBSCRIBE_EVENT for unsubscri 125 VIDIOC_UNSUBSCRIBE_EVENT for unsubscribing all events at once. 115 * - ``V4L2_EVENT_VSYNC`` 126 * - ``V4L2_EVENT_VSYNC`` 116 - 1 127 - 1 117 - This event is triggered on the vertica 128 - This event is triggered on the vertical sync. This event has a 118 struct :c:type:`v4l2_event_vsync` asso 129 struct :c:type:`v4l2_event_vsync` associated 119 with it. 130 with it. 120 * - ``V4L2_EVENT_EOS`` 131 * - ``V4L2_EVENT_EOS`` 121 - 2 132 - 2 122 - This event is triggered when the end o 133 - This event is triggered when the end of a stream is reached. This 123 is typically used with MPEG decoders t 134 is typically used with MPEG decoders to report to the application 124 when the last of the MPEG stream has b 135 when the last of the MPEG stream has been decoded. 125 * - ``V4L2_EVENT_CTRL`` 136 * - ``V4L2_EVENT_CTRL`` 126 - 3 137 - 3 127 - This event requires that the ``id`` ma 138 - This event requires that the ``id`` matches the control ID from 128 which you want to receive events. This 139 which you want to receive events. This event is triggered if the 129 control's value changes, if a button c 140 control's value changes, if a button control is pressed or if the 130 control's flags change. This event has 141 control's flags change. This event has a struct 131 :c:type:`v4l2_event_ctrl` associated w 142 :c:type:`v4l2_event_ctrl` associated with it. 132 This struct contains much of the same 143 This struct contains much of the same information as struct 133 :ref:`v4l2_queryctrl <v4l2-queryctrl>` 144 :ref:`v4l2_queryctrl <v4l2-queryctrl>` and struct 134 :c:type:`v4l2_control`. 145 :c:type:`v4l2_control`. 135 146 136 If the event is generated due to a cal 147 If the event is generated due to a call to 137 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` o 148 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` or 138 :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT 149 :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`, then the 139 event will *not* be sent to the file h 150 event will *not* be sent to the file handle that called the ioctl 140 function. This prevents nasty feedback 151 function. This prevents nasty feedback loops. If you *do* want to 141 get the event, then set the ``V4L2_EVE 152 get the event, then set the ``V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK`` 142 flag. 153 flag. 143 154 144 This event type will ensure that no in 155 This event type will ensure that no information is lost when more 145 events are raised than there is room i 156 events are raised than there is room internally. In that case the 146 struct :c:type:`v4l2_event_ctrl` of th 157 struct :c:type:`v4l2_event_ctrl` of the 147 second-oldest event is kept, but the ` 158 second-oldest event is kept, but the ``changes`` field of the 148 second-oldest event is ORed with the ` 159 second-oldest event is ORed with the ``changes`` field of the 149 oldest event. 160 oldest event. 150 * - ``V4L2_EVENT_FRAME_SYNC`` 161 * - ``V4L2_EVENT_FRAME_SYNC`` 151 - 4 162 - 4 152 - Triggered immediately when the recepti 163 - Triggered immediately when the reception of a frame has begun. 153 This event has a struct 164 This event has a struct 154 :c:type:`v4l2_event_frame_sync` 165 :c:type:`v4l2_event_frame_sync` 155 associated with it. 166 associated with it. 156 167 157 If the hardware needs to be stopped in 168 If the hardware needs to be stopped in the case of a buffer 158 underrun it might not be able to gener 169 underrun it might not be able to generate this event. In such 159 cases the ``frame_sequence`` field in 170 cases the ``frame_sequence`` field in struct 160 :c:type:`v4l2_event_frame_sync` will n 171 :c:type:`v4l2_event_frame_sync` will not 161 be incremented. This causes two consec 172 be incremented. This causes two consecutive frame sequence numbers 162 to have n times frame interval in betw 173 to have n times frame interval in between them. 163 * - ``V4L2_EVENT_SOURCE_CHANGE`` 174 * - ``V4L2_EVENT_SOURCE_CHANGE`` 164 - 5 175 - 5 165 - This event is triggered when a source 176 - This event is triggered when a source parameter change is detected 166 during runtime by the video device. It 177 during runtime by the video device. It can be a runtime resolution 167 change triggered by a video decoder or 178 change triggered by a video decoder or the format change happening 168 on an input connector. This event requ 179 on an input connector. This event requires that the ``id`` matches 169 the input index (when used with a vide 180 the input index (when used with a video device node) or the pad 170 index (when used with a subdevice node 181 index (when used with a subdevice node) from which you want to 171 receive events. 182 receive events. 172 183 173 This event has a struct 184 This event has a struct 174 :c:type:`v4l2_event_src_change` 185 :c:type:`v4l2_event_src_change` 175 associated with it. The ``changes`` bi 186 associated with it. The ``changes`` bitfield denotes what has 176 changed for the subscribed pad. If mul 187 changed for the subscribed pad. If multiple events occurred before 177 application could dequeue them, then t 188 application could dequeue them, then the changes will have the 178 ORed value of all the events generated 189 ORed value of all the events generated. 179 * - ``V4L2_EVENT_MOTION_DET`` 190 * - ``V4L2_EVENT_MOTION_DET`` 180 - 6 191 - 6 181 - Triggered whenever the motion detectio 192 - Triggered whenever the motion detection state for one or more of 182 the regions changes. This event has a 193 the regions changes. This event has a struct 183 :c:type:`v4l2_event_motion_det` 194 :c:type:`v4l2_event_motion_det` 184 associated with it. 195 associated with it. 185 * - ``V4L2_EVENT_PRIVATE_START`` 196 * - ``V4L2_EVENT_PRIVATE_START`` 186 - 0x08000000 197 - 0x08000000 187 - Base event number for driver-private e 198 - Base event number for driver-private events. 188 199 189 200 190 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.5cm !! 201 >> 202 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 191 203 192 .. c:type:: v4l2_event_vsync 204 .. c:type:: v4l2_event_vsync 193 205 194 .. flat-table:: struct v4l2_event_vsync 206 .. flat-table:: struct v4l2_event_vsync 195 :header-rows: 0 207 :header-rows: 0 196 :stub-columns: 0 208 :stub-columns: 0 197 :widths: 1 1 2 209 :widths: 1 1 2 198 210 199 * - __u8 211 * - __u8 200 - ``field`` 212 - ``field`` 201 - The upcoming field. See enum :c:type:` 213 - The upcoming field. See enum :c:type:`v4l2_field`. 202 214 203 215 204 .. tabularcolumns:: |p{3.5cm}|p{3.0cm}|p{10.8c !! 216 >> 217 .. tabularcolumns:: |p{3.5cm}|p{3.0cm}|p{1.8cm}|p{8.5cm}| 205 218 206 .. c:type:: v4l2_event_ctrl 219 .. c:type:: v4l2_event_ctrl 207 220 208 .. flat-table:: struct v4l2_event_ctrl 221 .. flat-table:: struct v4l2_event_ctrl 209 :header-rows: 0 222 :header-rows: 0 210 :stub-columns: 0 223 :stub-columns: 0 211 :widths: 1 1 2 224 :widths: 1 1 2 212 225 213 * - __u32 226 * - __u32 214 - ``changes`` 227 - ``changes`` 215 - A bitmask that tells what has changed. 228 - A bitmask that tells what has changed. See 216 :ref:`ctrl-changes-flags`. 229 :ref:`ctrl-changes-flags`. 217 * - __u32 230 * - __u32 218 - ``type`` 231 - ``type`` 219 - The type of the control. See enum 232 - The type of the control. See enum 220 :c:type:`v4l2_ctrl_type`. 233 :c:type:`v4l2_ctrl_type`. 221 * - union { 234 * - union { 222 - (anonymous) 235 - (anonymous) 223 * - __s32 236 * - __s32 224 - ``value`` 237 - ``value`` 225 - The 32-bit value of the control for 32 238 - The 32-bit value of the control for 32-bit control types. This is 226 0 for string controls since the value 239 0 for string controls since the value of a string cannot be passed 227 using :ref:`VIDIOC_DQEVENT`. 240 using :ref:`VIDIOC_DQEVENT`. 228 * - __s64 241 * - __s64 229 - ``value64`` 242 - ``value64`` 230 - The 64-bit value of the control for 64 243 - The 64-bit value of the control for 64-bit control types. 231 * - } 244 * - } 232 - 245 - 233 * - __u32 246 * - __u32 234 - ``flags`` 247 - ``flags`` 235 - The control flags. See :ref:`control-f 248 - The control flags. See :ref:`control-flags`. 236 * - __s32 249 * - __s32 237 - ``minimum`` 250 - ``minimum`` 238 - The minimum value of the control. See 251 - The minimum value of the control. See struct 239 :ref:`v4l2_queryctrl <v4l2-queryctrl>` 252 :ref:`v4l2_queryctrl <v4l2-queryctrl>`. 240 * - __s32 253 * - __s32 241 - ``maximum`` 254 - ``maximum`` 242 - The maximum value of the control. See 255 - The maximum value of the control. See struct 243 :ref:`v4l2_queryctrl <v4l2-queryctrl>` 256 :ref:`v4l2_queryctrl <v4l2-queryctrl>`. 244 * - __s32 257 * - __s32 245 - ``step`` 258 - ``step`` 246 - The step value of the control. See str 259 - The step value of the control. See struct 247 :ref:`v4l2_queryctrl <v4l2-queryctrl>` 260 :ref:`v4l2_queryctrl <v4l2-queryctrl>`. 248 * - __s32 261 * - __s32 249 - ``default_value`` 262 - ``default_value`` 250 - The default value of the control. See !! 263 - The default value value of the control. See struct 251 :ref:`v4l2_queryctrl <v4l2-queryctrl>` 264 :ref:`v4l2_queryctrl <v4l2-queryctrl>`. 252 265 253 266 254 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.5cm !! 267 >> 268 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 255 269 256 .. c:type:: v4l2_event_frame_sync 270 .. c:type:: v4l2_event_frame_sync 257 271 258 .. flat-table:: struct v4l2_event_frame_sync 272 .. flat-table:: struct v4l2_event_frame_sync 259 :header-rows: 0 273 :header-rows: 0 260 :stub-columns: 0 274 :stub-columns: 0 261 :widths: 1 1 2 275 :widths: 1 1 2 262 276 263 * - __u32 277 * - __u32 264 - ``frame_sequence`` 278 - ``frame_sequence`` 265 - The sequence number of the frame being 279 - The sequence number of the frame being received. 266 280 267 281 268 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.5cm !! 282 >> 283 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 269 284 270 .. c:type:: v4l2_event_src_change 285 .. c:type:: v4l2_event_src_change 271 286 272 .. flat-table:: struct v4l2_event_src_change 287 .. flat-table:: struct v4l2_event_src_change 273 :header-rows: 0 288 :header-rows: 0 274 :stub-columns: 0 289 :stub-columns: 0 275 :widths: 1 1 2 290 :widths: 1 1 2 276 291 277 * - __u32 292 * - __u32 278 - ``changes`` 293 - ``changes`` 279 - A bitmask that tells what has changed. 294 - A bitmask that tells what has changed. See 280 :ref:`src-changes-flags`. 295 :ref:`src-changes-flags`. 281 296 282 297 283 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.5cm !! 298 >> 299 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 284 300 285 .. c:type:: v4l2_event_motion_det 301 .. c:type:: v4l2_event_motion_det 286 302 287 .. flat-table:: struct v4l2_event_motion_det 303 .. flat-table:: struct v4l2_event_motion_det 288 :header-rows: 0 304 :header-rows: 0 289 :stub-columns: 0 305 :stub-columns: 0 290 :widths: 1 1 2 306 :widths: 1 1 2 291 307 292 * - __u32 308 * - __u32 293 - ``flags`` 309 - ``flags`` 294 - Currently only one flag is available: 310 - Currently only one flag is available: if 295 ``V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ`` is 311 ``V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ`` is set, then the 296 ``frame_sequence`` field is valid, oth 312 ``frame_sequence`` field is valid, otherwise that field should be 297 ignored. 313 ignored. 298 * - __u32 314 * - __u32 299 - ``frame_sequence`` 315 - ``frame_sequence`` 300 - The sequence number of the frame being 316 - The sequence number of the frame being received. Only valid if the 301 ``V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ`` fl 317 ``V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ`` flag was set. 302 * - __u32 318 * - __u32 303 - ``region_mask`` 319 - ``region_mask`` 304 - The bitmask of the regions that report 320 - The bitmask of the regions that reported motion. There is at least 305 one region. If this field is 0, then n 321 one region. If this field is 0, then no motion was detected at 306 all. If there is no ``V4L2_CID_DETECT_ 322 all. If there is no ``V4L2_CID_DETECT_MD_REGION_GRID`` control 307 (see :ref:`detect-controls`) to assign 323 (see :ref:`detect-controls`) to assign a different region to 308 each cell in the motion detection grid 324 each cell in the motion detection grid, then that all cells are 309 automatically assigned to the default 325 automatically assigned to the default region 0. 310 326 311 327 312 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.5cm !! 328 >> 329 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 313 330 314 .. _ctrl-changes-flags: 331 .. _ctrl-changes-flags: 315 332 316 .. flat-table:: Control Changes 333 .. flat-table:: Control Changes 317 :header-rows: 0 334 :header-rows: 0 318 :stub-columns: 0 335 :stub-columns: 0 319 :widths: 3 1 4 336 :widths: 3 1 4 320 337 321 * - ``V4L2_EVENT_CTRL_CH_VALUE`` 338 * - ``V4L2_EVENT_CTRL_CH_VALUE`` 322 - 0x0001 339 - 0x0001 323 - This control event was triggered becau 340 - This control event was triggered because the value of the control 324 changed. Special cases: Volatile contr 341 changed. Special cases: Volatile controls do no generate this 325 event; If a control has the ``V4L2_CTR 342 event; If a control has the ``V4L2_CTRL_FLAG_EXECUTE_ON_WRITE`` 326 flag set, then this event is sent as w 343 flag set, then this event is sent as well, regardless its value. 327 * - ``V4L2_EVENT_CTRL_CH_FLAGS`` 344 * - ``V4L2_EVENT_CTRL_CH_FLAGS`` 328 - 0x0002 345 - 0x0002 329 - This control event was triggered becau 346 - This control event was triggered because the control flags 330 changed. 347 changed. 331 * - ``V4L2_EVENT_CTRL_CH_RANGE`` 348 * - ``V4L2_EVENT_CTRL_CH_RANGE`` 332 - 0x0004 349 - 0x0004 333 - This control event was triggered becau 350 - This control event was triggered because the minimum, maximum, 334 step or the default value of the contr 351 step or the default value of the control changed. 335 * - ``V4L2_EVENT_CTRL_CH_DIMENSIONS`` << 336 - 0x0008 << 337 - This control event was triggered becau << 338 control changed. Note that the number << 339 same. << 340 352 341 353 342 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.5cm !! 354 >> 355 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 343 356 344 .. _src-changes-flags: 357 .. _src-changes-flags: 345 358 346 .. flat-table:: Source Changes 359 .. flat-table:: Source Changes 347 :header-rows: 0 360 :header-rows: 0 348 :stub-columns: 0 361 :stub-columns: 0 349 :widths: 3 1 4 362 :widths: 3 1 4 350 363 351 * - ``V4L2_EVENT_SRC_CH_RESOLUTION`` 364 * - ``V4L2_EVENT_SRC_CH_RESOLUTION`` 352 - 0x0001 365 - 0x0001 353 - This event gets triggered when a resol 366 - This event gets triggered when a resolution change is detected at 354 an input. This can come from an input 367 an input. This can come from an input connector or from a video 355 decoder. Applications will have to que 368 decoder. Applications will have to query the new resolution (if 356 any, the signal may also have been los 369 any, the signal may also have been lost). 357 370 358 For stateful decoders follow the guide 371 For stateful decoders follow the guidelines in :ref:`decoder`. 359 Video Capture devices have to query th 372 Video Capture devices have to query the new timings using 360 :ref:`VIDIOC_QUERY_DV_TIMINGS` or 373 :ref:`VIDIOC_QUERY_DV_TIMINGS` or 361 :ref:`VIDIOC_QUERYSTD <VIDIOC_QUERYSTD 374 :ref:`VIDIOC_QUERYSTD <VIDIOC_QUERYSTD>`. 362 375 363 *Important*: even if the new video tim 376 *Important*: even if the new video timings appear identical to the old 364 ones, receiving this event indicates t 377 ones, receiving this event indicates that there was an issue with the 365 video signal and you must stop and res 378 video signal and you must stop and restart streaming 366 (:ref:`VIDIOC_STREAMOFF <VIDIOC_STREAM 379 (:ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` 367 followed by :ref:`VIDIOC_STREAMON <VID 380 followed by :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>`). The reason is 368 that many Video Capture devices are no 381 that many Video Capture devices are not able to recover from a temporary 369 loss of signal and so restarting strea 382 loss of signal and so restarting streaming I/O is required in order for 370 the hardware to synchronize to the vid 383 the hardware to synchronize to the video signal. >> 384 371 385 372 Return Value 386 Return Value 373 ============ 387 ============ 374 388 375 On success 0 is returned, on error -1 and the 389 On success 0 is returned, on error -1 and the ``errno`` variable is set 376 appropriately. The generic error codes are des 390 appropriately. The generic error codes are described at the 377 :ref:`Generic Error Codes <gen-errors>` chapte 391 :ref:`Generic Error Codes <gen-errors>` chapter.
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.