summaryrefslogtreecommitdiff
path: root/linux/include
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2009-03-14 16:06:07 -0400
committerAndy Walls <awalls@radix.net>2009-03-14 16:06:07 -0400
commitd10ad49b94839cf1917bc102be086dc5de329208 (patch)
tree8618059bae1ff15658bbff0084651c3d7be4d6e8 /linux/include
parent92c93e32c6660ff3e40a6a93daba57bc15274ca3 (diff)
downloadmediapointer-dvb-s2-d10ad49b94839cf1917bc102be086dc5de329208.tar.gz
mediapointer-dvb-s2-d10ad49b94839cf1917bc102be086dc5de329208.tar.bz2
v4l2-api: Add definitions for V4L2_MPEG_STREAM_VBI_FMT_IVTV payloads
From: Andy Walls <awalls@radix.net> 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. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
Diffstat (limited to 'linux/include')
-rw-r--r--linux/include/linux/ivtv.h10
-rw-r--r--linux/include/linux/videodev2.h47
2 files changed, 52 insertions, 5 deletions
diff --git a/linux/include/linux/ivtv.h b/linux/include/linux/ivtv.h
index f2720280b..062d20f74 100644
--- a/linux/include/linux/ivtv.h
+++ b/linux/include/linux/ivtv.h
@@ -60,10 +60,10 @@ struct ivtv_dma_frame {
#define IVTV_IOC_DMA_FRAME _IOW ('V', BASE_VIDIOC_PRIVATE+0, struct ivtv_dma_frame)
-/* These are the VBI types as they appear in the embedded VBI private packets. */
-#define IVTV_SLICED_TYPE_TELETEXT_B (1)
-#define IVTV_SLICED_TYPE_CAPTION_525 (4)
-#define IVTV_SLICED_TYPE_WSS_625 (5)
-#define IVTV_SLICED_TYPE_VPS (7)
+/* Deprecated defines: applications should use the defines from videodev2.h */
+#define IVTV_SLICED_TYPE_TELETEXT_B V4L2_MPEG_VBI_IVTV_TELETEXT_B
+#define IVTV_SLICED_TYPE_CAPTION_525 V4L2_MPEG_VBI_IVTV_CAPTION_525
+#define IVTV_SLICED_TYPE_WSS_625 V4L2_MPEG_VBI_IVTV_WSS_625
+#define IVTV_SLICED_TYPE_VPS V4L2_MPEG_VBI_IVTV_VPS
#endif /* _LINUX_IVTV_H */
diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h
index 4167a0b44..b24163035 100644
--- a/linux/include/linux/videodev2.h
+++ b/linux/include/linux/videodev2.h
@@ -1348,6 +1348,53 @@ struct v4l2_sliced_vbi_data {
};
/*
+ * Sliced VBI data inserted into MPEG Streams
+ */
+
+/*
+ * V4L2_MPEG_STREAM_VBI_FMT_IVTV:
+ *
+ * Structure of payload contained in an MPEG 2 Private Stream 1 PES Packet in an
+ * MPEG-2 Program Pack that contains V4L2_MPEG_STREAM_VBI_FMT_IVTV Sliced VBI
+ * data
+ *
+ * Note, the MPEG-2 Program Pack and Private Stream 1 PES packet header
+ * definitions are not included here. See the MPEG-2 specifications for details
+ * on these headers.
+ */
+
+/* Line type IDs */
+#define V4L2_MPEG_VBI_IVTV_TELETEXT_B (1)
+#define V4L2_MPEG_VBI_IVTV_CAPTION_525 (4)
+#define V4L2_MPEG_VBI_IVTV_WSS_625 (5)
+#define V4L2_MPEG_VBI_IVTV_VPS (7)
+
+struct v4l2_mpeg_vbi_itv0_line {
+ __u8 id; /* One of V4L2_MPEG_VBI_IVTV_* above */
+ __u8 data[42]; /* Sliced VBI data for the line */
+} __attribute__ ((packed));
+
+struct v4l2_mpeg_vbi_itv0 {
+ __le32 linemask[2]; /* Bitmasks of VBI service lines present */
+ struct v4l2_mpeg_vbi_itv0_line line[35];
+} __attribute__ ((packed));
+
+struct v4l2_mpeg_vbi_ITV0 {
+ struct v4l2_mpeg_vbi_itv0_line line[36];
+} __attribute__ ((packed));
+
+#define V4L2_MPEG_VBI_IVTV_MAGIC0 "itv0"
+#define V4L2_MPEG_VBI_IVTV_MAGIC1 "ITV0"
+
+struct v4l2_mpeg_vbi_fmt_ivtv {
+ __u8 magic[4];
+ union {
+ struct v4l2_mpeg_vbi_itv0 itv0;
+ struct v4l2_mpeg_vbi_ITV0 ITV0;
+ };
+} __attribute__ ((packed));
+
+/*
* A G G R E G A T E S T R U C T U R E S
*/