2016-06-30 21:18:56 +08:00
|
|
|
.. -*- coding: utf-8; mode: rst -*-
|
|
|
|
|
2016-07-02 00:42:29 +08:00
|
|
|
.. _VIDIOC_G_SLICED_VBI_CAP:
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
*****************************
|
|
|
|
ioctl VIDIOC_G_SLICED_VBI_CAP
|
|
|
|
*****************************
|
|
|
|
|
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_G_SLICED_VBI_CAP - Query sliced VBI capabilities
|
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-07-02 20:49:16 +08:00
|
|
|
.. cpp:function:: int ioctl( int fd, int request, struct v4l2_sliced_vbi_cap *argp )
|
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>`.
|
|
|
|
|
|
|
|
``request``
|
|
|
|
VIDIOC_G_SLICED_VBI_CAP
|
|
|
|
|
|
|
|
``argp``
|
|
|
|
|
|
|
|
|
2016-07-06 02:14:35 +08:00
|
|
|
Description
|
2016-06-30 21:18:56 +08:00
|
|
|
===========
|
|
|
|
|
|
|
|
To find out which data services are supported by a sliced VBI capture or
|
|
|
|
output device, applications initialize the ``type`` field of a struct
|
|
|
|
:ref:`v4l2_sliced_vbi_cap <v4l2-sliced-vbi-cap>`, clear the
|
2016-07-03 21:02:29 +08:00
|
|
|
``reserved`` array and call the :ref:`VIDIOC_G_SLICED_VBI_CAP <VIDIOC_G_SLICED_VBI_CAP>` ioctl. The
|
2016-07-03 22:53:09 +08:00
|
|
|
driver fills in the remaining fields or returns an ``EINVAL`` error code if
|
2016-06-30 21:18:56 +08:00
|
|
|
the sliced VBI API is unsupported or ``type`` is invalid.
|
|
|
|
|
2016-08-16 04:49:50 +08:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
The ``type`` field was added, and the ioctl changed from read-only
|
2016-07-10 22:57:43 +08:00
|
|
|
to write-read, in Linux 2.6.19.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
.. _v4l2-sliced-vbi-cap:
|
|
|
|
|
|
|
|
.. flat-table:: struct v4l2_sliced_vbi_cap
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
|
|
|
:widths: 3 3 2 2 2
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
- __u16
|
|
|
|
|
|
|
|
- ``service_set``
|
|
|
|
|
|
|
|
- :cspan:`2` A set of all data services supported by the driver.
|
2016-07-05 03:25:48 +08:00
|
|
|
Equal to the union of all elements of the ``service_lines`` array.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
- __u16
|
|
|
|
|
2016-07-13 19:43:30 +08:00
|
|
|
- ``service_lines``\ [2][24]
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- :cspan:`2` Each element of this array contains a set of data
|
2016-07-05 03:25:48 +08:00
|
|
|
services the hardware can look for or insert into a particular
|
|
|
|
scan line. Data services are defined in :ref:`vbi-services`.
|
|
|
|
Array indices map to ITU-R line numbers (see also :ref:`vbi-525`
|
|
|
|
and :ref:`vbi-625`) as follows:
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
2016-07-05 03:25:48 +08:00
|
|
|
-
|
|
|
|
-
|
2016-06-30 21:18:56 +08:00
|
|
|
- Element
|
|
|
|
|
|
|
|
- 525 line systems
|
|
|
|
|
|
|
|
- 625 line systems
|
|
|
|
|
|
|
|
- .. row 4
|
|
|
|
|
2016-07-05 03:25:48 +08:00
|
|
|
-
|
|
|
|
-
|
2016-07-13 19:43:30 +08:00
|
|
|
- ``service_lines``\ [0][1]
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- 1
|
|
|
|
|
|
|
|
- 1
|
|
|
|
|
|
|
|
- .. row 5
|
|
|
|
|
2016-07-05 03:25:48 +08:00
|
|
|
-
|
|
|
|
-
|
2016-07-13 19:43:30 +08:00
|
|
|
- ``service_lines``\ [0][23]
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- 23
|
|
|
|
|
|
|
|
- 23
|
|
|
|
|
|
|
|
- .. row 6
|
|
|
|
|
2016-07-05 03:25:48 +08:00
|
|
|
-
|
|
|
|
-
|
2016-07-13 19:43:30 +08:00
|
|
|
- ``service_lines``\ [1][1]
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- 264
|
|
|
|
|
|
|
|
- 314
|
|
|
|
|
|
|
|
- .. row 7
|
|
|
|
|
2016-07-05 03:25:48 +08:00
|
|
|
-
|
|
|
|
-
|
2016-07-13 19:43:30 +08:00
|
|
|
- ``service_lines``\ [1][23]
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- 286
|
|
|
|
|
|
|
|
- 336
|
|
|
|
|
|
|
|
- .. row 8
|
|
|
|
|
2016-07-05 03:25:48 +08:00
|
|
|
-
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- .. row 9
|
|
|
|
|
2016-07-05 03:25:48 +08:00
|
|
|
-
|
|
|
|
-
|
2016-06-30 21:18:56 +08:00
|
|
|
- :cspan:`2` The number of VBI lines the hardware can capture or
|
2016-07-05 03:25:48 +08:00
|
|
|
output per frame, or the number of services it can identify on a
|
|
|
|
given line may be limited. For example on PAL line 16 the hardware
|
|
|
|
may be able to look for a VPS or Teletext signal, but not both at
|
|
|
|
the same time. Applications can learn about these limits using the
|
|
|
|
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl as described in
|
|
|
|
:ref:`sliced`.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- .. row 10
|
|
|
|
|
2016-07-05 03:25:48 +08:00
|
|
|
-
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- .. row 11
|
|
|
|
|
2016-07-05 03:25:48 +08:00
|
|
|
-
|
|
|
|
-
|
2016-07-13 19:43:30 +08:00
|
|
|
- :cspan:`2` Drivers must set ``service_lines`` [0][0] and
|
|
|
|
``service_lines``\ [1][0] to zero.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- .. row 12
|
|
|
|
|
|
|
|
- __u32
|
|
|
|
|
|
|
|
- ``type``
|
|
|
|
|
|
|
|
- Type of the data stream, see :ref:`v4l2-buf-type`. Should be
|
2016-07-05 03:25:48 +08:00
|
|
|
``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` or
|
|
|
|
``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- .. row 13
|
|
|
|
|
|
|
|
- __u32
|
|
|
|
|
2016-07-13 19:43:30 +08:00
|
|
|
- ``reserved``\ [3]
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- :cspan:`2` This array is reserved for future extensions.
|
2016-07-05 03:25:48 +08:00
|
|
|
Applications and drivers must set it to zero.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _vbi-services:
|
|
|
|
|
|
|
|
.. flat-table:: Sliced VBI services
|
|
|
|
:header-rows: 1
|
|
|
|
:stub-columns: 0
|
|
|
|
:widths: 2 1 1 2 2
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
- Symbol
|
|
|
|
|
|
|
|
- Value
|
|
|
|
|
|
|
|
- Reference
|
|
|
|
|
|
|
|
- Lines, usually
|
|
|
|
|
|
|
|
- Payload
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
- ``V4L2_SLICED_TELETEXT_B`` (Teletext System B)
|
|
|
|
|
|
|
|
- 0x0001
|
|
|
|
|
|
|
|
- :ref:`ets300706`, :ref:`itu653`
|
|
|
|
|
|
|
|
- PAL/SECAM line 7-22, 320-335 (second field 7-22)
|
|
|
|
|
|
|
|
- Last 42 of the 45 byte Teletext packet, that is without clock
|
2016-07-05 03:25:48 +08:00
|
|
|
run-in and framing code, lsb first transmitted.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
|
|
- ``V4L2_SLICED_VPS``
|
|
|
|
|
|
|
|
- 0x0400
|
|
|
|
|
|
|
|
- :ref:`ets300231`
|
|
|
|
|
|
|
|
- PAL line 16
|
|
|
|
|
|
|
|
- Byte number 3 to 15 according to Figure 9 of ETS 300 231, lsb
|
2016-07-05 03:25:48 +08:00
|
|
|
first transmitted.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- .. row 4
|
|
|
|
|
|
|
|
- ``V4L2_SLICED_CAPTION_525``
|
|
|
|
|
|
|
|
- 0x1000
|
|
|
|
|
|
|
|
- :ref:`cea608`
|
|
|
|
|
|
|
|
- NTSC line 21, 284 (second field 21)
|
|
|
|
|
|
|
|
- Two bytes in transmission order, including parity bit, lsb first
|
2016-07-05 03:25:48 +08:00
|
|
|
transmitted.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- .. row 5
|
|
|
|
|
|
|
|
- ``V4L2_SLICED_WSS_625``
|
|
|
|
|
|
|
|
- 0x4000
|
|
|
|
|
|
|
|
- :ref:`en300294`, :ref:`itu1119`
|
|
|
|
|
|
|
|
- PAL/SECAM line 23
|
|
|
|
|
2016-07-05 03:25:48 +08:00
|
|
|
-
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-07-05 03:25:48 +08:00
|
|
|
::
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-07-05 03:25:48 +08:00
|
|
|
Byte 0 1
|
|
|
|
msb lsb msb lsb
|
|
|
|
Bit 7 6 5 4 3 2 1 0 x x 13 12 11 10 9
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- .. row 6
|
|
|
|
|
|
|
|
- ``V4L2_SLICED_VBI_525``
|
|
|
|
|
|
|
|
- 0x1000
|
|
|
|
|
|
|
|
- :cspan:`2` Set of services applicable to 525 line systems.
|
|
|
|
|
|
|
|
- .. row 7
|
|
|
|
|
|
|
|
- ``V4L2_SLICED_VBI_625``
|
|
|
|
|
|
|
|
- 0x4401
|
|
|
|
|
|
|
|
- :cspan:`2` Set of services applicable to 625 line systems.
|
|
|
|
|
|
|
|
|
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
|
|
|
|
The value in the ``type`` field is wrong.
|