summaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook/media/v4l/vidioc-g-std.xml
blob: 4a898417de28933cf319d7ea110db3c7365bf199 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<refentry id="vidioc-g-std">
  <refmeta>
    <refentrytitle>ioctl VIDIOC_G_STD, VIDIOC_S_STD</refentrytitle>
    &manvol;
  </refmeta>

  <refnamediv>
    <refname>VIDIOC_G_STD</refname>
    <refname>VIDIOC_S_STD</refname>
    <refpurpose>Query or select the video standard of the current input</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <funcsynopsis>
      <funcprototype>
	<funcdef>int <function>ioctl</function></funcdef>
	<paramdef>int <parameter>fd</parameter></paramdef>
	<paramdef>int <parameter>request</parameter></paramdef>
	<paramdef>v4l2_std_id
*<parameter>argp</parameter></paramdef>
      </funcprototype>
    </funcsynopsis>
    <funcsynopsis>
      <funcprototype>
	<funcdef>int <function>ioctl</function></funcdef>
	<paramdef>int <parameter>fd</parameter></paramdef>
	<paramdef>int <parameter>request</parameter></paramdef>
	<paramdef>const v4l2_std_id
*<parameter>argp</parameter></paramdef>
      </funcprototype>
    </funcsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>Arguments</title>

    <variablelist>
      <varlistentry>
	<term><parameter>fd</parameter></term>
	<listitem>
	  <para>&fd;</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><parameter>request</parameter></term>
	<listitem>
	  <para>VIDIOC_G_STD, VIDIOC_S_STD</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><parameter>argp</parameter></term>
	<listitem>
	  <para></para>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>To query and select the current video standard applications
use the <constant>VIDIOC_G_STD</constant> and <constant>VIDIOC_S_STD</constant> ioctls which take a pointer to a
&v4l2-std-id; type as argument. <constant>VIDIOC_G_STD</constant> can
return a single flag or a set of flags as in &v4l2-standard; field
<structfield>id</structfield>. The flags must be unambiguous such
that they appear in only one enumerated <structname>v4l2_standard</structname> structure.</para>

    <para><constant>VIDIOC_S_STD</constant> accepts one or more
flags, being a write-only ioctl it does not return the actual new standard as
<constant>VIDIOC_G_STD</constant> does. When no flags are given or
the current input does not support the requested standard the driver
returns an &EINVAL;. When the standard set is ambiguous drivers may
return <errorcode>EINVAL</errorcode> or choose any of the requested
standards. If the current input or output does not support standard video timings (e.g. if
&VIDIOC-ENUMINPUT; does not set the <constant>V4L2_IN_CAP_STD</constant> flag), then
&ENODATA; is returned.</para>
  </refsect1>

  <refsect1>
    &return-value;

    <variablelist>
      <varlistentry>
	<term><errorcode>EINVAL</errorcode></term>
	<listitem>
	  <para>The <constant>VIDIOC_S_STD</constant> parameter was unsuitable.</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><errorcode>ENODATA</errorcode></term>
	<listitem>
	  <para>Standard video timings are not supported for this input or output.</para>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>
</refentry>
OpenPOWER on IntegriCloud