1 .. -*- coding: utf-8; mode: rst -*-
3 .. _VIDIOC_G_SLICED_VBI_CAP:
5 *****************************
6 ioctl VIDIOC_G_SLICED_VBI_CAP
7 *****************************
12 VIDIOC_G_SLICED_VBI_CAP - Query sliced VBI capabilities
18 .. c:function:: int ioctl( int fd, VIDIOC_G_SLICED_VBI_CAP, struct v4l2_sliced_vbi_cap *argp )
19 :name: VIDIOC_G_SLICED_VBI_CAP
26 File descriptor returned by :ref:`open() <func-open>`.
29 Pointer to struct :c:type:`v4l2_sliced_vbi_cap`.
35 To find out which data services are supported by a sliced VBI capture or
36 output device, applications initialize the ``type`` field of a struct
37 :c:type:`v4l2_sliced_vbi_cap`, clear the
38 ``reserved`` array and call the :ref:`VIDIOC_G_SLICED_VBI_CAP <VIDIOC_G_SLICED_VBI_CAP>` ioctl. The
39 driver fills in the remaining fields or returns an ``EINVAL`` error code if
40 the sliced VBI API is unsupported or ``type`` is invalid.
44 The ``type`` field was added, and the ioctl changed from read-only
45 to write-read, in Linux 2.6.19.
48 .. c:type:: v4l2_sliced_vbi_cap
50 .. tabularcolumns:: |p{1.2cm}|p{4.2cm}|p{4.1cm}|p{4.0cm}|p{4.0cm}|
52 .. flat-table:: struct v4l2_sliced_vbi_cap
59 - :cspan:`2` A set of all data services supported by the driver.
61 Equal to the union of all elements of the ``service_lines`` array.
63 - ``service_lines``\ [2][24]
64 - :cspan:`2` Each element of this array contains a set of data
65 services the hardware can look for or insert into a particular
66 scan line. Data services are defined in :ref:`vbi-services`.
67 Array indices map to ITU-R line numbers\ [#f1]_ as follows:
75 - ``service_lines``\ [0][1]
80 - ``service_lines``\ [0][23]
85 - ``service_lines``\ [1][1]
90 - ``service_lines``\ [1][23]
96 - :cspan:`2` The number of VBI lines the hardware can capture or
97 output per frame, or the number of services it can identify on a
98 given line may be limited. For example on PAL line 16 the hardware
99 may be able to look for a VPS or Teletext signal, but not both at
100 the same time. Applications can learn about these limits using the
101 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl as described in
106 - :cspan:`2` Drivers must set ``service_lines`` [0][0] and
107 ``service_lines``\ [1][0] to zero.
110 - Type of the data stream, see :c:type:`v4l2_buf_type`. Should be
111 ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` or
112 ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``.
115 - :cspan:`2` This array is reserved for future extensions.
117 Applications and drivers must set it to zero.
121 See also :ref:`vbi-525` and :ref:`vbi-625`.
128 .. tabularcolumns:: |p{3.5cm}|p{1.0cm}|p{2.0cm}|p{2.0cm}|p{8.0cm}|
132 .. flat-table:: Sliced VBI services
142 * - ``V4L2_SLICED_TELETEXT_B`` (Teletext System B)
147 - PAL/SECAM line 7-22, 320-335 (second field 7-22)
148 - Last 42 of the 45 byte Teletext packet, that is without clock
149 run-in and framing code, lsb first transmitted.
150 * - ``V4L2_SLICED_VPS``
154 - Byte number 3 to 15 according to Figure 9 of ETS 300 231, lsb
156 * - ``V4L2_SLICED_CAPTION_525``
159 - NTSC line 21, 284 (second field 21)
160 - Two bytes in transmission order, including parity bit, lsb first
162 * - ``V4L2_SLICED_WSS_625``
174 Bit 7 6 5 4 3 2 1 0 x x 13 12 11 10 9
175 * - ``V4L2_SLICED_VBI_525``
177 - :cspan:`2` Set of services applicable to 525 line systems.
178 * - ``V4L2_SLICED_VBI_625``
180 - :cspan:`2` Set of services applicable to 625 line systems.
190 On success 0 is returned, on error -1 and the ``errno`` variable is set
191 appropriately. The generic error codes are described at the
192 :ref:`Generic Error Codes <gen-errors>` chapter.
195 The value in the ``type`` field is wrong.