1<refentry id="vidioc-g-std">
2  <refmeta>
3    <refentrytitle>ioctl VIDIOC_G_STD, VIDIOC_S_STD</refentrytitle>
4    &manvol;
5  </refmeta>
6
7  <refnamediv>
8    <refname>VIDIOC_G_STD</refname>
9    <refname>VIDIOC_S_STD</refname>
10    <refpurpose>Query or select the video standard of the current input</refpurpose>
11  </refnamediv>
12
13  <refsynopsisdiv>
14    <funcsynopsis>
15      <funcprototype>
16	<funcdef>int <function>ioctl</function></funcdef>
17	<paramdef>int <parameter>fd</parameter></paramdef>
18	<paramdef>int <parameter>request</parameter></paramdef>
19	<paramdef>v4l2_std_id
20*<parameter>argp</parameter></paramdef>
21      </funcprototype>
22    </funcsynopsis>
23    <funcsynopsis>
24      <funcprototype>
25	<funcdef>int <function>ioctl</function></funcdef>
26	<paramdef>int <parameter>fd</parameter></paramdef>
27	<paramdef>int <parameter>request</parameter></paramdef>
28	<paramdef>const v4l2_std_id
29*<parameter>argp</parameter></paramdef>
30      </funcprototype>
31    </funcsynopsis>
32  </refsynopsisdiv>
33
34  <refsect1>
35    <title>Arguments</title>
36
37    <variablelist>
38      <varlistentry>
39	<term><parameter>fd</parameter></term>
40	<listitem>
41	  <para>&fd;</para>
42	</listitem>
43      </varlistentry>
44      <varlistentry>
45	<term><parameter>request</parameter></term>
46	<listitem>
47	  <para>VIDIOC_G_STD, VIDIOC_S_STD</para>
48	</listitem>
49      </varlistentry>
50      <varlistentry>
51	<term><parameter>argp</parameter></term>
52	<listitem>
53	  <para></para>
54	</listitem>
55      </varlistentry>
56    </variablelist>
57  </refsect1>
58
59  <refsect1>
60    <title>Description</title>
61
62    <para>To query and select the current video standard applications
63use the <constant>VIDIOC_G_STD</constant> and <constant>VIDIOC_S_STD</constant> ioctls which take a pointer to a
64&v4l2-std-id; type as argument. <constant>VIDIOC_G_STD</constant> can
65return a single flag or a set of flags as in &v4l2-standard; field
66<structfield>id</structfield>. The flags must be unambiguous such
67that they appear in only one enumerated <structname>v4l2_standard</structname> structure.</para>
68
69    <para><constant>VIDIOC_S_STD</constant> accepts one or more
70flags, being a write-only ioctl it does not return the actual new standard as
71<constant>VIDIOC_G_STD</constant> does. When no flags are given or
72the current input does not support the requested standard the driver
73returns an &EINVAL;. When the standard set is ambiguous drivers may
74return <errorcode>EINVAL</errorcode> or choose any of the requested
75standards. If the current input or output does not support standard video timings (e.g. if
76&VIDIOC-ENUMINPUT; does not set the <constant>V4L2_IN_CAP_STD</constant> flag), then
77&ENODATA; is returned.</para>
78  </refsect1>
79
80  <refsect1>
81    &return-value;
82
83    <variablelist>
84      <varlistentry>
85	<term><errorcode>EINVAL</errorcode></term>
86	<listitem>
87	  <para>The <constant>VIDIOC_S_STD</constant> parameter was unsuitable.</para>
88	</listitem>
89      </varlistentry>
90      <varlistentry>
91	<term><errorcode>ENODATA</errorcode></term>
92	<listitem>
93	  <para>Standard video timings are not supported for this input or output.</para>
94	</listitem>
95      </varlistentry>
96    </variablelist>
97  </refsect1>
98</refentry>
99