aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2009-03-14 16:06:07 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:43:22 -0400
commit6273fda6e32e2cd9a478545d0cbc15ac497b1f4b (patch)
tree0b44d28fd3fb2092b332c8372b7325ca18f004ee /include/linux
parent77ac0baf24d1a43498f7bdf6efa2ee6c4ed0ebaa (diff)
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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ivtv.h10
-rw-r--r--include/linux/videodev2.h47
2 files changed, 52 insertions, 5 deletions
diff --git a/include/linux/ivtv.h b/include/linux/ivtv.h
index f2720280b9ec..062d20f74322 100644
--- a/include/linux/ivtv.h
+++ b/include/linux/ivtv.h
@@ -60,10 +60,10 @@ struct ivtv_dma_frame {
60 60
61#define IVTV_IOC_DMA_FRAME _IOW ('V', BASE_VIDIOC_PRIVATE+0, struct ivtv_dma_frame) 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. */ 63/* Deprecated defines: applications should use the defines from videodev2.h */
64#define IVTV_SLICED_TYPE_TELETEXT_B (1) 64#define IVTV_SLICED_TYPE_TELETEXT_B V4L2_MPEG_VBI_IVTV_TELETEXT_B
65#define IVTV_SLICED_TYPE_CAPTION_525 (4) 65#define IVTV_SLICED_TYPE_CAPTION_525 V4L2_MPEG_VBI_IVTV_CAPTION_525
66#define IVTV_SLICED_TYPE_WSS_625 (5) 66#define IVTV_SLICED_TYPE_WSS_625 V4L2_MPEG_VBI_IVTV_WSS_625
67#define IVTV_SLICED_TYPE_VPS (7) 67#define IVTV_SLICED_TYPE_VPS V4L2_MPEG_VBI_IVTV_VPS
68 68
69#endif /* _LINUX_IVTV_H */ 69#endif /* _LINUX_IVTV_H */
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 78ba0755ffb3..61f1a4921afd 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -1348,6 +1348,53 @@ struct v4l2_sliced_vbi_data {
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
1372struct 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
1377struct 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
1382struct 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
1389struct 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 * A G G R E G A T E S T R U C T U R E S 1398 * A G G R E G A T E S T R U C T U R E S
1352 */ 1399 */
1353 1400