summaryrefslogtreecommitdiff
path: root/gst/mpegtsdemux
diff options
context:
space:
mode:
authorAurélien Zanelli <aurelien.zanelli@parrot.com>2015-03-24 15:17:16 +0100
committerTim-Philipp Müller <tim@centricular.com>2015-06-02 12:41:26 +0100
commit633b4db556c7f9eaaa2819df6023013c533e2157 (patch)
tree1aa70a7d430d538108c63b2d826fe503df99cbd6 /gst/mpegtsdemux
parentab2656ebe5a61aa952bc455c1610cd247aa91791 (diff)
downloadgstreamer-plugins-bad-633b4db556c7f9eaaa2819df6023013c533e2157.tar.gz
tsdemux: enable Chinese AVS video stream
Chinese broadcaster encapsulate AVS video codec into MPEG2-TS. They use the stream_id 0x42 to identify AVS video streams. It should be noted that this id is currently within the ISO reserved range, hence it's utilisation is unofficial. https://bugzilla.gnome.org/show_bug.cgi?id=727731
Diffstat (limited to 'gst/mpegtsdemux')
-rw-r--r--gst/mpegtsdemux/tsdemux.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c
index 52ed207d5..5e54bec5d 100644
--- a/gst/mpegtsdemux/tsdemux.c
+++ b/gst/mpegtsdemux/tsdemux.c
@@ -205,6 +205,7 @@ struct _TSDemuxStream
"video/x-h264,stream-format=(string)byte-stream," \
"alignment=(string)nal;" \
"video/x-dirac;" \
+ "video/x-cavs;" \
"video/x-wmv," \
"wmvversion = (int) 3, " \
"format = (string) WVC1" \
@@ -1349,6 +1350,13 @@ create_pad_for_stream (MpegTSBase * base, MpegTSBaseStream * bstream,
caps = gst_caps_new_empty_simple ("subpicture/x-dvd");
sparse = TRUE;
break;
+ case 0x42:
+ /* hack for Chinese AVS video stream which use 0x42 as stream_id
+ * NOTE: this is unofficial and within the ISO reserved range. */
+ template = gst_static_pad_template_get (&video_template);
+ name = g_strdup_printf ("video_%04x", bstream->pid);
+ caps = gst_caps_new_empty_simple ("video/x-cavs");
+ break;
default:
GST_WARNING ("Non-media stream (stream_type:0x%x). Not creating pad",
bstream->stream_type);