Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) .. c:namespace:: DTV.video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) .. _VIDEO_GET_EVENT:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) ===============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) VIDEO_GET_EVENT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) ===============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) Name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) ----
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) VIDEO_GET_EVENT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) .. attention:: This ioctl is deprecated.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) Synopsis
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) --------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) .. c:macro:: VIDEO_GET_EVENT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) ``int ioctl(fd, VIDEO_GET_EVENT, struct video_event *ev)``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) Arguments
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) ---------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) .. flat-table::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31)     -  .. row 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33)        -  int fd
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35)        -  File descriptor returned by a previous call to open().
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37)     -  .. row 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39)        -  int request
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41)        -  Equals VIDEO_GET_EVENT for this command.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43)     -  .. row 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45)        -  struct video_event \*ev
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47)        -  Points to the location where the event, if any, is to be stored.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) Description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) -----------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) This ioctl is for Digital TV devices only. To get events from a V4L2 decoder
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) use the V4L2 :ref:`VIDIOC_DQEVENT` ioctl instead.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) This ioctl call returns an event of type video_event if available. If
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) an event is not available, the behavior depends on whether the device is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) in blocking or non-blocking mode. In the latter case, the call fails
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) immediately with errno set to ``EWOULDBLOCK``. In the former case, the call
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) blocks until an event becomes available. The standard Linux poll()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) and/or select() system calls can be used with the device file descriptor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) to watch for new events. For select(), the file descriptor should be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) included in the exceptfds argument, and for poll(), POLLPRI should be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) specified as the wake-up condition. Read-only permissions are sufficient
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) for this ioctl call.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) .. c:type:: video_event
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) .. code-block:: c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 	struct video_event {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 		__s32 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	#define VIDEO_EVENT_SIZE_CHANGED	1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	#define VIDEO_EVENT_FRAME_RATE_CHANGED	2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	#define VIDEO_EVENT_DECODER_STOPPED 	3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	#define VIDEO_EVENT_VSYNC 		4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 		long timestamp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 		union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 			video_size_t size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 			unsigned int frame_rate;	/* in frames per 1000sec */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 			unsigned char vsync_field;	/* unknown/odd/even/progressive */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 		} u;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) Return Value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) ------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) On success 0 is returned, on error -1 and the ``errno`` variable is set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) appropriately. The generic error codes are described at the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) :ref:`Generic Error Codes <gen-errors>` chapter.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) .. flat-table::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95)     -  .. row 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97)        -  ``EWOULDBLOCK``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99)        -  There is no event pending, and the device is in non-blocking mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101)     -  .. row 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103)        -  ``EOVERFLOW``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)        -  Overflow in event queue - one or more events were lost.