• 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_ENUMOUTPUT</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_ENUMINPUT"
17HREF="r8936.htm"><LINK
18REL="NEXT"
19TITLE="ioctl VIDIOC_ENUMSTD"
20HREF="r9288.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="r8936.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="r9288.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-ENUMOUTPUT"
74></A
75>ioctl VIDIOC_ENUMOUTPUT</H1
76><DIV
77CLASS="REFNAMEDIV"
78><A
79NAME="AEN9153"
80></A
81><H2
82>Name</H2
83>VIDIOC_ENUMOUTPUT&nbsp;--&nbsp;Enumerate video outputs</DIV
84><DIV
85CLASS="REFSYNOPSISDIV"
86><A
87NAME="AEN9156"
88></A
89><H2
90>Synopsis</H2
91><DIV
92CLASS="FUNCSYNOPSIS"
93><P
94></P
95><A
96NAME="AEN9157"
97></A
98><P
99><CODE
100><CODE
101CLASS="FUNCDEF"
102>int ioctl</CODE
103>(int fd, int request, struct v4l2_output *argp);</CODE
104></P
105><P
106></P
107></DIV
108></DIV
109><DIV
110CLASS="REFSECT1"
111><A
112NAME="AEN9167"
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_ENUMOUTPUT</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="AEN9187"
161></A
162><H2
163>Description</H2
164><P
165>To query the attributes of a video outputs applications
166initialize the <CODE
167CLASS="STRUCTFIELD"
168>index</CODE
169> field of struct&nbsp;<A
170HREF="r9149.htm#V4L2-OUTPUT"
171>v4l2_output</A
172>
173and call the <CODE
174CLASS="CONSTANT"
175>VIDIOC_ENUMOUTPUT</CODE
176> ioctl with a
177pointer to this structure. Drivers fill the rest of the structure or
178return an <SPAN
179CLASS="ERRORCODE"
180>EINVAL</SPAN
181> error code when the index is out of bounds. To enumerate all
182outputs applications shall begin at index zero, incrementing by one
183until the driver returns <SPAN
184CLASS="ERRORCODE"
185>EINVAL</SPAN
186>.</P
187><DIV
188CLASS="TABLE"
189><A
190NAME="V4L2-OUTPUT"
191></A
192><P
193><B
194>Table 1. struct <CODE
195CLASS="STRUCTNAME"
196>v4l2_output</CODE
197></B
198></P
199><TABLE
200BORDER="0"
201FRAME="void"
202WIDTH="100%"
203CLASS="CALSTABLE"
204><COL
205WIDTH="25%"
206TITLE="C1"><COL
207WIDTH="25%"
208TITLE="C2"><COL
209WIDTH="50%"
210TITLE="C3"><TBODY
211VALIGN="TOP"
212><TR
213><TD
214>__u32</TD
215><TD
216><CODE
217CLASS="STRUCTFIELD"
218>index</CODE
219></TD
220><TD
221>Identifies the output, set by the
222application.</TD
223></TR
224><TR
225><TD
226>__u8</TD
227><TD
228><CODE
229CLASS="STRUCTFIELD"
230>name</CODE
231>[32]</TD
232><TD
233>Name of the video output, a NUL-terminated ASCII
234string, for example: "Vout". This information is intended for the
235user, preferably the connector label on the device itself.</TD
236></TR
237><TR
238><TD
239>__u32</TD
240><TD
241><CODE
242CLASS="STRUCTFIELD"
243>type</CODE
244></TD
245><TD
246>Type of the output, see <A
247HREF="r9149.htm#OUTPUT-TYPE"
248>Table 2</A
249>.</TD
250></TR
251><TR
252><TD
253>__u32</TD
254><TD
255><CODE
256CLASS="STRUCTFIELD"
257>audioset</CODE
258></TD
259><TD
260><P
261>Drivers can enumerate up to 32 video and
262audio outputs. This field shows which audio outputs were
263selectable as the current output if this was the currently selected
264video output. It is a bit mask. The LSB corresponds to audio output 0,
265the MSB to output 31. Any number of bits can be set, or
266none.</P
267><P
268>When the driver does not enumerate audio outputs no
269bits must be set. Applications shall not interpret this as lack of
270audio support. Drivers may automatically select audio outputs without
271enumerating them.</P
272><P
273>For details on audio outputs and how to
274select the current output see <A
275HREF="x341.htm"
276>Section 1.5</A
277>.</P
278></TD
279></TR
280><TR
281><TD
282>__u32</TD
283><TD
284><CODE
285CLASS="STRUCTFIELD"
286>modulator</CODE
287></TD
288><TD
289>Output devices can have zero or more RF modulators.
290When the <CODE
291CLASS="STRUCTFIELD"
292>type</CODE
293> is
294<CODE
295CLASS="CONSTANT"
296>V4L2_OUTPUT_TYPE_MODULATOR</CODE
297> this is an RF
298connector and this field identifies the modulator. It corresponds to
299struct&nbsp;<A
300HREF="r11430.htm#V4L2-MODULATOR"
301>v4l2_modulator</A
302> field <CODE
303CLASS="STRUCTFIELD"
304>index</CODE
305>. For details
306on modulators see <A
307HREF="x394.htm"
308>Section 1.6</A
309>.</TD
310></TR
311><TR
312><TD
313><A
314HREF="r9288.htm#V4L2-STD-ID"
315>v4l2_std_id</A
316></TD
317><TD
318><CODE
319CLASS="STRUCTFIELD"
320>std</CODE
321></TD
322><TD
323>Every video output supports one or more different
324video standards. This field is a set of all supported standards. For
325details on video standards and how to switch see <A
326HREF="x448.htm"
327>Section 1.7</A
328>.</TD
329></TR
330><TR
331><TD
332>__u32</TD
333><TD
334><CODE
335CLASS="STRUCTFIELD"
336>reserved</CODE
337>[4]</TD
338><TD
339>Reserved for future extensions. Drivers must set
340the array to zero.</TD
341></TR
342></TBODY
343></TABLE
344></DIV
345><DIV
346CLASS="TABLE"
347><A
348NAME="OUTPUT-TYPE"
349></A
350><P
351><B
352>Table 2. Output Type</B
353></P
354><TABLE
355BORDER="0"
356FRAME="void"
357WIDTH="100%"
358CLASS="CALSTABLE"
359><COL
360WIDTH="38%"
361TITLE="C1"><COL
362WIDTH="12%"
363TITLE="C2"><COL
364WIDTH="50%"
365TITLE="C3"><TBODY
366VALIGN="TOP"
367><TR
368><TD
369><CODE
370CLASS="CONSTANT"
371>V4L2_OUTPUT_TYPE_MODULATOR</CODE
372></TD
373><TD
374>1</TD
375><TD
376>This output is an analog TV modulator.</TD
377></TR
378><TR
379><TD
380><CODE
381CLASS="CONSTANT"
382>V4L2_OUTPUT_TYPE_ANALOG</CODE
383></TD
384><TD
385>2</TD
386><TD
387>Analog baseband output, for example Composite /
388CVBS, S-Video, RGB.</TD
389></TR
390><TR
391><TD
392><CODE
393CLASS="CONSTANT"
394>V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY</CODE
395></TD
396><TD
397>3</TD
398><TD
399>[?]</TD
400></TR
401></TBODY
402></TABLE
403></DIV
404></DIV
405><DIV
406CLASS="REFSECT1"
407><A
408NAME="AEN9274"
409></A
410><H2
411>Return Value</H2
412><P
413>On success <SPAN
414CLASS="RETURNVALUE"
415>0</SPAN
416> is returned, on error <SPAN
417CLASS="RETURNVALUE"
418>-1</SPAN
419> and the <CODE
420CLASS="VARNAME"
421>errno</CODE
422> variable is set appropriately:</P
423><P
424></P
425><DIV
426CLASS="VARIABLELIST"
427><DL
428><DT
429><SPAN
430CLASS="ERRORCODE"
431>EINVAL</SPAN
432></DT
433><DD
434><P
435>The struct&nbsp;<A
436HREF="r9149.htm#V4L2-OUTPUT"
437>v4l2_output</A
438> <CODE
439CLASS="STRUCTFIELD"
440>index</CODE
441>
442is out of bounds.</P
443></DD
444></DL
445></DIV
446></DIV
447><DIV
448CLASS="NAVFOOTER"
449><HR
450ALIGN="LEFT"
451WIDTH="100%"><TABLE
452SUMMARY="Footer navigation table"
453WIDTH="100%"
454BORDER="0"
455CELLPADDING="0"
456CELLSPACING="0"
457><TR
458><TD
459WIDTH="33%"
460ALIGN="left"
461VALIGN="top"
462><A
463HREF="r8936.htm"
464ACCESSKEY="P"
465>Prev</A
466></TD
467><TD
468WIDTH="34%"
469ALIGN="center"
470VALIGN="top"
471><A
472HREF="book1.htm"
473ACCESSKEY="H"
474>Home</A
475></TD
476><TD
477WIDTH="33%"
478ALIGN="right"
479VALIGN="top"
480><A
481HREF="r9288.htm"
482ACCESSKEY="N"
483>Next</A
484></TD
485></TR
486><TR
487><TD
488WIDTH="33%"
489ALIGN="left"
490VALIGN="top"
491>ioctl VIDIOC_ENUMINPUT</TD
492><TD
493WIDTH="34%"
494ALIGN="center"
495VALIGN="top"
496><A
497HREF="r7624.htm"
498ACCESSKEY="U"
499>Up</A
500></TD
501><TD
502WIDTH="33%"
503ALIGN="right"
504VALIGN="top"
505>ioctl VIDIOC_ENUMSTD</TD
506></TR
507></TABLE
508></DIV
509></BODY
510></HTML
511>
512