• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
2<HTML
3><HEAD
4><TITLE
5>ioctl VIDIOC_G_PRIORITY, VIDIOC_S_PRIORITY</TITLE
6><META
7NAME="GENERATOR"
8CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
9REL="HOME"
10TITLE="Video for Linux Two API Specification"
11HREF="book1.htm"><LINK
12REL="UP"
13TITLE="Function Reference"
14HREF="r7624.htm"><LINK
15REL="PREVIOUS"
16TITLE="ioctl VIDIOC_G_PARM, VIDIOC_S_PARM"
17HREF="r11680.htm"><LINK
18REL="NEXT"
19TITLE="ioctl VIDIOC_G_SLICED_VBI_CAP"
20HREF="r12051.htm"></HEAD
21><BODY
22CLASS="REFENTRY"
23BGCOLOR="#FFFFFF"
24TEXT="#000000"
25LINK="#0000FF"
26VLINK="#840084"
27ALINK="#0000FF"
28><DIV
29CLASS="NAVHEADER"
30><TABLE
31SUMMARY="Header navigation table"
32WIDTH="100%"
33BORDER="0"
34CELLPADDING="0"
35CELLSPACING="0"
36><TR
37><TH
38COLSPAN="3"
39ALIGN="center"
40>Video for Linux Two API Specification: Revision 0.24</TH
41></TR
42><TR
43><TD
44WIDTH="10%"
45ALIGN="left"
46VALIGN="bottom"
47><A
48HREF="r11680.htm"
49ACCESSKEY="P"
50>Prev</A
51></TD
52><TD
53WIDTH="80%"
54ALIGN="center"
55VALIGN="bottom"
56></TD
57><TD
58WIDTH="10%"
59ALIGN="right"
60VALIGN="bottom"
61><A
62HREF="r12051.htm"
63ACCESSKEY="N"
64>Next</A
65></TD
66></TR
67></TABLE
68><HR
69ALIGN="LEFT"
70WIDTH="100%"></DIV
71><H1
72><A
73NAME="VIDIOC-G-PRIORITY"
74></A
75>ioctl VIDIOC_G_PRIORITY, VIDIOC_S_PRIORITY</H1
76><DIV
77CLASS="REFNAMEDIV"
78><A
79NAME="AEN11950"
80></A
81><H2
82>Name</H2
83>VIDIOC_G_PRIORITY, VIDIOC_S_PRIORITY&nbsp;--&nbsp;Query or request the access priority associated with a
84file descriptor</DIV
85><DIV
86CLASS="REFSYNOPSISDIV"
87><A
88NAME="AEN11954"
89></A
90><H2
91>Synopsis</H2
92><DIV
93CLASS="FUNCSYNOPSIS"
94><P
95></P
96><A
97NAME="AEN11955"
98></A
99><P
100><CODE
101><CODE
102CLASS="FUNCDEF"
103>int ioctl</CODE
104>(int fd, int request, enum v4l2_priority *argp);</CODE
105></P
106><P
107></P
108></DIV
109><DIV
110CLASS="FUNCSYNOPSIS"
111><P
112></P
113><A
114NAME="AEN11965"
115></A
116><P
117><CODE
118><CODE
119CLASS="FUNCDEF"
120>int ioctl</CODE
121>(int fd, int request, const enum v4l2_priority *argp);</CODE
122></P
123><P
124></P
125></DIV
126></DIV
127><DIV
128CLASS="REFSECT1"
129><A
130NAME="AEN11975"
131></A
132><H2
133>Arguments</H2
134><P
135></P
136><DIV
137CLASS="VARIABLELIST"
138><DL
139><DT
140><CODE
141CLASS="PARAMETER"
142>fd</CODE
143></DT
144><DD
145><P
146>File descriptor returned by <A
147HREF="r14090.htm"
148><CODE
149CLASS="FUNCTION"
150>open()</CODE
151></A
152>.</P
153></DD
154><DT
155><CODE
156CLASS="PARAMETER"
157>request</CODE
158></DT
159><DD
160><P
161>VIDIOC_G_PRIORITY, VIDIOC_S_PRIORITY</P
162></DD
163><DT
164><CODE
165CLASS="PARAMETER"
166>argp</CODE
167></DT
168><DD
169><P
170>Pointer to an enum v4l2_priority type.</P
171></DD
172></DL
173></DIV
174></DIV
175><DIV
176CLASS="REFSECT1"
177><A
178NAME="AEN11995"
179></A
180><H2
181>Description</H2
182><P
183>To query the current access priority
184applications call the <CODE
185CLASS="CONSTANT"
186>VIDIOC_G_PRIORITY</CODE
187> ioctl
188with a pointer to an enum v4l2_priority variable where the driver stores
189the current priority.</P
190><P
191>To request an access priority applications store the
192desired priority in an enum v4l2_priority variable and call
193<CODE
194CLASS="CONSTANT"
195>VIDIOC_S_PRIORITY</CODE
196> ioctl with a pointer to this
197variable.</P
198><DIV
199CLASS="TABLE"
200><A
201NAME="V4L2-PRIORITY"
202></A
203><P
204><B
205>Table 1. enum v4l2_priority</B
206></P
207><TABLE
208BORDER="0"
209FRAME="void"
210WIDTH="100%"
211CLASS="CALSTABLE"
212><COL
213WIDTH="38%"
214TITLE="C1"><COL
215WIDTH="12%"
216TITLE="C2"><COL
217WIDTH="50%"
218TITLE="C3"><TBODY
219VALIGN="TOP"
220><TR
221><TD
222><CODE
223CLASS="CONSTANT"
224>V4L2_PRIORITY_UNSET</CODE
225></TD
226><TD
227>0</TD
228><TD
229>&nbsp;</TD
230></TR
231><TR
232><TD
233><CODE
234CLASS="CONSTANT"
235>V4L2_PRIORITY_BACKGROUND</CODE
236></TD
237><TD
238>1</TD
239><TD
240>Lowest priority, usually applications running in
241background, for example monitoring VBI transmissions. A proxy
242application running in user space will be necessary if multiple
243applications want to read from a device at this priority.</TD
244></TR
245><TR
246><TD
247><CODE
248CLASS="CONSTANT"
249>V4L2_PRIORITY_INTERACTIVE</CODE
250></TD
251><TD
252>2</TD
253><TD
254>&nbsp;</TD
255></TR
256><TR
257><TD
258><CODE
259CLASS="CONSTANT"
260>V4L2_PRIORITY_DEFAULT</CODE
261></TD
262><TD
263>2</TD
264><TD
265>Medium priority, usually applications started and
266interactively controlled by the user. For example TV viewers, Teletext
267browsers, or just "panel" applications to change the channel or video
268controls. This is the default priority unless an application requests
269another.</TD
270></TR
271><TR
272><TD
273><CODE
274CLASS="CONSTANT"
275>V4L2_PRIORITY_RECORD</CODE
276></TD
277><TD
278>3</TD
279><TD
280>Highest priority. Only one file descriptor can have
281this priority, it blocks any other fd from changing device properties.
282Usually applications which must not be interrupted, like video
283recording.</TD
284></TR
285></TBODY
286></TABLE
287></DIV
288></DIV
289><DIV
290CLASS="REFSECT1"
291><A
292NAME="AEN12034"
293></A
294><H2
295>Return Value</H2
296><P
297>On success <SPAN
298CLASS="RETURNVALUE"
299>0</SPAN
300> is returned, on error <SPAN
301CLASS="RETURNVALUE"
302>-1</SPAN
303> and the <CODE
304CLASS="VARNAME"
305>errno</CODE
306> variable is set appropriately:</P
307><P
308></P
309><DIV
310CLASS="VARIABLELIST"
311><DL
312><DT
313><SPAN
314CLASS="ERRORCODE"
315>EINVAL</SPAN
316></DT
317><DD
318><P
319>The requested priority value is invalid, or the
320driver does not support access priorities.</P
321></DD
322><DT
323><SPAN
324CLASS="ERRORCODE"
325>EBUSY</SPAN
326></DT
327><DD
328><P
329>Another application already requested higher
330priority.</P
331></DD
332></DL
333></DIV
334></DIV
335><DIV
336CLASS="NAVFOOTER"
337><HR
338ALIGN="LEFT"
339WIDTH="100%"><TABLE
340SUMMARY="Footer navigation table"
341WIDTH="100%"
342BORDER="0"
343CELLPADDING="0"
344CELLSPACING="0"
345><TR
346><TD
347WIDTH="33%"
348ALIGN="left"
349VALIGN="top"
350><A
351HREF="r11680.htm"
352ACCESSKEY="P"
353>Prev</A
354></TD
355><TD
356WIDTH="34%"
357ALIGN="center"
358VALIGN="top"
359><A
360HREF="book1.htm"
361ACCESSKEY="H"
362>Home</A
363></TD
364><TD
365WIDTH="33%"
366ALIGN="right"
367VALIGN="top"
368><A
369HREF="r12051.htm"
370ACCESSKEY="N"
371>Next</A
372></TD
373></TR
374><TR
375><TD
376WIDTH="33%"
377ALIGN="left"
378VALIGN="top"
379>ioctl VIDIOC_G_PARM, VIDIOC_S_PARM</TD
380><TD
381WIDTH="34%"
382ALIGN="center"
383VALIGN="top"
384><A
385HREF="r7624.htm"
386ACCESSKEY="U"
387>Up</A
388></TD
389><TD
390WIDTH="33%"
391ALIGN="right"
392VALIGN="top"
393>ioctl VIDIOC_G_SLICED_VBI_CAP</TD
394></TR
395></TABLE
396></DIV
397></BODY
398></HTML
399>
400