Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

V4L/DVB (11042): v4l2-api: Add definitions for V4L2_MPEG_STREAM_VBI_FMT_IVTV payloads

This addition to the v4l2-api add definitions for the constants and
data structures used for sliced VBI data insertion into MPEG streams triggered
by V4L2_MPEG_STREAM_VBI_FMT_IVTV. This simply declares what the ivtv and
cx18 drivers and MythTV have already been doing and provides a proper data
structure definition to user space.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Andy Walls and committed by
Mauro Carvalho Chehab
6273fda6 77ac0baf

+52 -5
+5 -5
include/linux/ivtv.h
··· 60 60 61 61 #define IVTV_IOC_DMA_FRAME _IOW ('V', BASE_VIDIOC_PRIVATE+0, struct ivtv_dma_frame) 62 62 63 - /* These are the VBI types as they appear in the embedded VBI private packets. */ 64 - #define IVTV_SLICED_TYPE_TELETEXT_B (1) 65 - #define IVTV_SLICED_TYPE_CAPTION_525 (4) 66 - #define IVTV_SLICED_TYPE_WSS_625 (5) 67 - #define IVTV_SLICED_TYPE_VPS (7) 63 + /* Deprecated defines: applications should use the defines from videodev2.h */ 64 + #define IVTV_SLICED_TYPE_TELETEXT_B V4L2_MPEG_VBI_IVTV_TELETEXT_B 65 + #define IVTV_SLICED_TYPE_CAPTION_525 V4L2_MPEG_VBI_IVTV_CAPTION_525 66 + #define IVTV_SLICED_TYPE_WSS_625 V4L2_MPEG_VBI_IVTV_WSS_625 67 + #define IVTV_SLICED_TYPE_VPS V4L2_MPEG_VBI_IVTV_VPS 68 68 69 69 #endif /* _LINUX_IVTV_H */
+47
include/linux/videodev2.h
··· 1348 1348 }; 1349 1349 1350 1350 /* 1351 + * Sliced VBI data inserted into MPEG Streams 1352 + */ 1353 + 1354 + /* 1355 + * V4L2_MPEG_STREAM_VBI_FMT_IVTV: 1356 + * 1357 + * Structure of payload contained in an MPEG 2 Private Stream 1 PES Packet in an 1358 + * MPEG-2 Program Pack that contains V4L2_MPEG_STREAM_VBI_FMT_IVTV Sliced VBI 1359 + * data 1360 + * 1361 + * Note, the MPEG-2 Program Pack and Private Stream 1 PES packet header 1362 + * definitions are not included here. See the MPEG-2 specifications for details 1363 + * on these headers. 1364 + */ 1365 + 1366 + /* Line type IDs */ 1367 + #define V4L2_MPEG_VBI_IVTV_TELETEXT_B (1) 1368 + #define V4L2_MPEG_VBI_IVTV_CAPTION_525 (4) 1369 + #define V4L2_MPEG_VBI_IVTV_WSS_625 (5) 1370 + #define V4L2_MPEG_VBI_IVTV_VPS (7) 1371 + 1372 + struct v4l2_mpeg_vbi_itv0_line { 1373 + __u8 id; /* One of V4L2_MPEG_VBI_IVTV_* above */ 1374 + __u8 data[42]; /* Sliced VBI data for the line */ 1375 + } __attribute__ ((packed)); 1376 + 1377 + struct v4l2_mpeg_vbi_itv0 { 1378 + __le32 linemask[2]; /* Bitmasks of VBI service lines present */ 1379 + struct v4l2_mpeg_vbi_itv0_line line[35]; 1380 + } __attribute__ ((packed)); 1381 + 1382 + struct v4l2_mpeg_vbi_ITV0 { 1383 + struct v4l2_mpeg_vbi_itv0_line line[36]; 1384 + } __attribute__ ((packed)); 1385 + 1386 + #define V4L2_MPEG_VBI_IVTV_MAGIC0 "itv0" 1387 + #define V4L2_MPEG_VBI_IVTV_MAGIC1 "ITV0" 1388 + 1389 + struct v4l2_mpeg_vbi_fmt_ivtv { 1390 + __u8 magic[4]; 1391 + union { 1392 + struct v4l2_mpeg_vbi_itv0 itv0; 1393 + struct v4l2_mpeg_vbi_ITV0 ITV0; 1394 + }; 1395 + } __attribute__ ((packed)); 1396 + 1397 + /* 1351 1398 * A G G R E G A T E S T R U C T U R E S 1352 1399 */ 1353 1400