1 .. Permission is granted to copy, distribute and/or modify this
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.
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
21 .. attention:: This ioctl is deprecated.
26 .. c:function:: int ioctl(fd, VIDEO_GET_EVENT, struct video_event *ev)
27 :name: VIDEO_GET_EVENT
42 - File descriptor returned by a previous call to open().
48 - Equals VIDEO_GET_EVENT for this command.
52 - struct video_event \*ev
54 - Points to the location where the event, if any, is to be stored.
60 This ioctl is for Digital TV devices only. To get events from a V4L2 decoder
61 use the V4L2 :ref:`VIDIOC_DQEVENT` ioctl instead.
63 This ioctl call returns an event of type video_event if available. If
64 an event is not available, the behavior depends on whether the device is
65 in blocking or non-blocking mode. In the latter case, the call fails
66 immediately with errno set to ``EWOULDBLOCK``. In the former case, the call
67 blocks until an event becomes available. The standard Linux poll()
68 and/or select() system calls can be used with the device file descriptor
69 to watch for new events. For select(), the file descriptor should be
70 included in the exceptfds argument, and for poll(), POLLPRI should be
71 specified as the wake-up condition. Read-only permissions are sufficient
74 .. c:type:: video_event
80 #define VIDEO_EVENT_SIZE_CHANGED 1
81 #define VIDEO_EVENT_FRAME_RATE_CHANGED 2
82 #define VIDEO_EVENT_DECODER_STOPPED 3
83 #define VIDEO_EVENT_VSYNC 4
87 unsigned int frame_rate; /* in frames per 1000sec */
88 unsigned char vsync_field; /* unknown/odd/even/progressive */
95 On success 0 is returned, on error -1 and the ``errno`` variable is set
96 appropriately. The generic error codes are described at the
97 :ref:`Generic Error Codes <gen-errors>` chapter.
108 - There is no event pending, and the device is in non-blocking mode.
114 - Overflow in event queue - one or more events were lost.