1 .. -*- coding: utf-8; mode: rst -*-
5 ******************************************
6 ioctl VIDIOC_G_PRIORITY, VIDIOC_S_PRIORITY
7 ******************************************
9 *man VIDIOC_G_PRIORITY(2)*
12 Query or request the access priority associated with a file descriptor
18 .. c:function:: int ioctl( int fd, int request, enum v4l2_priority *argp )
20 .. c:function:: int ioctl( int fd, int request, const enum v4l2_priority *argp )
26 File descriptor returned by :ref:`open() <func-open>`.
29 VIDIOC_G_PRIORITY, VIDIOC_S_PRIORITY
32 Pointer to an enum v4l2_priority type.
38 To query the current access priority applications call the
39 :ref:`VIDIOC_G_PRIORITY <VIDIOC_G_PRIORITY>` ioctl with a pointer to an enum v4l2_priority
40 variable where the driver stores the current priority.
42 To request an access priority applications store the desired priority in
43 an enum v4l2_priority variable and call :ref:`VIDIOC_S_PRIORITY <VIDIOC_G_PRIORITY>` ioctl
44 with a pointer to this variable.
49 .. flat-table:: enum v4l2_priority
57 - ``V4L2_PRIORITY_UNSET``
65 - ``V4L2_PRIORITY_BACKGROUND``
69 - Lowest priority, usually applications running in background, for
70 example monitoring VBI transmissions. A proxy application running
71 in user space will be necessary if multiple applications want to
72 read from a device at this priority.
76 - ``V4L2_PRIORITY_INTERACTIVE``
84 - ``V4L2_PRIORITY_DEFAULT``
88 - Medium priority, usually applications started and interactively
89 controlled by the user. For example TV viewers, Teletext browsers,
90 or just "panel" applications to change the channel or video
91 controls. This is the default priority unless an application
96 - ``V4L2_PRIORITY_RECORD``
100 - Highest priority. Only one file descriptor can have this priority,
101 it blocks any other fd from changing device properties. Usually
102 applications which must not be interrupted, like video recording.
109 On success 0 is returned, on error -1 and the ``errno`` variable is set
110 appropriately. The generic error codes are described at the
111 :ref:`Generic Error Codes <gen-errors>` chapter.
114 The requested priority value is invalid.
117 Another application already requested higher priority.
120 .. ------------------------------------------------------------------------------
121 .. This file was automatically converted from DocBook-XML with the dbxml
122 .. library (https://github.com/return42/sphkerneldoc). The origin XML comes
123 .. from the linux kernel, refer to:
125 .. * https://github.com/torvalds/linux/tree/master/Documentation/DocBook
126 .. ------------------------------------------------------------------------------