diff options
Diffstat (limited to 'Documentation/DocBook/media/v4l/common.xml')
-rw-r--r-- | Documentation/DocBook/media/v4l/common.xml | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/Documentation/DocBook/media/v4l/common.xml b/Documentation/DocBook/media/v4l/common.xml index b91d25313b63..73c6847436c9 100644 --- a/Documentation/DocBook/media/v4l/common.xml +++ b/Documentation/DocBook/media/v4l/common.xml | |||
@@ -564,7 +564,7 @@ automatically.</para> | |||
564 | <para>To query and select the standard used by the current video | 564 | <para>To query and select the standard used by the current video |
565 | input or output applications call the &VIDIOC-G-STD; and | 565 | input or output applications call the &VIDIOC-G-STD; and |
566 | &VIDIOC-S-STD; ioctl, respectively. The <emphasis>received</emphasis> | 566 | &VIDIOC-S-STD; ioctl, respectively. The <emphasis>received</emphasis> |
567 | standard can be sensed with the &VIDIOC-QUERYSTD; ioctl. Note parameter of all these ioctls is a pointer to a &v4l2-std-id; type (a standard set), <emphasis>not</emphasis> an index into the standard enumeration.<footnote> | 567 | standard can be sensed with the &VIDIOC-QUERYSTD; ioctl. Note that the parameter of all these ioctls is a pointer to a &v4l2-std-id; type (a standard set), <emphasis>not</emphasis> an index into the standard enumeration.<footnote> |
568 | <para>An alternative to the current scheme is to use pointers | 568 | <para>An alternative to the current scheme is to use pointers |
569 | to indices as arguments of <constant>VIDIOC_G_STD</constant> and | 569 | to indices as arguments of <constant>VIDIOC_G_STD</constant> and |
570 | <constant>VIDIOC_S_STD</constant>, the &v4l2-input; and | 570 | <constant>VIDIOC_S_STD</constant>, the &v4l2-input; and |
@@ -588,30 +588,28 @@ switch to a standard by &v4l2-std-id;.</para> | |||
588 | </footnote> Drivers must implement all video standard ioctls | 588 | </footnote> Drivers must implement all video standard ioctls |
589 | when the device has one or more video inputs or outputs.</para> | 589 | when the device has one or more video inputs or outputs.</para> |
590 | 590 | ||
591 | <para>Special rules apply to USB cameras where the notion of video | 591 | <para>Special rules apply to devices such as USB cameras where the notion of video |
592 | standards makes little sense. More generally any capture device, | 592 | standards makes little sense. More generally for any capture or output device |
593 | output devices accordingly, which is <itemizedlist> | 593 | which is: <itemizedlist> |
594 | <listitem> | 594 | <listitem> |
595 | <para>incapable of capturing fields or frames at the nominal | 595 | <para>incapable of capturing fields or frames at the nominal |
596 | rate of the video standard, or</para> | 596 | rate of the video standard, or</para> |
597 | </listitem> | 597 | </listitem> |
598 | <listitem> | 598 | <listitem> |
599 | <para>where <link linkend="buffer">timestamps</link> refer | 599 | <para>that does not support the video standard formats at all.</para> |
600 | to the instant the field or frame was received by the driver, not the | ||
601 | capture time, or</para> | ||
602 | </listitem> | ||
603 | <listitem> | ||
604 | <para>where <link linkend="buffer">sequence numbers</link> | ||
605 | refer to the frames received by the driver, not the captured | ||
606 | frames.</para> | ||
607 | </listitem> | 600 | </listitem> |
608 | </itemizedlist> Here the driver shall set the | 601 | </itemizedlist> Here the driver shall set the |
609 | <structfield>std</structfield> field of &v4l2-input; and &v4l2-output; | 602 | <structfield>std</structfield> field of &v4l2-input; and &v4l2-output; |
610 | to zero, the <constant>VIDIOC_G_STD</constant>, | 603 | to zero and the <constant>VIDIOC_G_STD</constant>, |
611 | <constant>VIDIOC_S_STD</constant>, | 604 | <constant>VIDIOC_S_STD</constant>, |
612 | <constant>VIDIOC_QUERYSTD</constant> and | 605 | <constant>VIDIOC_QUERYSTD</constant> and |
613 | <constant>VIDIOC_ENUMSTD</constant> ioctls shall return the | 606 | <constant>VIDIOC_ENUMSTD</constant> ioctls shall return the |
614 | &EINVAL;.<footnote> | 607 | &ENOTTY;.<footnote> |
608 | <para>See <xref linkend="buffer" /> for a rationale.</para> | ||
609 | <para>Applications can make use of the <xref linkend="input-capabilities" /> and | ||
610 | <xref linkend="output-capabilities"/> flags to determine whether the video standard ioctls | ||
611 | are available for the device.</para> | ||
612 | &ENOTTY;. | ||
615 | <para>See <xref linkend="buffer" /> for a rationale. Probably | 613 | <para>See <xref linkend="buffer" /> for a rationale. Probably |
616 | even USB cameras follow some well known video standard. It might have | 614 | even USB cameras follow some well known video standard. It might have |
617 | been better to explicitly indicate elsewhere if a device cannot live | 615 | been better to explicitly indicate elsewhere if a device cannot live |
@@ -626,9 +624,9 @@ up to normal expectations, instead of this exception.</para> | |||
626 | &v4l2-standard; standard; | 624 | &v4l2-standard; standard; |
627 | 625 | ||
628 | if (-1 == ioctl (fd, &VIDIOC-G-STD;, &std_id)) { | 626 | if (-1 == ioctl (fd, &VIDIOC-G-STD;, &std_id)) { |
629 | /* Note when VIDIOC_ENUMSTD always returns EINVAL this | 627 | /* Note when VIDIOC_ENUMSTD always returns ENOTTY this |
630 | is no video device or it falls under the USB exception, | 628 | is no video device or it falls under the USB exception, |
631 | and VIDIOC_G_STD returning EINVAL is no error. */ | 629 | and VIDIOC_G_STD returning ENOTTY is no error. */ |
632 | 630 | ||
633 | perror ("VIDIOC_G_STD"); | 631 | perror ("VIDIOC_G_STD"); |
634 | exit (EXIT_FAILURE); | 632 | exit (EXIT_FAILURE); |