1 <refentry id="vidioc-querystd">
3 <refentrytitle>ioctl VIDIOC_QUERYSTD</refentrytitle>
8 <refname>VIDIOC_QUERYSTD</refname>
9 <refpurpose>Sense the video standard received by the current
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>
25 <title>Arguments</title>
29 <term><parameter>fd</parameter></term>
35 <term><parameter>request</parameter></term>
37 <para>VIDIOC_QUERYSTD</para>
41 <term><parameter>argp</parameter></term>
50 <title>Description</title>
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>
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>
78 <term><errorcode>ENODATA</errorcode></term>
80 <para>Standard video timings are not supported for this input or output.</para>