1 .. -*- coding: utf-8; mode: rst -*-
5 ******************************************
6 ioctl VIDIOC_G_PRIORITY, VIDIOC_S_PRIORITY
7 ******************************************
12 VIDIOC_G_PRIORITY - VIDIOC_S_PRIORITY - Query or request the access priority associated with a file descriptor
18 .. cpp:function:: int ioctl( int fd, int request, enum v4l2_priority *argp )
20 .. cpp:function:: int ioctl( int fd, int request, const enum v4l2_priority *argp )
27 File descriptor returned by :ref:`open() <func-open>`.
30 VIDIOC_G_PRIORITY, VIDIOC_S_PRIORITY
33 Pointer to an enum v4l2_priority type.
39 To query the current access priority applications call the
40 :ref:`VIDIOC_G_PRIORITY <VIDIOC_G_PRIORITY>` ioctl with a pointer to an enum v4l2_priority
41 variable where the driver stores the current priority.
43 To request an access priority applications store the desired priority in
44 an enum v4l2_priority variable and call :ref:`VIDIOC_S_PRIORITY <VIDIOC_G_PRIORITY>` ioctl
45 with a pointer to this variable.
50 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
52 .. flat-table:: enum v4l2_priority
60 - ``V4L2_PRIORITY_UNSET``
68 - ``V4L2_PRIORITY_BACKGROUND``
72 - Lowest priority, usually applications running in background, for
73 example monitoring VBI transmissions. A proxy application running
74 in user space will be necessary if multiple applications want to
75 read from a device at this priority.
79 - ``V4L2_PRIORITY_INTERACTIVE``
87 - ``V4L2_PRIORITY_DEFAULT``
91 - Medium priority, usually applications started and interactively
92 controlled by the user. For example TV viewers, Teletext browsers,
93 or just "panel" applications to change the channel or video
94 controls. This is the default priority unless an application
99 - ``V4L2_PRIORITY_RECORD``
103 - Highest priority. Only one file descriptor can have this priority,
104 it blocks any other fd from changing device properties. Usually
105 applications which must not be interrupted, like video recording.
111 On success 0 is returned, on error -1 and the ``errno`` variable is set
112 appropriately. The generic error codes are described at the
113 :ref:`Generic Error Codes <gen-errors>` chapter.
116 The requested priority value is invalid.
119 Another application already requested higher priority.