• 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_OUTPUT, VIDIOC_S_OUTPUT</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_MODULATOR, VIDIOC_S_MODULATOR"
17HREF="r11430.htm"><LINK
18REL="NEXT"
19TITLE="ioctl VIDIOC_G_PARM, VIDIOC_S_PARM"
20HREF="r11680.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="r11430.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="r11680.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-OUTPUT"
74></A
75>ioctl VIDIOC_G_OUTPUT, VIDIOC_S_OUTPUT</H1
76><DIV
77CLASS="REFNAMEDIV"
78><A
79NAME="AEN11616"
80></A
81><H2
82>Name</H2
83>VIDIOC_G_OUTPUT, VIDIOC_S_OUTPUT&nbsp;--&nbsp;Query or select the current video output</DIV
84><DIV
85CLASS="REFSYNOPSISDIV"
86><A
87NAME="AEN11620"
88></A
89><H2
90>Synopsis</H2
91><DIV
92CLASS="FUNCSYNOPSIS"
93><P
94></P
95><A
96NAME="AEN11621"
97></A
98><P
99><CODE
100><CODE
101CLASS="FUNCDEF"
102>int ioctl</CODE
103>(int fd, int request, int *argp);</CODE
104></P
105><P
106></P
107></DIV
108></DIV
109><DIV
110CLASS="REFSECT1"
111><A
112NAME="AEN11631"
113></A
114><H2
115>Arguments</H2
116><P
117></P
118><DIV
119CLASS="VARIABLELIST"
120><DL
121><DT
122><CODE
123CLASS="PARAMETER"
124>fd</CODE
125></DT
126><DD
127><P
128>File descriptor returned by <A
129HREF="r14090.htm"
130><CODE
131CLASS="FUNCTION"
132>open()</CODE
133></A
134>.</P
135></DD
136><DT
137><CODE
138CLASS="PARAMETER"
139>request</CODE
140></DT
141><DD
142><P
143>VIDIOC_G_OUTPUT, VIDIOC_S_OUTPUT</P
144></DD
145><DT
146><CODE
147CLASS="PARAMETER"
148>argp</CODE
149></DT
150><DD
151><P
152></P
153></DD
154></DL
155></DIV
156></DIV
157><DIV
158CLASS="REFSECT1"
159><A
160NAME="AEN11651"
161></A
162><H2
163>Description</H2
164><P
165>To query the current video output applications call the
166<CODE
167CLASS="CONSTANT"
168>VIDIOC_G_OUTPUT</CODE
169> ioctl with a pointer to an integer
170where the driver stores the number of the output, as in the
171struct&nbsp;<A
172HREF="r9149.htm#V4L2-OUTPUT"
173>v4l2_output</A
174> <CODE
175CLASS="STRUCTFIELD"
176>index</CODE
177> field. This ioctl
178will fail only when there are no video outputs, returning the
179<SPAN
180CLASS="ERRORCODE"
181>EINVAL</SPAN
182> error code.</P
183><P
184>To select a video output applications store the number of the
185desired output in an integer and call the
186<CODE
187CLASS="CONSTANT"
188>VIDIOC_S_OUTPUT</CODE
189> ioctl with a pointer to this integer.
190Side effects are possible. For example outputs may support different
191video standards, so the driver may implicitly switch the current
192standard. It is good practice to select an output before querying or
193negotiating any other parameters.</P
194><P
195>Information about video outputs is available using the
196<A
197HREF="r9149.htm"
198><CODE
199CLASS="CONSTANT"
200>VIDIOC_ENUMOUTPUT</CODE
201></A
202> ioctl.</P
203></DIV
204><DIV
205CLASS="REFSECT1"
206><A
207NAME="AEN11663"
208></A
209><H2
210>Return Value</H2
211><P
212>On success <SPAN
213CLASS="RETURNVALUE"
214>0</SPAN
215> is returned, on error <SPAN
216CLASS="RETURNVALUE"
217>-1</SPAN
218> and the <CODE
219CLASS="VARNAME"
220>errno</CODE
221> variable is set appropriately:</P
222><P
223></P
224><DIV
225CLASS="VARIABLELIST"
226><DL
227><DT
228><SPAN
229CLASS="ERRORCODE"
230>EINVAL</SPAN
231></DT
232><DD
233><P
234>The number of the video output is out of bounds, or
235there are no video outputs at all and this ioctl is not
236supported.</P
237></DD
238><DT
239><SPAN
240CLASS="ERRORCODE"
241>EBUSY</SPAN
242></DT
243><DD
244><P
245>I/O is in progress, the output cannot be
246switched.</P
247></DD
248></DL
249></DIV
250></DIV
251><DIV
252CLASS="NAVFOOTER"
253><HR
254ALIGN="LEFT"
255WIDTH="100%"><TABLE
256SUMMARY="Footer navigation table"
257WIDTH="100%"
258BORDER="0"
259CELLPADDING="0"
260CELLSPACING="0"
261><TR
262><TD
263WIDTH="33%"
264ALIGN="left"
265VALIGN="top"
266><A
267HREF="r11430.htm"
268ACCESSKEY="P"
269>Prev</A
270></TD
271><TD
272WIDTH="34%"
273ALIGN="center"
274VALIGN="top"
275><A
276HREF="book1.htm"
277ACCESSKEY="H"
278>Home</A
279></TD
280><TD
281WIDTH="33%"
282ALIGN="right"
283VALIGN="top"
284><A
285HREF="r11680.htm"
286ACCESSKEY="N"
287>Next</A
288></TD
289></TR
290><TR
291><TD
292WIDTH="33%"
293ALIGN="left"
294VALIGN="top"
295>ioctl VIDIOC_G_MODULATOR, VIDIOC_S_MODULATOR</TD
296><TD
297WIDTH="34%"
298ALIGN="center"
299VALIGN="top"
300><A
301HREF="r7624.htm"
302ACCESSKEY="U"
303>Up</A
304></TD
305><TD
306WIDTH="33%"
307ALIGN="right"
308VALIGN="top"
309>ioctl VIDIOC_G_PARM, VIDIOC_S_PARM</TD
310></TR
311></TABLE
312></DIV
313></BODY
314></HTML
315>
316