• 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_STD, VIDIOC_S_STD</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_SLICED_VBI_CAP"
17HREF="r12051.htm"><LINK
18REL="NEXT"
19TITLE="ioctl VIDIOC_G_TUNER, VIDIOC_S_TUNER"
20HREF="r12342.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="r12051.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="r12342.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-STD"
74></A
75>ioctl VIDIOC_G_STD, VIDIOC_S_STD</H1
76><DIV
77CLASS="REFNAMEDIV"
78><A
79NAME="AEN12269"
80></A
81><H2
82>Name</H2
83>VIDIOC_G_STD, VIDIOC_S_STD&nbsp;--&nbsp;Query or select the video standard of the current input</DIV
84><DIV
85CLASS="REFSYNOPSISDIV"
86><A
87NAME="AEN12273"
88></A
89><H2
90>Synopsis</H2
91><DIV
92CLASS="FUNCSYNOPSIS"
93><P
94></P
95><A
96NAME="AEN12274"
97></A
98><P
99><CODE
100><CODE
101CLASS="FUNCDEF"
102>int ioctl</CODE
103>(int fd, int request, v4l2_std_id
104*argp);</CODE
105></P
106><P
107></P
108></DIV
109><DIV
110CLASS="FUNCSYNOPSIS"
111><P
112></P
113><A
114NAME="AEN12284"
115></A
116><P
117><CODE
118><CODE
119CLASS="FUNCDEF"
120>int ioctl</CODE
121>(int fd, int request, const v4l2_std_id
122*argp);</CODE
123></P
124><P
125></P
126></DIV
127></DIV
128><DIV
129CLASS="REFSECT1"
130><A
131NAME="AEN12294"
132></A
133><H2
134>Arguments</H2
135><P
136></P
137><DIV
138CLASS="VARIABLELIST"
139><DL
140><DT
141><CODE
142CLASS="PARAMETER"
143>fd</CODE
144></DT
145><DD
146><P
147>File descriptor returned by <A
148HREF="r14090.htm"
149><CODE
150CLASS="FUNCTION"
151>open()</CODE
152></A
153>.</P
154></DD
155><DT
156><CODE
157CLASS="PARAMETER"
158>request</CODE
159></DT
160><DD
161><P
162>VIDIOC_G_STD, VIDIOC_S_STD</P
163></DD
164><DT
165><CODE
166CLASS="PARAMETER"
167>argp</CODE
168></DT
169><DD
170><P
171></P
172></DD
173></DL
174></DIV
175></DIV
176><DIV
177CLASS="REFSECT1"
178><A
179NAME="AEN12314"
180></A
181><H2
182>Description</H2
183><P
184>To query and select the current video standard applications
185use the <CODE
186CLASS="CONSTANT"
187>VIDIOC_G_STD</CODE
188> and <CODE
189CLASS="CONSTANT"
190>VIDIOC_S_STD</CODE
191> ioctls which take a pointer to a
192<A
193HREF="r9288.htm#V4L2-STD-ID"
194>v4l2_std_id</A
195> type as argument. <CODE
196CLASS="CONSTANT"
197>VIDIOC_G_STD</CODE
198> can
199return a single flag or a set of flags as in struct&nbsp;<A
200HREF="r9288.htm#V4L2-STANDARD"
201>v4l2_standard</A
202> field
203<CODE
204CLASS="STRUCTFIELD"
205>id</CODE
206>. The flags must be unambiguous such
207that they appear in only one enumerated <CODE
208CLASS="STRUCTNAME"
209>v4l2_standard</CODE
210> structure.</P
211><P
212><CODE
213CLASS="CONSTANT"
214>VIDIOC_S_STD</CODE
215> accepts one or more
216flags, being a write-only ioctl it does not return the actual new standard as
217<CODE
218CLASS="CONSTANT"
219>VIDIOC_G_STD</CODE
220> does. When no flags are given or
221the current input does not support the requested standard the driver
222returns an <SPAN
223CLASS="ERRORCODE"
224>EINVAL</SPAN
225> error code. When the standard set is ambiguous drivers may
226return <SPAN
227CLASS="ERRORCODE"
228>EINVAL</SPAN
229> or choose any of the requested
230standards.</P
231></DIV
232><DIV
233CLASS="REFSECT1"
234><A
235NAME="AEN12329"
236></A
237><H2
238>Return Value</H2
239><P
240>On success <SPAN
241CLASS="RETURNVALUE"
242>0</SPAN
243> is returned, on error <SPAN
244CLASS="RETURNVALUE"
245>-1</SPAN
246> and the <CODE
247CLASS="VARNAME"
248>errno</CODE
249> variable is set appropriately:</P
250><P
251></P
252><DIV
253CLASS="VARIABLELIST"
254><DL
255><DT
256><SPAN
257CLASS="ERRORCODE"
258>EINVAL</SPAN
259></DT
260><DD
261><P
262>This ioctl is not supported, or the
263<CODE
264CLASS="CONSTANT"
265>VIDIOC_S_STD</CODE
266> parameter was unsuitable.</P
267></DD
268></DL
269></DIV
270></DIV
271><DIV
272CLASS="NAVFOOTER"
273><HR
274ALIGN="LEFT"
275WIDTH="100%"><TABLE
276SUMMARY="Footer navigation table"
277WIDTH="100%"
278BORDER="0"
279CELLPADDING="0"
280CELLSPACING="0"
281><TR
282><TD
283WIDTH="33%"
284ALIGN="left"
285VALIGN="top"
286><A
287HREF="r12051.htm"
288ACCESSKEY="P"
289>Prev</A
290></TD
291><TD
292WIDTH="34%"
293ALIGN="center"
294VALIGN="top"
295><A
296HREF="book1.htm"
297ACCESSKEY="H"
298>Home</A
299></TD
300><TD
301WIDTH="33%"
302ALIGN="right"
303VALIGN="top"
304><A
305HREF="r12342.htm"
306ACCESSKEY="N"
307>Next</A
308></TD
309></TR
310><TR
311><TD
312WIDTH="33%"
313ALIGN="left"
314VALIGN="top"
315>ioctl VIDIOC_G_SLICED_VBI_CAP</TD
316><TD
317WIDTH="34%"
318ALIGN="center"
319VALIGN="top"
320><A
321HREF="r7624.htm"
322ACCESSKEY="U"
323>Up</A
324></TD
325><TD
326WIDTH="33%"
327ALIGN="right"
328VALIGN="top"
329>ioctl VIDIOC_G_TUNER, VIDIOC_S_TUNER</TD
330></TR
331></TABLE
332></DIV
333></BODY
334></HTML
335>
336