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
This commit is contained in:
Aurélien Zanelli 2015-03-24 15:17:16 +01:00 committed by Tim-Philipp Müller
parent ab2656ebe5
commit 633b4db556

View file

@ -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);