mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-24 17:44:14 +00:00
merge patch from bug 106875 created by Martin Soto
Original commit message from CVS: merge patch from bug 106875 created by Martin Soto
This commit is contained in:
parent
947ec8e6f5
commit
f573818eb0
2 changed files with 23 additions and 0 deletions
gst/mpegstream
|
@ -116,6 +116,17 @@ GST_PAD_TEMPLATE_FACTORY (private2_factory,
|
|||
)
|
||||
);
|
||||
|
||||
GST_PAD_TEMPLATE_FACTORY (pcm_factory,
|
||||
"pcm_stream_%02d",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_SOMETIMES,
|
||||
GST_CAPS_NEW (
|
||||
"mpeg_demux_pcm",
|
||||
"audio/x-lpcm",
|
||||
NULL
|
||||
)
|
||||
);
|
||||
|
||||
GST_PAD_TEMPLATE_FACTORY (subtitle_factory,
|
||||
"subtitle_stream_%d",
|
||||
GST_PAD_SRC,
|
||||
|
@ -773,6 +784,11 @@ gst_mpeg_demux_parse_pes (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
|
|||
headerlen += 4;
|
||||
datalen -= 4;
|
||||
break;
|
||||
case 0xA0 ... 0xA7:
|
||||
GST_DEBUG (0, "we have a pcm_stream packet, track %d",
|
||||
ps_id_code - 0xA0);
|
||||
outstream = &mpeg_demux->pcm_stream[ps_id_code - 0xA0];
|
||||
break;
|
||||
case 0x20 ... 0x2f:
|
||||
GST_DEBUG (0, "we have a subtitle_stream packet, track %d",
|
||||
ps_id_code - 0x20);
|
||||
|
@ -825,6 +841,10 @@ gst_mpeg_demux_parse_pes (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
|
|||
name = g_strdup_printf ("private_stream_1.%d",ps_id_code - 0x80);
|
||||
newtemp = GST_PAD_TEMPLATE_GET (private1_factory);
|
||||
break;
|
||||
case 0xA0 ... 0xA7:
|
||||
name = g_strdup_printf ("pcm_stream_%d", ps_id_code - 0xA0);
|
||||
newtemp = GST_PAD_TEMPLATE_GET (pcm_factory);
|
||||
break;
|
||||
case 0x20 ... 0x2F:
|
||||
name = g_strdup_printf ("subtitle_stream_%d",ps_id_code - 0x20);
|
||||
newtemp = GST_PAD_TEMPLATE_GET (subtitle_factory);
|
||||
|
@ -1072,6 +1092,7 @@ gst_mpeg_demux_plugin_init (GModule *module, GstPlugin *plugin)
|
|||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (video_mpeg2_factory));
|
||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (private1_factory));
|
||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (private2_factory));
|
||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (pcm_factory));
|
||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (subtitle_factory));
|
||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (audio_factory));
|
||||
|
||||
|
|
|
@ -76,12 +76,14 @@ struct _GstMPEGDemux {
|
|||
gint64 total_size_bound;
|
||||
|
||||
#define NUM_PRIVATE_1_STREAMS 8
|
||||
#define NUM_PCM_STREAMS 8
|
||||
#define NUM_SUBTITLE_STREAMS 16
|
||||
#define NUM_VIDEO_STREAMS 16
|
||||
#define NUM_AUDIO_STREAMS 32
|
||||
|
||||
/* stream output */
|
||||
GstMPEGStream *private_1_stream[NUM_PRIVATE_1_STREAMS]; /* up to 8 ac3 audio tracks */
|
||||
GstMPEGStream *pcm_stream[NUM_PCM_STREAMS];
|
||||
GstMPEGStream *subtitle_stream[NUM_SUBTITLE_STREAMS];
|
||||
GstMPEGStream *private_2_stream;
|
||||
GstMPEGStream *video_stream[NUM_VIDEO_STREAMS];
|
||||
|
|
Loading…
Reference in a new issue