tee: Set GST_PAD_FLAG_PROXY_CAPS before forwarding sticky events
[platform/upstream/gstreamer.git] / plugins / elements / gststreamiddemux.c
index 8528acb..49fc290 100644 (file)
  */
 
 /**
- * SECTION:element-streamid-demux
- * @see_also: #GstFunnel
+ * SECTION:element-streamiddemux
  *
- * Direct input stream to one out of N output pads by stream-id.
+ * The basic concept was started from de-funneling element which restores one
+ * serialized stream via #GstFunnel to its original state. #GstStreamidDemux
+ * classifies each stream base on stream ids.
+ *
+ * The stream id demux always takes one input and checks how many streams
+ * are contained in a stream by STREAM_START event. Likewise #GstFunnel,
+ * #GstStreamidDemux does not synchronize the different output streams.
+ *
+ * #GstStreamidDemux:active-pad provides information about which output pad
+ * is activated at the moment.
+ *
+ * @see_also: #GstFunnel, #gst_event_new_stream_start
  */
 
 #ifdef HAVE_CONFIG_H
@@ -100,11 +110,11 @@ gst_streamid_demux_class_init (GstStreamidDemuxClass * klass)
   gst_element_class_set_static_metadata (gstelement_class, "Streamid Demux",
       "Generic", "1-to-N output stream by stream-id",
       "HoonHee Lee <hoonhee.lee@lge.com>");
-  gst_element_class_add_pad_template (gstelement_class,
-      gst_static_pad_template_get (&gst_streamid_demux_sink_factory));
+  gst_element_class_add_static_pad_template (gstelement_class,
+      &gst_streamid_demux_sink_factory);
 
-  gst_element_class_add_pad_template (gstelement_class,
-      gst_static_pad_template_get (&gst_streamid_demux_src_factory));
+  gst_element_class_add_static_pad_template (gstelement_class,
+      &gst_streamid_demux_src_factory);
 
   gstelement_class->change_state = gst_streamid_demux_change_state;
 }
@@ -353,6 +363,7 @@ gst_streamid_demux_reset (GstStreamidDemux * demux)
   if (demux->active_srcpad != NULL)
     demux->active_srcpad = NULL;
 
+  demux->nb_srcpads = 0;
   GST_OBJECT_UNLOCK (demux);
 
   if (demux->stream_id_pairs != NULL) {