Name

VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRIBE_EVENT — Subscribe or unsubscribe event

Synopsis

int ioctl(int fd,
 int request,
 struct v4l2_event_subscription *argp);
 

Arguments

fd

File descriptor returned by open().

request

VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRIBE_EVENT

argp

Description

Subscribe or unsubscribe V4L2 event. Subscribed events are dequeued by using the VIDIOC_DQEVENT ioctl.

Table A.90. struct v4l2_event_subscription

__u32typeType of the event.
__u32reserved[7]Reserved for future extensions. Drivers and applications must set the array to zero.

Table A.91. Event Types

V4L2_EVENT_ALL0All events. V4L2_EVENT_ALL is valid only for VIDIOC_UNSUBSCRIBE_EVENT for unsubscribing all events at once.
V4L2_EVENT_VSYNC1This event is triggered on the vertical sync. This event has struct v4l2_event_vsync associated with it.
V4L2_EVENT_EOS2This event is triggered when the end of a stream is reached. This is typically used with MPEG decoders to report to the application when the last of the MPEG stream has been decoded.
V4L2_EVENT_PRIVATE_START0x08000000Base event number for driver-private events.

Table A.92. struct v4l2_event_vsync

__u8fieldThe upcoming field. See enum v4l2_field.