summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2009-04-26 15:34:36 -0400
committerAndy Walls <awalls@radix.net>2009-04-26 15:34:36 -0400
commitf839a7e32846bf9f12045aec9371b228c0e6dcbf (patch)
tree22a199b0abd421af5a6c83baeaec60fb4c0123da /linux/drivers/media/video
parent34efc2efeab79b43139454c4daeef94ff1b69f2c (diff)
downloadmediapointer-dvb-s2-f839a7e32846bf9f12045aec9371b228c0e6dcbf.tar.gz
mediapointer-dvb-s2-f839a7e32846bf9f12045aec9371b228c0e6dcbf.tar.bz2
cx18: Allow IVTV format VBI insertion in MPEG-2 SVCD and DVD streams
From: Andy Walls <awalls@radix.net> Both the MPEG-2 SVCD stream format and the MPEG-2 DVD stream format should use an MPEG-2 PS container. This makes it safe to stuff IVTV Private Stream 1 VBI packets in these stream types using the existing cx18 driver routines. Reported-by: Helen Buus <mythtv@hbuus.com> Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/cx18/cx18-controls.c6
-rw-r--r--linux/drivers/media/video/cx18/cx18-fileops.c7
2 files changed, 10 insertions, 3 deletions
diff --git a/linux/drivers/media/video/cx18/cx18-controls.c b/linux/drivers/media/video/cx18/cx18-controls.c
index 82fc2f9d4..8e35c3aed 100644
--- a/linux/drivers/media/video/cx18/cx18-controls.c
+++ b/linux/drivers/media/video/cx18/cx18-controls.c
@@ -176,8 +176,10 @@ static int cx18_setup_vbi_fmt(struct cx18 *cx,
return -EBUSY;
if (fmt != V4L2_MPEG_STREAM_VBI_FMT_IVTV ||
- type != V4L2_MPEG_STREAM_TYPE_MPEG2_PS) {
- /* We don't do VBI insertion aside from IVTV format in a PS */
+ !(type == V4L2_MPEG_STREAM_TYPE_MPEG2_PS ||
+ type == V4L2_MPEG_STREAM_TYPE_MPEG2_DVD ||
+ type == V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD)) {
+ /* Only IVTV fmt VBI insertion & only MPEG-2 PS type streams */
cx->vbi.insert_mpeg = V4L2_MPEG_STREAM_VBI_FMT_NONE;
CX18_DEBUG_INFO("disabled insertion of sliced VBI data into "
"the MPEG stream\n");
diff --git a/linux/drivers/media/video/cx18/cx18-fileops.c b/linux/drivers/media/video/cx18/cx18-fileops.c
index d20ac818f..817bb9263 100644
--- a/linux/drivers/media/video/cx18/cx18-fileops.c
+++ b/linux/drivers/media/video/cx18/cx18-fileops.c
@@ -301,8 +301,13 @@ static size_t cx18_copy_buf_to_user(struct cx18_stream *s,
* an MPEG-2 Program Pack start code, and provide only
* up to that point to the user, so it's easy to insert VBI data
* the next time around.
+ *
+ * This will not work for an MPEG-2 TS and has only been
+ * verified by analysis to work for an MPEG-2 PS. Helen Buus
+ * pointed out this works for the CX23416 MPEG-2 DVD compatible
+ * stream, and research indicates both the MPEG 2 SVCD and DVD
+ * stream types use an MPEG-2 PS container.
*/
- /* FIXME - This only works for an MPEG-2 PS, not a TS */
/*
* An MPEG-2 Program Stream (PS) is a series of
* MPEG-2 Program Packs terminated by an