VIDIOC_DQEVENT — Dequeue event
int fsfuncioctl( | int fd, |
int request, | |
struct v4l2_event
*argp) ; |
Dequeue an event from a video device. No input is required for this ioctl. All the fields of the struct v4l2_event structure are filled by the driver. The file handle will also receive exceptions which the application may get by e.g. using the select system call.
Table A.10. struct v4l2_event
__u32 | type | Type of the event. | |
union | u | ||
struct v4l2_event_vsync | vsync | Event data for event V4L2_EVENT_VSYNC. | |
struct v4l2_event_ctrl | ctrl | Event data for event V4L2_EVENT_CTRL. | |
__u8 | data [64] | Event data. Defined by the event type. The union should be used to define easily accessible type for events. | |
__u32 | pending | Number of pending events excluding this one. | |
__u32 | sequence | Event sequence number. The sequence number is incremented for every subscribed event that takes place. If sequence numbers are not contiguous it means that events have been lost. | |
struct timespec | timestamp | Event timestamp. | |
u32 | id | The ID associated with the event source. If the event does not have an associated ID (this depends on the event type), then this is 0. | |
__u32 | reserved [8] | Reserved for future extensions. Drivers must set the array to zero. |
On success 0 is returned, on error -1 and the errno
variable is set appropriately. The generic error codes are described at the Generic Error Codes chapter.