mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-04 05:22:30 +00:00
demux: Push STREAM_START event when needed
This commit is contained in:
parent
0cff483bd7
commit
f063e40af7
5 changed files with 7 additions and 0 deletions
|
@ -1183,6 +1183,7 @@ gst_dvdemux_demux_audio (GstDVDemux * dvdemux, GstBuffer * buffer,
|
|||
gst_audio_info_set_format (&info, GST_AUDIO_FORMAT_S16LE,
|
||||
frequency, channels, NULL);
|
||||
caps = gst_audio_info_to_caps (&info);
|
||||
gst_pad_push_event (dvdemux->audiosrcpad, gst_event_new_stream_start ());
|
||||
gst_pad_set_caps (dvdemux->audiosrcpad, caps);
|
||||
gst_caps_unref (caps);
|
||||
}
|
||||
|
@ -1272,6 +1273,7 @@ gst_dvdemux_demux_video (GstDVDemux * dvdemux, GstBuffer * buffer,
|
|||
"framerate", GST_TYPE_FRACTION, dvdemux->framerate_numerator,
|
||||
dvdemux->framerate_denominator,
|
||||
"pixel-aspect-ratio", GST_TYPE_FRACTION, par_x, par_y, NULL);
|
||||
gst_pad_push_event (dvdemux->videosrcpad, gst_event_new_stream_start ());
|
||||
gst_pad_set_caps (dvdemux->videosrcpad, caps);
|
||||
gst_caps_unref (caps);
|
||||
}
|
||||
|
|
|
@ -2299,6 +2299,7 @@ gst_avi_demux_parse_stream (GstAviDemux * avi, GstBuffer * buf)
|
|||
avi->num_streams++;
|
||||
|
||||
gst_pad_set_active (pad, TRUE);
|
||||
gst_pad_push_event (pad, gst_event_new_stream_start ());
|
||||
gst_pad_set_caps (pad, caps);
|
||||
gst_caps_unref (caps);
|
||||
|
||||
|
|
|
@ -732,6 +732,7 @@ gst_flv_demux_audio_negotiate (GstFlvDemux * demux, guint32 codec_tag,
|
|||
demux->audio_codec_data, NULL);
|
||||
}
|
||||
|
||||
gst_pad_push_event (demux->audio_pad, gst_event_new_stream_start ());
|
||||
ret = gst_pad_set_caps (demux->audio_pad, caps);
|
||||
|
||||
if (G_LIKELY (ret)) {
|
||||
|
@ -1178,6 +1179,7 @@ gst_flv_demux_video_negotiate (GstFlvDemux * demux, guint32 codec_tag)
|
|||
demux->video_codec_data, NULL);
|
||||
}
|
||||
|
||||
gst_pad_push_event (demux->video_pad, gst_event_new_stream_start ());
|
||||
ret = gst_pad_set_caps (demux->video_pad, caps);
|
||||
|
||||
if (G_LIKELY (ret)) {
|
||||
|
|
|
@ -5201,6 +5201,7 @@ gst_qtdemux_add_stream (GstQTDemux * qtdemux,
|
|||
gst_pad_set_active (stream->pad, TRUE);
|
||||
|
||||
GST_DEBUG_OBJECT (qtdemux, "setting caps %" GST_PTR_FORMAT, stream->caps);
|
||||
gst_pad_push_event (stream->pad, gst_event_new_stream_start ());
|
||||
gst_pad_set_caps (stream->pad, stream->caps);
|
||||
|
||||
GST_DEBUG_OBJECT (qtdemux, "adding pad %s %p to qtdemux %p",
|
||||
|
|
|
@ -1329,6 +1329,7 @@ gst_matroska_demux_add_stream (GstMatroskaDemux * demux, GstEbmlRead * ebml)
|
|||
|
||||
gst_pad_use_fixed_caps (context->pad);
|
||||
gst_pad_set_active (context->pad, TRUE);
|
||||
gst_pad_push_event (context->pad, gst_event_new_stream_start ());
|
||||
gst_pad_set_caps (context->pad, context->caps);
|
||||
gst_element_add_pad (GST_ELEMENT (demux), context->pad);
|
||||
|
||||
|
|
Loading…
Reference in a new issue