2016-06-30 21:18:56 +08:00
|
|
|
.. -*- coding: utf-8; mode: rst -*-
|
|
|
|
|
2016-07-02 00:42:29 +08:00
|
|
|
.. _VIDIOC_ENUMSTD:
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
********************
|
|
|
|
ioctl VIDIOC_ENUMSTD
|
|
|
|
********************
|
|
|
|
|
2016-07-06 02:14:35 +08:00
|
|
|
Name
|
2016-07-05 18:58:48 +08:00
|
|
|
====
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-07-05 18:58:48 +08:00
|
|
|
VIDIOC_ENUMSTD - Enumerate supported video standards
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-07-06 02:14:35 +08:00
|
|
|
|
|
|
|
Synopsis
|
2016-06-30 21:18:56 +08:00
|
|
|
========
|
|
|
|
|
2016-08-20 03:53:38 +08:00
|
|
|
.. c:function:: int ioctl( int fd, VIDIOC_ENUMSTD, struct v4l2_standard *argp )
|
|
|
|
:name: VIDIOC_ENUMSTD
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-07-05 18:58:48 +08:00
|
|
|
|
2016-07-06 02:14:35 +08:00
|
|
|
Arguments
|
2016-06-30 21:18:56 +08:00
|
|
|
=========
|
|
|
|
|
|
|
|
``fd``
|
|
|
|
File descriptor returned by :ref:`open() <func-open>`.
|
|
|
|
|
|
|
|
``argp``
|
2017-09-02 21:54:48 +08:00
|
|
|
Pointer to struct :c:type:`v4l2_standard`.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
|
2016-07-06 02:14:35 +08:00
|
|
|
Description
|
2016-06-30 21:18:56 +08:00
|
|
|
===========
|
|
|
|
|
|
|
|
To query the attributes of a video standard, especially a custom (driver
|
|
|
|
defined) one, applications initialize the ``index`` field of struct
|
2016-08-30 04:37:59 +08:00
|
|
|
:c:type:`v4l2_standard` and call the :ref:`VIDIOC_ENUMSTD`
|
2016-06-30 21:18:56 +08:00
|
|
|
ioctl with a pointer to this structure. Drivers fill the rest of the
|
2016-07-03 22:53:09 +08:00
|
|
|
structure or return an ``EINVAL`` error code when the index is out of
|
2016-06-30 21:18:56 +08:00
|
|
|
bounds. To enumerate all standards applications shall begin at index
|
2016-07-03 22:53:09 +08:00
|
|
|
zero, incrementing by one until the driver returns ``EINVAL``. Drivers may
|
2016-06-30 21:18:56 +08:00
|
|
|
enumerate a different set of standards after switching the video input
|
2016-07-13 02:15:23 +08:00
|
|
|
or output. [#f1]_
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
|
2016-08-30 04:37:59 +08:00
|
|
|
.. c:type:: v4l2_standard
|
2016-06-30 21:18:56 +08:00
|
|
|
|
[media] docs-rst: add tabularcolumns to all tables
LaTeX doesn't handle too well auto-width on tables, and ReST
markup requires an special tag to give it the needed hints.
As we're using A4 paper, we have 17cm of useful spaces. As
most media tables have widths, let's use it to generate the
needed via the following perl script:
my ($line_size, $table_header, $has_cols) = (17.5, 0, 0);
my $out;
my $header = "";
my @widths = ();
sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) }
while (<>) {
if (!$table_header) {
$has_cols = 1 if (m/..\s+tabularcolumns::/);
if (m/..\s+flat-table::/) {
$table_header = 1;
$header = $_;
next;
}
$out .= $_;
next;
}
$header .= $_;
@widths = split(/ /, $1) if (m/:widths:\s+(.*)/);
if (m/^\n$/) {
if (!$has_cols && @widths) {
my ($tot, $t, $i) = (0, 0, 0);
foreach my $v(@widths) { $tot += $v; };
$out .= ".. tabularcolumns:: |";
for ($i = 0; $i < scalar @widths - 1; $i++) {
my $v = $widths[$i];
my $w = round(10 * ($v * $line_size) / $tot) / 10;
$out .= sprintf "p{%.1fcm}|", $w;
$t += $w;
}
my $w = $line_size - $t;
$out .= sprintf "p{%.1fcm}|\n\n", $w;
}
$out .= $header;
$table_header = 0;
$has_cols = 0;
$header = "";
@widths = ();
}
}
print $out;
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-17 19:14:19 +08:00
|
|
|
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
|
|
|
|
|
2016-06-30 21:18:56 +08:00
|
|
|
.. flat-table:: struct v4l2_standard
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
|
|
|
:widths: 1 1 2
|
|
|
|
|
[media] v4l: doc: Remove row numbers from tables
Shorten the tables by removing row numbers in comments, allowing for
later insertion of rows with minimal diffs.
All changes have been generated by the following script.
import io
import re
import sys
def process_table(fname, data):
if fname.endswith('hist-v4l2.rst'):
data = re.sub(u'\n{1,2}\t( ?) -( ?) ?', u'\n\t\\1 -\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n(\t| )- \.\. row [0-9]+\n\t ?-( ?) ?', u'\\1* -\\2', data, flags = re.MULTILINE)
else:
data = re.sub(u'\n{1,2} -( ?) ?', u'\n -\\1', data, flags = re.MULTILINE)
data = re.sub(u'(\n?)(\n\n - \.\. row 1\n)', u'\n\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n -( ?) ?', u' * -\\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n \.\. (_[A-Z0-9_`-]*:)', u'\n - .. \\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. (_[A-Z0-9_`-]*:)\n -', u' * .. \\1\n\n -', data, flags = re.MULTILINE)
data = re.sub(u'^ - ', u' -', data, flags = re.MULTILINE)
data = re.sub(u'^(\t{1,2}) ', u'\\1', data, flags = re.MULTILINE)
return data
def process_file(fname, data):
buf = io.StringIO(data)
output = ''
in_table = False
table_separator = 0
for line in buf.readlines():
if line.find('.. flat-table::') != -1:
in_table = True
table = ''
elif in_table and not re.match('^[\t\n]|( )', line):
in_table = False
output += process_table(fname, table)
if in_table:
table += line
else:
output += line
if in_table:
in_table = False
output += process_table(fname, table)
return output
fname = sys.argv[1]
data = file(fname, 'rb').read().decode('utf-8')
data = process_file(fname, data)
file(fname, 'wb').write(data.encode('utf-8'))
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2016-09-05 19:44:34 +08:00
|
|
|
* - __u32
|
|
|
|
- ``index``
|
|
|
|
- Number of the video standard, set by the application.
|
|
|
|
* - :ref:`v4l2_std_id <v4l2-std-id>`
|
|
|
|
- ``id``
|
|
|
|
- The bits in this field identify the standard as one of the common
|
|
|
|
standards listed in :ref:`v4l2-std-id`, or if bits 32 to 63 are
|
|
|
|
set as custom standards. Multiple bits can be set if the hardware
|
|
|
|
does not distinguish between these standards, however separate
|
|
|
|
indices do not indicate the opposite. The ``id`` must be unique.
|
|
|
|
No other enumerated struct :c:type:`v4l2_standard` structure,
|
|
|
|
for this input or output anyway, can contain the same set of bits.
|
|
|
|
* - __u8
|
|
|
|
- ``name``\ [24]
|
|
|
|
- Name of the standard, a NUL-terminated ASCII string, for example:
|
|
|
|
"PAL-B/G", "NTSC Japan". This information is intended for the
|
|
|
|
user.
|
|
|
|
* - struct :c:type:`v4l2_fract`
|
|
|
|
- ``frameperiod``
|
|
|
|
- The frame period (not field period) is numerator / denominator.
|
|
|
|
For example M/NTSC has a frame period of 1001 / 30000 seconds.
|
|
|
|
* - __u32
|
|
|
|
- ``framelines``
|
|
|
|
- Total lines per frame including blanking, e. g. 625 for B/PAL.
|
|
|
|
* - __u32
|
|
|
|
- ``reserved``\ [4]
|
|
|
|
- Reserved for future extensions. Drivers must set the array to
|
|
|
|
zero.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-30 04:37:59 +08:00
|
|
|
.. c:type:: v4l2_fract
|
2016-06-30 21:18:56 +08:00
|
|
|
|
[media] docs-rst: add tabularcolumns to all tables
LaTeX doesn't handle too well auto-width on tables, and ReST
markup requires an special tag to give it the needed hints.
As we're using A4 paper, we have 17cm of useful spaces. As
most media tables have widths, let's use it to generate the
needed via the following perl script:
my ($line_size, $table_header, $has_cols) = (17.5, 0, 0);
my $out;
my $header = "";
my @widths = ();
sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) }
while (<>) {
if (!$table_header) {
$has_cols = 1 if (m/..\s+tabularcolumns::/);
if (m/..\s+flat-table::/) {
$table_header = 1;
$header = $_;
next;
}
$out .= $_;
next;
}
$header .= $_;
@widths = split(/ /, $1) if (m/:widths:\s+(.*)/);
if (m/^\n$/) {
if (!$has_cols && @widths) {
my ($tot, $t, $i) = (0, 0, 0);
foreach my $v(@widths) { $tot += $v; };
$out .= ".. tabularcolumns:: |";
for ($i = 0; $i < scalar @widths - 1; $i++) {
my $v = $widths[$i];
my $w = round(10 * ($v * $line_size) / $tot) / 10;
$out .= sprintf "p{%.1fcm}|", $w;
$t += $w;
}
my $w = $line_size - $t;
$out .= sprintf "p{%.1fcm}|\n\n", $w;
}
$out .= $header;
$table_header = 0;
$has_cols = 0;
$header = "";
@widths = ();
}
}
print $out;
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-17 19:14:19 +08:00
|
|
|
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
|
|
|
|
|
2016-06-30 21:18:56 +08:00
|
|
|
.. flat-table:: struct v4l2_fract
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
|
|
|
:widths: 1 1 2
|
|
|
|
|
[media] v4l: doc: Remove row numbers from tables
Shorten the tables by removing row numbers in comments, allowing for
later insertion of rows with minimal diffs.
All changes have been generated by the following script.
import io
import re
import sys
def process_table(fname, data):
if fname.endswith('hist-v4l2.rst'):
data = re.sub(u'\n{1,2}\t( ?) -( ?) ?', u'\n\t\\1 -\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n(\t| )- \.\. row [0-9]+\n\t ?-( ?) ?', u'\\1* -\\2', data, flags = re.MULTILINE)
else:
data = re.sub(u'\n{1,2} -( ?) ?', u'\n -\\1', data, flags = re.MULTILINE)
data = re.sub(u'(\n?)(\n\n - \.\. row 1\n)', u'\n\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n -( ?) ?', u' * -\\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n \.\. (_[A-Z0-9_`-]*:)', u'\n - .. \\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. (_[A-Z0-9_`-]*:)\n -', u' * .. \\1\n\n -', data, flags = re.MULTILINE)
data = re.sub(u'^ - ', u' -', data, flags = re.MULTILINE)
data = re.sub(u'^(\t{1,2}) ', u'\\1', data, flags = re.MULTILINE)
return data
def process_file(fname, data):
buf = io.StringIO(data)
output = ''
in_table = False
table_separator = 0
for line in buf.readlines():
if line.find('.. flat-table::') != -1:
in_table = True
table = ''
elif in_table and not re.match('^[\t\n]|( )', line):
in_table = False
output += process_table(fname, table)
if in_table:
table += line
else:
output += line
if in_table:
in_table = False
output += process_table(fname, table)
return output
fname = sys.argv[1]
data = file(fname, 'rb').read().decode('utf-8')
data = process_file(fname, data)
file(fname, 'wb').write(data.encode('utf-8'))
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2016-09-05 19:44:34 +08:00
|
|
|
* - __u32
|
|
|
|
- ``numerator``
|
|
|
|
-
|
|
|
|
* - __u32
|
|
|
|
- ``denominator``
|
|
|
|
-
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
|
2016-08-19 22:14:23 +08:00
|
|
|
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
.. _v4l2-std-id:
|
|
|
|
|
|
|
|
.. flat-table:: typedef v4l2_std_id
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
|
|
|
:widths: 1 1 2
|
|
|
|
|
[media] v4l: doc: Remove row numbers from tables
Shorten the tables by removing row numbers in comments, allowing for
later insertion of rows with minimal diffs.
All changes have been generated by the following script.
import io
import re
import sys
def process_table(fname, data):
if fname.endswith('hist-v4l2.rst'):
data = re.sub(u'\n{1,2}\t( ?) -( ?) ?', u'\n\t\\1 -\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n(\t| )- \.\. row [0-9]+\n\t ?-( ?) ?', u'\\1* -\\2', data, flags = re.MULTILINE)
else:
data = re.sub(u'\n{1,2} -( ?) ?', u'\n -\\1', data, flags = re.MULTILINE)
data = re.sub(u'(\n?)(\n\n - \.\. row 1\n)', u'\n\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n -( ?) ?', u' * -\\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n \.\. (_[A-Z0-9_`-]*:)', u'\n - .. \\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. (_[A-Z0-9_`-]*:)\n -', u' * .. \\1\n\n -', data, flags = re.MULTILINE)
data = re.sub(u'^ - ', u' -', data, flags = re.MULTILINE)
data = re.sub(u'^(\t{1,2}) ', u'\\1', data, flags = re.MULTILINE)
return data
def process_file(fname, data):
buf = io.StringIO(data)
output = ''
in_table = False
table_separator = 0
for line in buf.readlines():
if line.find('.. flat-table::') != -1:
in_table = True
table = ''
elif in_table and not re.match('^[\t\n]|( )', line):
in_table = False
output += process_table(fname, table)
if in_table:
table += line
else:
output += line
if in_table:
in_table = False
output += process_table(fname, table)
return output
fname = sys.argv[1]
data = file(fname, 'rb').read().decode('utf-8')
data = process_file(fname, data)
file(fname, 'wb').write(data.encode('utf-8'))
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2016-09-05 19:44:34 +08:00
|
|
|
* - __u64
|
|
|
|
- ``v4l2_std_id``
|
|
|
|
- This type is a set, each bit representing another video standard
|
|
|
|
as listed below and in :ref:`video-standards`. The 32 most
|
|
|
|
significant bits are reserved for custom (driver defined) video
|
|
|
|
standards.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. code-block:: c
|
|
|
|
|
|
|
|
#define V4L2_STD_PAL_B ((v4l2_std_id)0x00000001)
|
|
|
|
#define V4L2_STD_PAL_B1 ((v4l2_std_id)0x00000002)
|
|
|
|
#define V4L2_STD_PAL_G ((v4l2_std_id)0x00000004)
|
|
|
|
#define V4L2_STD_PAL_H ((v4l2_std_id)0x00000008)
|
|
|
|
#define V4L2_STD_PAL_I ((v4l2_std_id)0x00000010)
|
|
|
|
#define V4L2_STD_PAL_D ((v4l2_std_id)0x00000020)
|
|
|
|
#define V4L2_STD_PAL_D1 ((v4l2_std_id)0x00000040)
|
|
|
|
#define V4L2_STD_PAL_K ((v4l2_std_id)0x00000080)
|
|
|
|
|
|
|
|
#define V4L2_STD_PAL_M ((v4l2_std_id)0x00000100)
|
|
|
|
#define V4L2_STD_PAL_N ((v4l2_std_id)0x00000200)
|
|
|
|
#define V4L2_STD_PAL_Nc ((v4l2_std_id)0x00000400)
|
|
|
|
#define V4L2_STD_PAL_60 ((v4l2_std_id)0x00000800)
|
|
|
|
|
|
|
|
``V4L2_STD_PAL_60`` is a hybrid standard with 525 lines, 60 Hz refresh
|
|
|
|
rate, and PAL color modulation with a 4.43 MHz color subcarrier. Some
|
|
|
|
PAL video recorders can play back NTSC tapes in this mode for display on
|
|
|
|
a 50/60 Hz agnostic PAL TV.
|
|
|
|
|
|
|
|
|
|
|
|
.. code-block:: c
|
|
|
|
|
|
|
|
#define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000)
|
|
|
|
#define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000)
|
|
|
|
#define V4L2_STD_NTSC_443 ((v4l2_std_id)0x00004000)
|
|
|
|
|
|
|
|
``V4L2_STD_NTSC_443`` is a hybrid standard with 525 lines, 60 Hz refresh
|
|
|
|
rate, and NTSC color modulation with a 4.43 MHz color subcarrier.
|
|
|
|
|
|
|
|
|
|
|
|
.. code-block:: c
|
|
|
|
|
|
|
|
#define V4L2_STD_NTSC_M_KR ((v4l2_std_id)0x00008000)
|
|
|
|
|
|
|
|
#define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000)
|
|
|
|
#define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000)
|
|
|
|
#define V4L2_STD_SECAM_G ((v4l2_std_id)0x00040000)
|
|
|
|
#define V4L2_STD_SECAM_H ((v4l2_std_id)0x00080000)
|
|
|
|
#define V4L2_STD_SECAM_K ((v4l2_std_id)0x00100000)
|
|
|
|
#define V4L2_STD_SECAM_K1 ((v4l2_std_id)0x00200000)
|
|
|
|
#define V4L2_STD_SECAM_L ((v4l2_std_id)0x00400000)
|
|
|
|
#define V4L2_STD_SECAM_LC ((v4l2_std_id)0x00800000)
|
|
|
|
|
|
|
|
/* ATSC/HDTV */
|
|
|
|
#define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000)
|
|
|
|
#define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000)
|
|
|
|
|
|
|
|
``V4L2_STD_ATSC_8_VSB`` and ``V4L2_STD_ATSC_16_VSB`` are U.S.
|
|
|
|
terrestrial digital TV standards. Presently the V4L2 API does not
|
|
|
|
support digital TV. See also the Linux DVB API at
|
|
|
|
`https://linuxtv.org <https://linuxtv.org>`__.
|
|
|
|
|
|
|
|
|
|
|
|
.. code-block:: c
|
|
|
|
|
|
|
|
#define V4L2_STD_PAL_BG (V4L2_STD_PAL_B |
|
2016-07-05 03:25:48 +08:00
|
|
|
V4L2_STD_PAL_B1 |
|
|
|
|
V4L2_STD_PAL_G)
|
2016-06-30 21:18:56 +08:00
|
|
|
#define V4L2_STD_B (V4L2_STD_PAL_B |
|
2016-07-05 03:25:48 +08:00
|
|
|
V4L2_STD_PAL_B1 |
|
|
|
|
V4L2_STD_SECAM_B)
|
2016-06-30 21:18:56 +08:00
|
|
|
#define V4L2_STD_GH (V4L2_STD_PAL_G |
|
2016-07-05 03:25:48 +08:00
|
|
|
V4L2_STD_PAL_H |
|
|
|
|
V4L2_STD_SECAM_G |
|
|
|
|
V4L2_STD_SECAM_H)
|
2016-06-30 21:18:56 +08:00
|
|
|
#define V4L2_STD_PAL_DK (V4L2_STD_PAL_D |
|
2016-07-05 03:25:48 +08:00
|
|
|
V4L2_STD_PAL_D1 |
|
|
|
|
V4L2_STD_PAL_K)
|
2016-06-30 21:18:56 +08:00
|
|
|
#define V4L2_STD_PAL (V4L2_STD_PAL_BG |
|
2016-07-05 03:25:48 +08:00
|
|
|
V4L2_STD_PAL_DK |
|
|
|
|
V4L2_STD_PAL_H |
|
|
|
|
V4L2_STD_PAL_I)
|
2016-06-30 21:18:56 +08:00
|
|
|
#define V4L2_STD_NTSC (V4L2_STD_NTSC_M |
|
2016-07-05 03:25:48 +08:00
|
|
|
V4L2_STD_NTSC_M_JP |
|
|
|
|
V4L2_STD_NTSC_M_KR)
|
2016-06-30 21:18:56 +08:00
|
|
|
#define V4L2_STD_MN (V4L2_STD_PAL_M |
|
2016-07-05 03:25:48 +08:00
|
|
|
V4L2_STD_PAL_N |
|
|
|
|
V4L2_STD_PAL_Nc |
|
|
|
|
V4L2_STD_NTSC)
|
2016-06-30 21:18:56 +08:00
|
|
|
#define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D |
|
2016-07-05 03:25:48 +08:00
|
|
|
V4L2_STD_SECAM_K |
|
|
|
|
V4L2_STD_SECAM_K1)
|
2016-06-30 21:18:56 +08:00
|
|
|
#define V4L2_STD_DK (V4L2_STD_PAL_DK |
|
2016-07-05 03:25:48 +08:00
|
|
|
V4L2_STD_SECAM_DK)
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
#define V4L2_STD_SECAM (V4L2_STD_SECAM_B |
|
2016-07-05 03:25:48 +08:00
|
|
|
V4L2_STD_SECAM_G |
|
|
|
|
V4L2_STD_SECAM_H |
|
|
|
|
V4L2_STD_SECAM_DK |
|
|
|
|
V4L2_STD_SECAM_L |
|
|
|
|
V4L2_STD_SECAM_LC)
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
#define V4L2_STD_525_60 (V4L2_STD_PAL_M |
|
2016-07-05 03:25:48 +08:00
|
|
|
V4L2_STD_PAL_60 |
|
|
|
|
V4L2_STD_NTSC |
|
|
|
|
V4L2_STD_NTSC_443)
|
2016-06-30 21:18:56 +08:00
|
|
|
#define V4L2_STD_625_50 (V4L2_STD_PAL |
|
2016-07-05 03:25:48 +08:00
|
|
|
V4L2_STD_PAL_N |
|
|
|
|
V4L2_STD_PAL_Nc |
|
|
|
|
V4L2_STD_SECAM)
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
#define V4L2_STD_UNKNOWN 0
|
|
|
|
#define V4L2_STD_ALL (V4L2_STD_525_60 |
|
2016-07-05 03:25:48 +08:00
|
|
|
V4L2_STD_625_50)
|
2016-06-30 21:18:56 +08:00
|
|
|
|
media: fix pdf build with Spinx 1.6
Sphinx 1.6 generates some LaTeX code before each table,
starting its own environment before calling tabulary,
apparently to improve table layout.
The problem is that such environment is incompatible with
adjustbox. While, in thesis, it should be possible to override
it or to redefine tabulary, I was unable to produce such patch.
Also, that would likely break on some future Sphinx version.
So, instead, let's just change the font size on bigger tables,
in order for them to fit into the page size. That is not as
good as adjustbox, and require some manual work, but it should
be less sensitive to Sphinx changes.
While here, adjust a few other tables whose text is exceeding
the cell boundaries.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-26 17:28:26 +08:00
|
|
|
|
2016-08-19 01:55:24 +08:00
|
|
|
.. raw:: latex
|
|
|
|
|
media: fix pdf build with Spinx 1.6
Sphinx 1.6 generates some LaTeX code before each table,
starting its own environment before calling tabulary,
apparently to improve table layout.
The problem is that such environment is incompatible with
adjustbox. While, in thesis, it should be possible to override
it or to redefine tabulary, I was unable to produce such patch.
Also, that would likely break on some future Sphinx version.
So, instead, let's just change the font size on bigger tables,
in order for them to fit into the page size. That is not as
good as adjustbox, and require some manual work, but it should
be less sensitive to Sphinx changes.
While here, adjust a few other tables whose text is exceeding
the cell boundaries.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-26 17:28:26 +08:00
|
|
|
\begingroup
|
|
|
|
\tiny
|
|
|
|
\setlength{\tabcolsep}{2pt}
|
2016-08-19 01:55:24 +08:00
|
|
|
|
|
|
|
.. NTSC/M PAL/M /N /B /D /H /I SECAM/B /D /K1 /L
|
media: fix pdf build with Spinx 1.6
Sphinx 1.6 generates some LaTeX code before each table,
starting its own environment before calling tabulary,
apparently to improve table layout.
The problem is that such environment is incompatible with
adjustbox. While, in thesis, it should be possible to override
it or to redefine tabulary, I was unable to produce such patch.
Also, that would likely break on some future Sphinx version.
So, instead, let's just change the font size on bigger tables,
in order for them to fit into the page size. That is not as
good as adjustbox, and require some manual work, but it should
be less sensitive to Sphinx changes.
While here, adjust a few other tables whose text is exceeding
the cell boundaries.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-26 17:28:26 +08:00
|
|
|
.. tabularcolumns:: |p{1.43cm}|p{1.38cm}|p{1.59cm}|p{1.7cm}|p{1.7cm}|p{1.17cm}|p{0.64cm}|p{1.71cm}|p{1.6cm}|p{1.07cm}|p{1.07cm}|p{1.07cm}|
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
.. _video-standards:
|
|
|
|
|
2016-08-16 00:05:05 +08:00
|
|
|
.. flat-table:: Video Standards (based on :ref:`itu470`)
|
2016-06-30 21:18:56 +08:00
|
|
|
:header-rows: 1
|
|
|
|
:stub-columns: 0
|
|
|
|
|
[media] v4l: doc: Remove row numbers from tables
Shorten the tables by removing row numbers in comments, allowing for
later insertion of rows with minimal diffs.
All changes have been generated by the following script.
import io
import re
import sys
def process_table(fname, data):
if fname.endswith('hist-v4l2.rst'):
data = re.sub(u'\n{1,2}\t( ?) -( ?) ?', u'\n\t\\1 -\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n(\t| )- \.\. row [0-9]+\n\t ?-( ?) ?', u'\\1* -\\2', data, flags = re.MULTILINE)
else:
data = re.sub(u'\n{1,2} -( ?) ?', u'\n -\\1', data, flags = re.MULTILINE)
data = re.sub(u'(\n?)(\n\n - \.\. row 1\n)', u'\n\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n -( ?) ?', u' * -\\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n \.\. (_[A-Z0-9_`-]*:)', u'\n - .. \\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. (_[A-Z0-9_`-]*:)\n -', u' * .. \\1\n\n -', data, flags = re.MULTILINE)
data = re.sub(u'^ - ', u' -', data, flags = re.MULTILINE)
data = re.sub(u'^(\t{1,2}) ', u'\\1', data, flags = re.MULTILINE)
return data
def process_file(fname, data):
buf = io.StringIO(data)
output = ''
in_table = False
table_separator = 0
for line in buf.readlines():
if line.find('.. flat-table::') != -1:
in_table = True
table = ''
elif in_table and not re.match('^[\t\n]|( )', line):
in_table = False
output += process_table(fname, table)
if in_table:
table += line
else:
output += line
if in_table:
in_table = False
output += process_table(fname, table)
return output
fname = sys.argv[1]
data = file(fname, 'rb').read().decode('utf-8')
data = process_file(fname, data)
file(fname, 'wb').write(data.encode('utf-8'))
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2016-09-05 19:44:34 +08:00
|
|
|
* - Characteristics
|
|
|
|
- M/NTSC [#f2]_
|
|
|
|
- M/PAL
|
|
|
|
- N/PAL [#f3]_
|
|
|
|
- B, B1, G/PAL
|
|
|
|
- D, D1, K/PAL
|
|
|
|
- H/PAL
|
|
|
|
- I/PAL
|
|
|
|
- B, G/SECAM
|
|
|
|
- D, K/SECAM
|
|
|
|
- K1/SECAM
|
|
|
|
- L/SECAM
|
|
|
|
* - Frame lines
|
|
|
|
- :cspan:`1` 525
|
|
|
|
- :cspan:`8` 625
|
|
|
|
* - Frame period (s)
|
|
|
|
- :cspan:`1` 1001/30000
|
|
|
|
- :cspan:`8` 1/25
|
|
|
|
* - Chrominance sub-carrier frequency (Hz)
|
|
|
|
- 3579545 ± 10
|
|
|
|
- 3579611.49 ± 10
|
|
|
|
- 4433618.75 ± 5
|
|
|
|
|
|
|
|
(3582056.25 ± 5)
|
|
|
|
- :cspan:`3` 4433618.75 ± 5
|
|
|
|
- 4433618.75 ± 1
|
|
|
|
- :cspan:`2` f\ :sub:`OR` = 4406250 ± 2000,
|
|
|
|
|
|
|
|
f\ :sub:`OB` = 4250000 ± 2000
|
|
|
|
* - Nominal radio-frequency channel bandwidth (MHz)
|
|
|
|
- 6
|
|
|
|
- 6
|
|
|
|
- 6
|
|
|
|
- B: 7; B1, G: 8
|
|
|
|
- 8
|
|
|
|
- 8
|
|
|
|
- 8
|
|
|
|
- 8
|
|
|
|
- 8
|
|
|
|
- 8
|
|
|
|
- 8
|
|
|
|
* - Sound carrier relative to vision carrier (MHz)
|
|
|
|
- 4.5
|
|
|
|
- 4.5
|
|
|
|
- 4.5
|
|
|
|
- 5.5 ± 0.001 [#f4]_ [#f5]_ [#f6]_ [#f7]_
|
|
|
|
- 6.5 ± 0.001
|
|
|
|
- 5.5
|
|
|
|
- 5.9996 ± 0.0005
|
|
|
|
- 5.5 ± 0.001
|
|
|
|
- 6.5 ± 0.001
|
|
|
|
- 6.5
|
|
|
|
- 6.5 [#f8]_
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-08-19 01:55:24 +08:00
|
|
|
.. raw:: latex
|
|
|
|
|
media: fix pdf build with Spinx 1.6
Sphinx 1.6 generates some LaTeX code before each table,
starting its own environment before calling tabulary,
apparently to improve table layout.
The problem is that such environment is incompatible with
adjustbox. While, in thesis, it should be possible to override
it or to redefine tabulary, I was unable to produce such patch.
Also, that would likely break on some future Sphinx version.
So, instead, let's just change the font size on bigger tables,
in order for them to fit into the page size. That is not as
good as adjustbox, and require some manual work, but it should
be less sensitive to Sphinx changes.
While here, adjust a few other tables whose text is exceeding
the cell boundaries.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-26 17:28:26 +08:00
|
|
|
\endgroup
|
2016-08-19 01:55:24 +08:00
|
|
|
|
|
|
|
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-07-06 02:14:35 +08:00
|
|
|
Return Value
|
2016-06-30 21:18:56 +08:00
|
|
|
============
|
|
|
|
|
|
|
|
On success 0 is returned, on error -1 and the ``errno`` variable is set
|
|
|
|
appropriately. The generic error codes are described at the
|
|
|
|
:ref:`Generic Error Codes <gen-errors>` chapter.
|
|
|
|
|
|
|
|
EINVAL
|
2016-08-30 04:37:59 +08:00
|
|
|
The struct :c:type:`v4l2_standard` ``index`` is out
|
2016-06-30 21:18:56 +08:00
|
|
|
of bounds.
|
|
|
|
|
|
|
|
ENODATA
|
|
|
|
Standard video timings are not supported for this input or output.
|
|
|
|
|
2016-07-13 02:15:23 +08:00
|
|
|
.. [#f1]
|
2016-06-30 21:18:56 +08:00
|
|
|
The supported standards may overlap and we need an unambiguous set to
|
2016-07-03 21:02:29 +08:00
|
|
|
find the current standard returned by :ref:`VIDIOC_G_STD <VIDIOC_G_STD>`.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-07-13 02:15:23 +08:00
|
|
|
.. [#f2]
|
2016-06-30 21:18:56 +08:00
|
|
|
Japan uses a standard similar to M/NTSC (V4L2_STD_NTSC_M_JP).
|
|
|
|
|
2016-07-13 02:15:23 +08:00
|
|
|
.. [#f3]
|
2016-06-30 21:18:56 +08:00
|
|
|
The values in brackets apply to the combination N/PAL a.k.a.
|
2016-07-04 20:04:31 +08:00
|
|
|
N\ :sub:`C` used in Argentina (V4L2_STD_PAL_Nc).
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-07-13 02:15:23 +08:00
|
|
|
.. [#f4]
|
2016-06-30 21:18:56 +08:00
|
|
|
In the Federal Republic of Germany, Austria, Italy, the Netherlands,
|
|
|
|
Slovakia and Switzerland a system of two sound carriers is used, the
|
|
|
|
frequency of the second carrier being 242.1875 kHz above the
|
|
|
|
frequency of the first sound carrier. For stereophonic sound
|
|
|
|
transmissions a similar system is used in Australia.
|
|
|
|
|
2016-07-13 02:15:23 +08:00
|
|
|
.. [#f5]
|
2016-06-30 21:18:56 +08:00
|
|
|
New Zealand uses a sound carrier displaced 5.4996 ± 0.0005 MHz from
|
|
|
|
the vision carrier.
|
|
|
|
|
2016-07-13 02:15:23 +08:00
|
|
|
.. [#f6]
|
2016-06-30 21:18:56 +08:00
|
|
|
In Denmark, Finland, New Zealand, Sweden and Spain a system of two
|
|
|
|
sound carriers is used. In Iceland, Norway and Poland the same system
|
|
|
|
is being introduced. The second carrier is 5.85 MHz above the vision
|
|
|
|
carrier and is DQPSK modulated with 728 kbit/s sound and data
|
|
|
|
multiplex. (NICAM system)
|
|
|
|
|
2016-07-13 02:15:23 +08:00
|
|
|
.. [#f7]
|
2016-06-30 21:18:56 +08:00
|
|
|
In the United Kingdom, a system of two sound carriers is used. The
|
|
|
|
second sound carrier is 6.552 MHz above the vision carrier and is
|
|
|
|
DQPSK modulated with a 728 kbit/s sound and data multiplex able to
|
|
|
|
carry two sound channels. (NICAM system)
|
|
|
|
|
2016-07-13 02:15:23 +08:00
|
|
|
.. [#f8]
|
2016-06-30 21:18:56 +08:00
|
|
|
In France, a digital carrier 5.85 MHz away from the vision carrier
|
|
|
|
may be used in addition to the main sound carrier. It is modulated in
|
|
|
|
differentially encoded QPSK with a 728 kbit/s sound and data
|
|
|
|
multiplexer capable of carrying two sound channels. (NICAM system)
|