About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog

Documentation / DocBook / media / v4l / vidioc-querystd.xml


Based on kernel version 4.7.2. Page generated on 2016-08-22 22:45 EST.

1	<refentry id="vidioc-querystd">
2	  <refmeta>
3	    <refentrytitle>ioctl VIDIOC_QUERYSTD</refentrytitle>
4	    &manvol;
5	  </refmeta>
6	
7	  <refnamediv>
8	    <refname>VIDIOC_QUERYSTD</refname>
9	    <refpurpose>Sense the video standard received by the current
10	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 *<parameter>argp</parameter></paramdef>
20	      </funcprototype>
21	    </funcsynopsis>
22	  </refsynopsisdiv>
23	
24	  <refsect1>
25	    <title>Arguments</title>
26	
27	    <variablelist>
28		<varlistentry>
29		<term><parameter>fd</parameter></term>
30		<listitem>
31		  <para>&fd;</para>
32		</listitem>
33	      </varlistentry>
34	      <varlistentry>
35		<term><parameter>request</parameter></term>
36		<listitem>
37		  <para>VIDIOC_QUERYSTD</para>
38		</listitem>
39	      </varlistentry>
40	      <varlistentry>
41		<term><parameter>argp</parameter></term>
42		<listitem>
43		  <para></para>
44		</listitem>
45	      </varlistentry>
46	    </variablelist>
47	  </refsect1>
48	
49	  <refsect1>
50	    <title>Description</title>
51	
52	    <para>The hardware may be able to detect the current video
53	standard automatically. To do so, applications call <constant>
54	VIDIOC_QUERYSTD</constant> with a pointer to a &v4l2-std-id; type. The
55	driver stores here a set of candidates, this can be a single flag or a
56	set of supported standards if for example the hardware can only
57	distinguish between 50 and 60 Hz systems. If no signal was detected,
58	then the driver will return V4L2_STD_UNKNOWN. When detection is not
59	possible or fails, the set must contain all standards supported by the
60	current video input or output.</para>
61	
62	<para>Please note that drivers shall <emphasis>not</emphasis> switch the video standard
63	automatically if a new video standard is detected. Instead, drivers should send the
64	<constant>V4L2_EVENT_SOURCE_CHANGE</constant> event (if they support this) and expect
65	that userspace will take action by calling <constant>VIDIOC_QUERYSTD</constant>.
66	The reason is that a new video standard can mean different buffer sizes as well, and you
67	cannot change buffer sizes on the fly. In general, applications that receive the
68	Source Change event will have to call <constant>VIDIOC_QUERYSTD</constant>,
69	and if the detected video standard is valid they will have to stop streaming, set the new
70	standard, allocate new buffers and start streaming again.</para>
71	
72	  </refsect1>
73	
74	  <refsect1>
75	    &return-value;
76	    <variablelist>
77	      <varlistentry>
78		<term><errorcode>ENODATA</errorcode></term>
79		<listitem>
80		  <para>Standard video timings are not supported for this input or output.</para>
81		</listitem>
82	      </varlistentry>
83	    </variablelist>
84	  </refsect1>
85	</refentry>
Hide Line Numbers


About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog