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 .. cpp:function:: int ioctl( int fd, int request, struct v4l2_sliced_vbi_cap *argp )
25 File descriptor returned by :ref:`open() <func-open>`.
28 VIDIOC_G_SLICED_VBI_CAP
36 To find out which data services are supported by a sliced VBI capture or
37 output device, applications initialize the ``type`` field of a struct
38 :ref:`v4l2_sliced_vbi_cap <v4l2-sliced-vbi-cap>`, clear the
39 ``reserved`` array and call the :ref:`VIDIOC_G_SLICED_VBI_CAP <VIDIOC_G_SLICED_VBI_CAP>` ioctl. The
40 driver fills in the remaining fields or returns an ``EINVAL`` error code if
41 the sliced VBI API is unsupported or ``type`` is invalid.
45 The ``type`` field was added, and the ioctl changed from read-only
46 to write-read, in Linux 2.6.19.
49 .. _v4l2-sliced-vbi-cap:
51 .. tabularcolumns:: |p{1.2cm}|p{4.2cm}|p{4.1cm}|p{4.0cm}|p{4.0cm}|
53 .. flat-table:: struct v4l2_sliced_vbi_cap
65 - :cspan:`2` A set of all data services supported by the driver.
67 Equal to the union of all elements of the ``service_lines`` array.
73 - ``service_lines``\ [2][24]
75 - :cspan:`2` Each element of this array contains a set of data
76 services the hardware can look for or insert into a particular
77 scan line. Data services are defined in :ref:`vbi-services`.
78 Array indices map to ITU-R line numbers\ [#f1]_ as follows:
94 - ``service_lines``\ [0][1]
104 - ``service_lines``\ [0][23]
114 - ``service_lines``\ [1][1]
124 - ``service_lines``\ [1][23]
138 - :cspan:`2` The number of VBI lines the hardware can capture or
139 output per frame, or the number of services it can identify on a
140 given line may be limited. For example on PAL line 16 the hardware
141 may be able to look for a VPS or Teletext signal, but not both at
142 the same time. Applications can learn about these limits using the
143 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl as described in
154 - :cspan:`2` Drivers must set ``service_lines`` [0][0] and
155 ``service_lines``\ [1][0] to zero.
163 - Type of the data stream, see :ref:`v4l2-buf-type`. Should be
164 ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` or
165 ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``.
173 - :cspan:`2` This array is reserved for future extensions.
175 Applications and drivers must set it to zero.
179 See also :ref:`vbi-525` and :ref:`vbi-625`.
184 \newline\newline\begin{adjustbox}{width=\columnwidth}
186 .. tabularcolumns:: |p{5.0cm}|p{1.4cm}|p{3.0cm}|p{2.5cm}|p{9.0cm}|
190 .. flat-table:: Sliced VBI services
210 - ``V4L2_SLICED_TELETEXT_B`` (Teletext System B)
218 - PAL/SECAM line 7-22, 320-335 (second field 7-22)
220 - Last 42 of the 45 byte Teletext packet, that is without clock
221 run-in and framing code, lsb first transmitted.
225 - ``V4L2_SLICED_VPS``
233 - Byte number 3 to 15 according to Figure 9 of ETS 300 231, lsb
238 - ``V4L2_SLICED_CAPTION_525``
244 - NTSC line 21, 284 (second field 21)
246 - Two bytes in transmission order, including parity bit, lsb first
251 - ``V4L2_SLICED_WSS_625``
267 Bit 7 6 5 4 3 2 1 0 x x 13 12 11 10 9
271 - ``V4L2_SLICED_VBI_525``
275 - :cspan:`2` Set of services applicable to 525 line systems.
279 - ``V4L2_SLICED_VBI_625``
283 - :cspan:`2` Set of services applicable to 625 line systems.
287 \end{adjustbox}\newline\newline
293 On success 0 is returned, on error -1 and the ``errno`` variable is set
294 appropriately. The generic error codes are described at the
295 :ref:`Generic Error Codes <gen-errors>` chapter.
298 The value in the ``type`` field is wrong.