7.40. ioctl VIDIOC_G_SLICED_VBI_CAP¶
7.40.1. Name¶
VIDIOC_G_SLICED_VBI_CAP - Query sliced VBI capabilities
7.40.2. Synopsis¶
-
VIDIOC_G_SLICED_VBI_CAP¶
int ioctl(int fd, VIDIOC_G_SLICED_VBI_CAP, struct v4l2_sliced_vbi_cap *argp)
7.40.3. Arguments¶
fd
File descriptor returned by
open()
.argp
Pointer to struct
v4l2_sliced_vbi_cap
.
7.40.4. Description¶
To find out which data services are supported by a sliced VBI capture or
output device, applications initialize the type
field of a struct
v4l2_sliced_vbi_cap
, clear the
reserved
array and call the VIDIOC_G_SLICED_VBI_CAP ioctl. The
driver fills in the remaining fields or returns an EINVAL
error code if
the sliced VBI API is unsupported or type
is invalid.
Note
The type
field was added, and the ioctl changed from read-only
to write-read, in Linux 2.6.19.
-
type v4l2_sliced_vbi_cap¶
__u16 |
|
A set of all data services supported by the driver. Equal to the union of all elements of the |
||
__u16 |
|
Each element of this array contains a set of data services the hardware can look for or insert into a particular scan line. Data services are defined in Sliced VBI services. Array indices map to ITU-R line numbers1 as follows: |
||
Element |
525 line systems |
625 line systems |
||
|
1 |
1 |
||
|
23 |
23 |
||
|
264 |
314 |
||
|
286 |
336 |
||
The number of VBI lines the hardware can capture or 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 VIDIOC_S_FMT ioctl as described in Sliced VBI Data Interface. |
||||
Drivers must set |
||||
__u32 |
|
Type of the data stream, see |
||
__u32 |
|
This array is reserved for future extensions. Applications and drivers must set it to zero. |
- 1
See also Figure 4.2. ITU-R 525 line numbering (M/NTSC and M/PAL) and Figure 4.3. ITU-R 625 line numbering.
Symbol |
Value |
Reference |
Lines, usually |
Payload |
---|---|---|---|---|
|
0x0001 |
PAL/SECAM line 7-22, 320-335 (second field 7-22) |
Last 42 of the 45 byte Teletext packet, that is without clock run-in and framing code, lsb first transmitted. |
|
|
0x0400 |
PAL line 16 |
Byte number 3 to 15 according to Figure 9 of ETS 300 231, lsb first transmitted. |
|
|
0x1000 |
NTSC line 21, 284 (second field 21) |
Two bytes in transmission order, including parity bit, lsb first transmitted. |
|
|
0x4000 |
PAL/SECAM line 23 |
See V4L2_SLICED_VBI_CAP WSS_625 payload below. |
|
|
0x1000 |
Set of services applicable to 525 line systems. |
||
|
0x4401 |
Set of services applicable to 625 line systems. |
7.40.4.1. V4L2_SLICED_VBI_CAP WSS_625 payload¶
The payload for V4L2_SLICED_WSS_625
is:
Byte
0
1
Bit
msb
lsb
msb
lsb
7
6
5
4
3
2
1
0
x
x
13
12
11
10
9
8
7.40.5. Return Value¶
On success 0 is returned, on error -1 and the errno
variable is set
appropriately. The generic error codes are described at the
Generic Error Codes chapter.
- EINVAL
The value in the
type
field is wrong.