162306a36Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 262306a36Sopenharmony_ci.. c:namespace:: V4L 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci.. _VIDIOC_DQEVENT: 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci******************** 762306a36Sopenharmony_ciioctl VIDIOC_DQEVENT 862306a36Sopenharmony_ci******************** 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ciName 1162306a36Sopenharmony_ci==== 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ciVIDIOC_DQEVENT - Dequeue event 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ciSynopsis 1662306a36Sopenharmony_ci======== 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ci.. c:macro:: VIDIOC_DQEVENT 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci``int ioctl(int fd, VIDIOC_DQEVENT, struct v4l2_event *argp)`` 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ciArguments 2362306a36Sopenharmony_ci========= 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci``fd`` 2662306a36Sopenharmony_ci File descriptor returned by :c:func:`open()`. 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci``argp`` 2962306a36Sopenharmony_ci Pointer to struct :c:type:`v4l2_event`. 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ciDescription 3262306a36Sopenharmony_ci=========== 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ciDequeue an event from a video device. No input is required for this 3562306a36Sopenharmony_ciioctl. All the fields of the struct :c:type:`v4l2_event` 3662306a36Sopenharmony_cistructure are filled by the driver. The file handle will also receive 3762306a36Sopenharmony_ciexceptions which the application may get by e.g. using the select system 3862306a36Sopenharmony_cicall. 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci.. c:type:: v4l2_event 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ci.. tabularcolumns:: |p{3.0cm}|p{3.4cm}|p{10.9cm}| 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci.. flat-table:: struct v4l2_event 4662306a36Sopenharmony_ci :header-rows: 0 4762306a36Sopenharmony_ci :stub-columns: 0 4862306a36Sopenharmony_ci :widths: 1 1 2 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci * - __u32 5162306a36Sopenharmony_ci - ``type`` 5262306a36Sopenharmony_ci - Type of the event, see :ref:`event-type`. 5362306a36Sopenharmony_ci * - union { 5462306a36Sopenharmony_ci - ``u`` 5562306a36Sopenharmony_ci * - struct :c:type:`v4l2_event_vsync` 5662306a36Sopenharmony_ci - ``vsync`` 5762306a36Sopenharmony_ci - Event data for event ``V4L2_EVENT_VSYNC``. 5862306a36Sopenharmony_ci * - struct :c:type:`v4l2_event_ctrl` 5962306a36Sopenharmony_ci - ``ctrl`` 6062306a36Sopenharmony_ci - Event data for event ``V4L2_EVENT_CTRL``. 6162306a36Sopenharmony_ci * - struct :c:type:`v4l2_event_frame_sync` 6262306a36Sopenharmony_ci - ``frame_sync`` 6362306a36Sopenharmony_ci - Event data for event ``V4L2_EVENT_FRAME_SYNC``. 6462306a36Sopenharmony_ci * - struct :c:type:`v4l2_event_motion_det` 6562306a36Sopenharmony_ci - ``motion_det`` 6662306a36Sopenharmony_ci - Event data for event V4L2_EVENT_MOTION_DET. 6762306a36Sopenharmony_ci * - struct :c:type:`v4l2_event_src_change` 6862306a36Sopenharmony_ci - ``src_change`` 6962306a36Sopenharmony_ci - Event data for event V4L2_EVENT_SOURCE_CHANGE. 7062306a36Sopenharmony_ci * - __u8 7162306a36Sopenharmony_ci - ``data``\ [64] 7262306a36Sopenharmony_ci - Event data. Defined by the event type. The union should be used to 7362306a36Sopenharmony_ci define easily accessible type for events. 7462306a36Sopenharmony_ci * - } 7562306a36Sopenharmony_ci - 7662306a36Sopenharmony_ci * - __u32 7762306a36Sopenharmony_ci - ``pending`` 7862306a36Sopenharmony_ci - Number of pending events excluding this one. 7962306a36Sopenharmony_ci * - __u32 8062306a36Sopenharmony_ci - ``sequence`` 8162306a36Sopenharmony_ci - Event sequence number. The sequence number is incremented for 8262306a36Sopenharmony_ci every subscribed event that takes place. If sequence numbers are 8362306a36Sopenharmony_ci not contiguous it means that events have been lost. 8462306a36Sopenharmony_ci * - struct timespec 8562306a36Sopenharmony_ci - ``timestamp`` 8662306a36Sopenharmony_ci - Event timestamp. The timestamp has been taken from the 8762306a36Sopenharmony_ci ``CLOCK_MONOTONIC`` clock. To access the same clock outside V4L2, 8862306a36Sopenharmony_ci use :c:func:`clock_gettime`. 8962306a36Sopenharmony_ci * - u32 9062306a36Sopenharmony_ci - ``id`` 9162306a36Sopenharmony_ci - The ID associated with the event source. If the event does not 9262306a36Sopenharmony_ci have an associated ID (this depends on the event type), then this 9362306a36Sopenharmony_ci is 0. 9462306a36Sopenharmony_ci * - __u32 9562306a36Sopenharmony_ci - ``reserved``\ [8] 9662306a36Sopenharmony_ci - Reserved for future extensions. Drivers must set the array to 9762306a36Sopenharmony_ci zero. 9862306a36Sopenharmony_ci 9962306a36Sopenharmony_ci 10062306a36Sopenharmony_ci.. tabularcolumns:: |p{6.2cm}|p{2.6cm}|p{8.5cm}| 10162306a36Sopenharmony_ci 10262306a36Sopenharmony_ci.. cssclass:: longtable 10362306a36Sopenharmony_ci 10462306a36Sopenharmony_ci.. _event-type: 10562306a36Sopenharmony_ci 10662306a36Sopenharmony_ci.. flat-table:: Event Types 10762306a36Sopenharmony_ci :header-rows: 0 10862306a36Sopenharmony_ci :stub-columns: 0 10962306a36Sopenharmony_ci :widths: 3 1 4 11062306a36Sopenharmony_ci 11162306a36Sopenharmony_ci * - ``V4L2_EVENT_ALL`` 11262306a36Sopenharmony_ci - 0 11362306a36Sopenharmony_ci - All events. V4L2_EVENT_ALL is valid only for 11462306a36Sopenharmony_ci VIDIOC_UNSUBSCRIBE_EVENT for unsubscribing all events at once. 11562306a36Sopenharmony_ci * - ``V4L2_EVENT_VSYNC`` 11662306a36Sopenharmony_ci - 1 11762306a36Sopenharmony_ci - This event is triggered on the vertical sync. This event has a 11862306a36Sopenharmony_ci struct :c:type:`v4l2_event_vsync` associated 11962306a36Sopenharmony_ci with it. 12062306a36Sopenharmony_ci * - ``V4L2_EVENT_EOS`` 12162306a36Sopenharmony_ci - 2 12262306a36Sopenharmony_ci - This event is triggered when the end of a stream is reached. This 12362306a36Sopenharmony_ci is typically used with MPEG decoders to report to the application 12462306a36Sopenharmony_ci when the last of the MPEG stream has been decoded. 12562306a36Sopenharmony_ci * - ``V4L2_EVENT_CTRL`` 12662306a36Sopenharmony_ci - 3 12762306a36Sopenharmony_ci - This event requires that the ``id`` matches the control ID from 12862306a36Sopenharmony_ci which you want to receive events. This event is triggered if the 12962306a36Sopenharmony_ci control's value changes, if a button control is pressed or if the 13062306a36Sopenharmony_ci control's flags change. This event has a struct 13162306a36Sopenharmony_ci :c:type:`v4l2_event_ctrl` associated with it. 13262306a36Sopenharmony_ci This struct contains much of the same information as struct 13362306a36Sopenharmony_ci :ref:`v4l2_queryctrl <v4l2-queryctrl>` and struct 13462306a36Sopenharmony_ci :c:type:`v4l2_control`. 13562306a36Sopenharmony_ci 13662306a36Sopenharmony_ci If the event is generated due to a call to 13762306a36Sopenharmony_ci :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` or 13862306a36Sopenharmony_ci :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`, then the 13962306a36Sopenharmony_ci event will *not* be sent to the file handle that called the ioctl 14062306a36Sopenharmony_ci function. This prevents nasty feedback loops. If you *do* want to 14162306a36Sopenharmony_ci get the event, then set the ``V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK`` 14262306a36Sopenharmony_ci flag. 14362306a36Sopenharmony_ci 14462306a36Sopenharmony_ci This event type will ensure that no information is lost when more 14562306a36Sopenharmony_ci events are raised than there is room internally. In that case the 14662306a36Sopenharmony_ci struct :c:type:`v4l2_event_ctrl` of the 14762306a36Sopenharmony_ci second-oldest event is kept, but the ``changes`` field of the 14862306a36Sopenharmony_ci second-oldest event is ORed with the ``changes`` field of the 14962306a36Sopenharmony_ci oldest event. 15062306a36Sopenharmony_ci * - ``V4L2_EVENT_FRAME_SYNC`` 15162306a36Sopenharmony_ci - 4 15262306a36Sopenharmony_ci - Triggered immediately when the reception of a frame has begun. 15362306a36Sopenharmony_ci This event has a struct 15462306a36Sopenharmony_ci :c:type:`v4l2_event_frame_sync` 15562306a36Sopenharmony_ci associated with it. 15662306a36Sopenharmony_ci 15762306a36Sopenharmony_ci If the hardware needs to be stopped in the case of a buffer 15862306a36Sopenharmony_ci underrun it might not be able to generate this event. In such 15962306a36Sopenharmony_ci cases the ``frame_sequence`` field in struct 16062306a36Sopenharmony_ci :c:type:`v4l2_event_frame_sync` will not 16162306a36Sopenharmony_ci be incremented. This causes two consecutive frame sequence numbers 16262306a36Sopenharmony_ci to have n times frame interval in between them. 16362306a36Sopenharmony_ci * - ``V4L2_EVENT_SOURCE_CHANGE`` 16462306a36Sopenharmony_ci - 5 16562306a36Sopenharmony_ci - This event is triggered when a source parameter change is detected 16662306a36Sopenharmony_ci during runtime by the video device. It can be a runtime resolution 16762306a36Sopenharmony_ci change triggered by a video decoder or the format change happening 16862306a36Sopenharmony_ci on an input connector. This event requires that the ``id`` matches 16962306a36Sopenharmony_ci the input index (when used with a video device node) or the pad 17062306a36Sopenharmony_ci index (when used with a subdevice node) from which you want to 17162306a36Sopenharmony_ci receive events. 17262306a36Sopenharmony_ci 17362306a36Sopenharmony_ci This event has a struct 17462306a36Sopenharmony_ci :c:type:`v4l2_event_src_change` 17562306a36Sopenharmony_ci associated with it. The ``changes`` bitfield denotes what has 17662306a36Sopenharmony_ci changed for the subscribed pad. If multiple events occurred before 17762306a36Sopenharmony_ci application could dequeue them, then the changes will have the 17862306a36Sopenharmony_ci ORed value of all the events generated. 17962306a36Sopenharmony_ci * - ``V4L2_EVENT_MOTION_DET`` 18062306a36Sopenharmony_ci - 6 18162306a36Sopenharmony_ci - Triggered whenever the motion detection state for one or more of 18262306a36Sopenharmony_ci the regions changes. This event has a struct 18362306a36Sopenharmony_ci :c:type:`v4l2_event_motion_det` 18462306a36Sopenharmony_ci associated with it. 18562306a36Sopenharmony_ci * - ``V4L2_EVENT_PRIVATE_START`` 18662306a36Sopenharmony_ci - 0x08000000 18762306a36Sopenharmony_ci - Base event number for driver-private events. 18862306a36Sopenharmony_ci 18962306a36Sopenharmony_ci 19062306a36Sopenharmony_ci.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.5cm}| 19162306a36Sopenharmony_ci 19262306a36Sopenharmony_ci.. c:type:: v4l2_event_vsync 19362306a36Sopenharmony_ci 19462306a36Sopenharmony_ci.. flat-table:: struct v4l2_event_vsync 19562306a36Sopenharmony_ci :header-rows: 0 19662306a36Sopenharmony_ci :stub-columns: 0 19762306a36Sopenharmony_ci :widths: 1 1 2 19862306a36Sopenharmony_ci 19962306a36Sopenharmony_ci * - __u8 20062306a36Sopenharmony_ci - ``field`` 20162306a36Sopenharmony_ci - The upcoming field. See enum :c:type:`v4l2_field`. 20262306a36Sopenharmony_ci 20362306a36Sopenharmony_ci 20462306a36Sopenharmony_ci.. tabularcolumns:: |p{3.5cm}|p{3.0cm}|p{10.8cm}| 20562306a36Sopenharmony_ci 20662306a36Sopenharmony_ci.. c:type:: v4l2_event_ctrl 20762306a36Sopenharmony_ci 20862306a36Sopenharmony_ci.. flat-table:: struct v4l2_event_ctrl 20962306a36Sopenharmony_ci :header-rows: 0 21062306a36Sopenharmony_ci :stub-columns: 0 21162306a36Sopenharmony_ci :widths: 1 1 2 21262306a36Sopenharmony_ci 21362306a36Sopenharmony_ci * - __u32 21462306a36Sopenharmony_ci - ``changes`` 21562306a36Sopenharmony_ci - A bitmask that tells what has changed. See 21662306a36Sopenharmony_ci :ref:`ctrl-changes-flags`. 21762306a36Sopenharmony_ci * - __u32 21862306a36Sopenharmony_ci - ``type`` 21962306a36Sopenharmony_ci - The type of the control. See enum 22062306a36Sopenharmony_ci :c:type:`v4l2_ctrl_type`. 22162306a36Sopenharmony_ci * - union { 22262306a36Sopenharmony_ci - (anonymous) 22362306a36Sopenharmony_ci * - __s32 22462306a36Sopenharmony_ci - ``value`` 22562306a36Sopenharmony_ci - The 32-bit value of the control for 32-bit control types. This is 22662306a36Sopenharmony_ci 0 for string controls since the value of a string cannot be passed 22762306a36Sopenharmony_ci using :ref:`VIDIOC_DQEVENT`. 22862306a36Sopenharmony_ci * - __s64 22962306a36Sopenharmony_ci - ``value64`` 23062306a36Sopenharmony_ci - The 64-bit value of the control for 64-bit control types. 23162306a36Sopenharmony_ci * - } 23262306a36Sopenharmony_ci - 23362306a36Sopenharmony_ci * - __u32 23462306a36Sopenharmony_ci - ``flags`` 23562306a36Sopenharmony_ci - The control flags. See :ref:`control-flags`. 23662306a36Sopenharmony_ci * - __s32 23762306a36Sopenharmony_ci - ``minimum`` 23862306a36Sopenharmony_ci - The minimum value of the control. See struct 23962306a36Sopenharmony_ci :ref:`v4l2_queryctrl <v4l2-queryctrl>`. 24062306a36Sopenharmony_ci * - __s32 24162306a36Sopenharmony_ci - ``maximum`` 24262306a36Sopenharmony_ci - The maximum value of the control. See struct 24362306a36Sopenharmony_ci :ref:`v4l2_queryctrl <v4l2-queryctrl>`. 24462306a36Sopenharmony_ci * - __s32 24562306a36Sopenharmony_ci - ``step`` 24662306a36Sopenharmony_ci - The step value of the control. See struct 24762306a36Sopenharmony_ci :ref:`v4l2_queryctrl <v4l2-queryctrl>`. 24862306a36Sopenharmony_ci * - __s32 24962306a36Sopenharmony_ci - ``default_value`` 25062306a36Sopenharmony_ci - The default value of the control. See struct 25162306a36Sopenharmony_ci :ref:`v4l2_queryctrl <v4l2-queryctrl>`. 25262306a36Sopenharmony_ci 25362306a36Sopenharmony_ci 25462306a36Sopenharmony_ci.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.5cm}| 25562306a36Sopenharmony_ci 25662306a36Sopenharmony_ci.. c:type:: v4l2_event_frame_sync 25762306a36Sopenharmony_ci 25862306a36Sopenharmony_ci.. flat-table:: struct v4l2_event_frame_sync 25962306a36Sopenharmony_ci :header-rows: 0 26062306a36Sopenharmony_ci :stub-columns: 0 26162306a36Sopenharmony_ci :widths: 1 1 2 26262306a36Sopenharmony_ci 26362306a36Sopenharmony_ci * - __u32 26462306a36Sopenharmony_ci - ``frame_sequence`` 26562306a36Sopenharmony_ci - The sequence number of the frame being received. 26662306a36Sopenharmony_ci 26762306a36Sopenharmony_ci 26862306a36Sopenharmony_ci.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.5cm}| 26962306a36Sopenharmony_ci 27062306a36Sopenharmony_ci.. c:type:: v4l2_event_src_change 27162306a36Sopenharmony_ci 27262306a36Sopenharmony_ci.. flat-table:: struct v4l2_event_src_change 27362306a36Sopenharmony_ci :header-rows: 0 27462306a36Sopenharmony_ci :stub-columns: 0 27562306a36Sopenharmony_ci :widths: 1 1 2 27662306a36Sopenharmony_ci 27762306a36Sopenharmony_ci * - __u32 27862306a36Sopenharmony_ci - ``changes`` 27962306a36Sopenharmony_ci - A bitmask that tells what has changed. See 28062306a36Sopenharmony_ci :ref:`src-changes-flags`. 28162306a36Sopenharmony_ci 28262306a36Sopenharmony_ci 28362306a36Sopenharmony_ci.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.5cm}| 28462306a36Sopenharmony_ci 28562306a36Sopenharmony_ci.. c:type:: v4l2_event_motion_det 28662306a36Sopenharmony_ci 28762306a36Sopenharmony_ci.. flat-table:: struct v4l2_event_motion_det 28862306a36Sopenharmony_ci :header-rows: 0 28962306a36Sopenharmony_ci :stub-columns: 0 29062306a36Sopenharmony_ci :widths: 1 1 2 29162306a36Sopenharmony_ci 29262306a36Sopenharmony_ci * - __u32 29362306a36Sopenharmony_ci - ``flags`` 29462306a36Sopenharmony_ci - Currently only one flag is available: if 29562306a36Sopenharmony_ci ``V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ`` is set, then the 29662306a36Sopenharmony_ci ``frame_sequence`` field is valid, otherwise that field should be 29762306a36Sopenharmony_ci ignored. 29862306a36Sopenharmony_ci * - __u32 29962306a36Sopenharmony_ci - ``frame_sequence`` 30062306a36Sopenharmony_ci - The sequence number of the frame being received. Only valid if the 30162306a36Sopenharmony_ci ``V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ`` flag was set. 30262306a36Sopenharmony_ci * - __u32 30362306a36Sopenharmony_ci - ``region_mask`` 30462306a36Sopenharmony_ci - The bitmask of the regions that reported motion. There is at least 30562306a36Sopenharmony_ci one region. If this field is 0, then no motion was detected at 30662306a36Sopenharmony_ci all. If there is no ``V4L2_CID_DETECT_MD_REGION_GRID`` control 30762306a36Sopenharmony_ci (see :ref:`detect-controls`) to assign a different region to 30862306a36Sopenharmony_ci each cell in the motion detection grid, then that all cells are 30962306a36Sopenharmony_ci automatically assigned to the default region 0. 31062306a36Sopenharmony_ci 31162306a36Sopenharmony_ci 31262306a36Sopenharmony_ci.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.5cm}| 31362306a36Sopenharmony_ci 31462306a36Sopenharmony_ci.. _ctrl-changes-flags: 31562306a36Sopenharmony_ci 31662306a36Sopenharmony_ci.. flat-table:: Control Changes 31762306a36Sopenharmony_ci :header-rows: 0 31862306a36Sopenharmony_ci :stub-columns: 0 31962306a36Sopenharmony_ci :widths: 3 1 4 32062306a36Sopenharmony_ci 32162306a36Sopenharmony_ci * - ``V4L2_EVENT_CTRL_CH_VALUE`` 32262306a36Sopenharmony_ci - 0x0001 32362306a36Sopenharmony_ci - This control event was triggered because the value of the control 32462306a36Sopenharmony_ci changed. Special cases: Volatile controls do no generate this 32562306a36Sopenharmony_ci event; If a control has the ``V4L2_CTRL_FLAG_EXECUTE_ON_WRITE`` 32662306a36Sopenharmony_ci flag set, then this event is sent as well, regardless its value. 32762306a36Sopenharmony_ci * - ``V4L2_EVENT_CTRL_CH_FLAGS`` 32862306a36Sopenharmony_ci - 0x0002 32962306a36Sopenharmony_ci - This control event was triggered because the control flags 33062306a36Sopenharmony_ci changed. 33162306a36Sopenharmony_ci * - ``V4L2_EVENT_CTRL_CH_RANGE`` 33262306a36Sopenharmony_ci - 0x0004 33362306a36Sopenharmony_ci - This control event was triggered because the minimum, maximum, 33462306a36Sopenharmony_ci step or the default value of the control changed. 33562306a36Sopenharmony_ci * - ``V4L2_EVENT_CTRL_CH_DIMENSIONS`` 33662306a36Sopenharmony_ci - 0x0008 33762306a36Sopenharmony_ci - This control event was triggered because the dimensions of the 33862306a36Sopenharmony_ci control changed. Note that the number of dimensions remains the 33962306a36Sopenharmony_ci same. 34062306a36Sopenharmony_ci 34162306a36Sopenharmony_ci 34262306a36Sopenharmony_ci.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.5cm}| 34362306a36Sopenharmony_ci 34462306a36Sopenharmony_ci.. _src-changes-flags: 34562306a36Sopenharmony_ci 34662306a36Sopenharmony_ci.. flat-table:: Source Changes 34762306a36Sopenharmony_ci :header-rows: 0 34862306a36Sopenharmony_ci :stub-columns: 0 34962306a36Sopenharmony_ci :widths: 3 1 4 35062306a36Sopenharmony_ci 35162306a36Sopenharmony_ci * - ``V4L2_EVENT_SRC_CH_RESOLUTION`` 35262306a36Sopenharmony_ci - 0x0001 35362306a36Sopenharmony_ci - This event gets triggered when a resolution change is detected at 35462306a36Sopenharmony_ci an input. This can come from an input connector or from a video 35562306a36Sopenharmony_ci decoder. Applications will have to query the new resolution (if 35662306a36Sopenharmony_ci any, the signal may also have been lost). 35762306a36Sopenharmony_ci 35862306a36Sopenharmony_ci For stateful decoders follow the guidelines in :ref:`decoder`. 35962306a36Sopenharmony_ci Video Capture devices have to query the new timings using 36062306a36Sopenharmony_ci :ref:`VIDIOC_QUERY_DV_TIMINGS` or 36162306a36Sopenharmony_ci :ref:`VIDIOC_QUERYSTD <VIDIOC_QUERYSTD>`. 36262306a36Sopenharmony_ci 36362306a36Sopenharmony_ci *Important*: even if the new video timings appear identical to the old 36462306a36Sopenharmony_ci ones, receiving this event indicates that there was an issue with the 36562306a36Sopenharmony_ci video signal and you must stop and restart streaming 36662306a36Sopenharmony_ci (:ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` 36762306a36Sopenharmony_ci followed by :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>`). The reason is 36862306a36Sopenharmony_ci that many Video Capture devices are not able to recover from a temporary 36962306a36Sopenharmony_ci loss of signal and so restarting streaming I/O is required in order for 37062306a36Sopenharmony_ci the hardware to synchronize to the video signal. 37162306a36Sopenharmony_ci 37262306a36Sopenharmony_ciReturn Value 37362306a36Sopenharmony_ci============ 37462306a36Sopenharmony_ci 37562306a36Sopenharmony_ciOn success 0 is returned, on error -1 and the ``errno`` variable is set 37662306a36Sopenharmony_ciappropriately. The generic error codes are described at the 37762306a36Sopenharmony_ci:ref:`Generic Error Codes <gen-errors>` chapter. 378