demux: Push STREAM_START event when needed
authorEdward Hervey <edward.hervey@collabora.co.uk>
Fri, 13 Jul 2012 11:51:48 +0000 (13:51 +0200)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Fri, 13 Jul 2012 11:51:48 +0000 (13:51 +0200)
ext/dv/gstdvdemux.c
gst/avi/gstavidemux.c
gst/flv/gstflvdemux.c
gst/isomp4/qtdemux.c
gst/matroska/matroska-demux.c

index 8c3ac9b..bfdabf8 100644 (file)
@@ -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);
   }
index 74207b8..84fcd4d 100644 (file)
@@ -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);
 
index aed10ae..3913602 100644 (file)
@@ -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)) {
index edd2747..2586b1d 100644 (file)
@@ -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",
index 1598811..af254eb 100644 (file)
@@ -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);