~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/userspace-api/media/v4l/vidioc-subscribe-event.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/userspace-api/media/v4l/vidioc-subscribe-event.rst (Architecture sparc) and /Documentation/userspace-api/media/v4l/vidioc-subscribe-event.rst (Architecture m68k)


  1 .. SPDX-License-Identifier: GFDL-1.1-no-invari      1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
  2 .. c:namespace:: V4L                                2 .. c:namespace:: V4L
  3                                                     3 
  4 .. _VIDIOC_SUBSCRIBE_EVENT:                         4 .. _VIDIOC_SUBSCRIBE_EVENT:
  5 .. _VIDIOC_UNSUBSCRIBE_EVENT:                       5 .. _VIDIOC_UNSUBSCRIBE_EVENT:
  6                                                     6 
  7 **********************************************      7 ******************************************************
  8 ioctl VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRI      8 ioctl VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRIBE_EVENT
  9 **********************************************      9 ******************************************************
 10                                                    10 
 11 Name                                               11 Name
 12 ====                                               12 ====
 13                                                    13 
 14 VIDIOC_SUBSCRIBE_EVENT - VIDIOC_UNSUBSCRIBE_EV     14 VIDIOC_SUBSCRIBE_EVENT - VIDIOC_UNSUBSCRIBE_EVENT - Subscribe or unsubscribe event
 15                                                    15 
 16 Synopsis                                           16 Synopsis
 17 ========                                           17 ========
 18                                                    18 
 19 .. c:macro:: VIDIOC_SUBSCRIBE_EVENT                19 .. c:macro:: VIDIOC_SUBSCRIBE_EVENT
 20                                                    20 
 21 ``int ioctl(int fd, VIDIOC_SUBSCRIBE_EVENT, st     21 ``int ioctl(int fd, VIDIOC_SUBSCRIBE_EVENT, struct v4l2_event_subscription *argp)``
 22                                                    22 
 23 .. c:macro:: VIDIOC_UNSUBSCRIBE_EVENT              23 .. c:macro:: VIDIOC_UNSUBSCRIBE_EVENT
 24                                                    24 
 25 ``int ioctl(int fd, VIDIOC_UNSUBSCRIBE_EVENT,      25 ``int ioctl(int fd, VIDIOC_UNSUBSCRIBE_EVENT, struct v4l2_event_subscription *argp)``
 26                                                    26 
 27 Arguments                                          27 Arguments
 28 =========                                          28 =========
 29                                                    29 
 30 ``fd``                                             30 ``fd``
 31     File descriptor returned by :c:func:`open(     31     File descriptor returned by :c:func:`open()`.
 32                                                    32 
 33 ``argp``                                           33 ``argp``
 34     Pointer to struct :c:type:`v4l2_event_subs     34     Pointer to struct :c:type:`v4l2_event_subscription`.
 35                                                    35 
 36 Description                                        36 Description
 37 ===========                                        37 ===========
 38                                                    38 
 39 Subscribe or unsubscribe V4L2 event. Subscribe     39 Subscribe or unsubscribe V4L2 event. Subscribed events are dequeued by
 40 using the :ref:`VIDIOC_DQEVENT` ioctl.             40 using the :ref:`VIDIOC_DQEVENT` ioctl.
 41                                                    41 
 42 .. tabularcolumns:: |p{2.6cm}|p{4.4cm}|p{10.3c     42 .. tabularcolumns:: |p{2.6cm}|p{4.4cm}|p{10.3cm}|
 43                                                    43 
 44 .. c:type:: v4l2_event_subscription                44 .. c:type:: v4l2_event_subscription
 45                                                    45 
 46 .. flat-table:: struct v4l2_event_subscription     46 .. flat-table:: struct v4l2_event_subscription
 47     :header-rows:  0                               47     :header-rows:  0
 48     :stub-columns: 0                               48     :stub-columns: 0
 49     :widths:       1 1 2                           49     :widths:       1 1 2
 50                                                    50 
 51     * - __u32                                      51     * - __u32
 52       - ``type``                                   52       - ``type``
 53       - Type of the event, see :ref:`event-typ     53       - Type of the event, see :ref:`event-type`.
 54                                                    54 
 55         .. note::                                  55         .. note::
 56                                                    56 
 57            ``V4L2_EVENT_ALL`` can be used with     57            ``V4L2_EVENT_ALL`` can be used with
 58            :ref:`VIDIOC_UNSUBSCRIBE_EVENT <VID     58            :ref:`VIDIOC_UNSUBSCRIBE_EVENT <VIDIOC_SUBSCRIBE_EVENT>` for
 59            unsubscribing all events at once.       59            unsubscribing all events at once.
 60     * - __u32                                      60     * - __u32
 61       - ``id``                                     61       - ``id``
 62       - ID of the event source. If there is no     62       - ID of the event source. If there is no ID associated with the
 63         event source, then set this to 0. Whet     63         event source, then set this to 0. Whether or not an event needs an
 64         ID depends on the event type.              64         ID depends on the event type.
 65     * - __u32                                      65     * - __u32
 66       - ``flags``                                  66       - ``flags``
 67       - Event flags, see :ref:`event-flags`.       67       - Event flags, see :ref:`event-flags`.
 68     * - __u32                                      68     * - __u32
 69       - ``reserved``\ [5]                          69       - ``reserved``\ [5]
 70       - Reserved for future extensions. Driver     70       - Reserved for future extensions. Drivers and applications must set
 71         the array to zero.                         71         the array to zero.
 72                                                    72 
 73                                                    73 
 74 .. tabularcolumns:: |p{7.5cm}|p{2.0cm}|p{7.8cm     74 .. tabularcolumns:: |p{7.5cm}|p{2.0cm}|p{7.8cm}|
 75                                                    75 
 76 .. _event-flags:                                   76 .. _event-flags:
 77                                                    77 
 78 .. flat-table:: Event Flags                        78 .. flat-table:: Event Flags
 79     :header-rows:  0                               79     :header-rows:  0
 80     :stub-columns: 0                               80     :stub-columns: 0
 81     :widths:       3 1 4                           81     :widths:       3 1 4
 82                                                    82 
 83     * - ``V4L2_EVENT_SUB_FL_SEND_INITIAL``         83     * - ``V4L2_EVENT_SUB_FL_SEND_INITIAL``
 84       - 0x0001                                     84       - 0x0001
 85       - When this event is subscribed an initi     85       - When this event is subscribed an initial event will be sent
 86         containing the current status. This on     86         containing the current status. This only makes sense for events
 87         that are triggered by a status change      87         that are triggered by a status change such as ``V4L2_EVENT_CTRL``.
 88         Other events will ignore this flag.        88         Other events will ignore this flag.
 89     * - ``V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK``       89     * - ``V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK``
 90       - 0x0002                                     90       - 0x0002
 91       - If set, then events directly caused by     91       - If set, then events directly caused by an ioctl will also be sent
 92         to the filehandle that called that ioc     92         to the filehandle that called that ioctl. For example, changing a
 93         control using :ref:`VIDIOC_S_CTRL <VID     93         control using :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` will cause
 94         a V4L2_EVENT_CTRL to be sent back to t     94         a V4L2_EVENT_CTRL to be sent back to that same filehandle.
 95         Normally such events are suppressed to     95         Normally such events are suppressed to prevent feedback loops
 96         where an application changes a control     96         where an application changes a control to a one value and then
 97         another, and then receives an event te     97         another, and then receives an event telling it that that control
 98         has changed to the first value.            98         has changed to the first value.
 99                                                    99 
100         Since it can't tell whether that event    100         Since it can't tell whether that event was caused by another
101         application or by the :ref:`VIDIOC_S_C    101         application or by the :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>`
102         call it is hard to decide whether to s    102         call it is hard to decide whether to set the control to the value
103         in the event, or ignore it.               103         in the event, or ignore it.
104                                                   104 
105         Think carefully when you set this flag    105         Think carefully when you set this flag so you won't get into
106         situations like that.                     106         situations like that.
107                                                   107 
108 Return Value                                      108 Return Value
109 ============                                      109 ============
110                                                   110 
111 On success 0 is returned, on error -1 and the     111 On success 0 is returned, on error -1 and the ``errno`` variable is set
112 appropriately. The generic error codes are des    112 appropriately. The generic error codes are described at the
113 :ref:`Generic Error Codes <gen-errors>` chapte    113 :ref:`Generic Error Codes <gen-errors>` chapter.
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php