[gst-cvs] gst-plugins-good: switchsrc: Set the GST_ELEMENT_IS_SOURCE flag

Sebastian Dröge slomo at kemper.freedesktop.org
Mon Oct 11 05:24:57 PDT 2010


Module: gst-plugins-good
Branch: master
Commit: 5c1f6c890b313510114d3965a23b2eef4b5d3cf5
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=5c1f6c890b313510114d3965a23b2eef4b5d3cf5

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Mon Oct 11 14:21:07 2010 +0200

switchsrc: Set the GST_ELEMENT_IS_SOURCE flag

---

 ext/gconf/gstswitchsrc.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/ext/gconf/gstswitchsrc.c b/ext/gconf/gstswitchsrc.c
index 61ab31f..0136e4a 100644
--- a/ext/gconf/gstswitchsrc.c
+++ b/ext/gconf/gstswitchsrc.c
@@ -89,6 +89,8 @@ gst_switch_src_init (GstSwitchSrc * src, GstSwitchSrcClass * g_class)
   gst_element_add_pad (GST_ELEMENT (src), src->pad);
 
   gst_switch_src_reset (src);
+
+  GST_OBJECT_FLAG_SET (src, GST_ELEMENT_IS_SOURCE);
 }
 
 static void
@@ -191,6 +193,8 @@ gst_switch_src_commit_new_kid (GstSwitchSrc * src)
     gst_element_set_state (old_kid, GST_STATE_NULL);
     gst_bin_remove (GST_BIN (src), old_kid);
     gst_object_unref (old_kid);
+    /* Don't lose the SOURCE flag */
+    GST_OBJECT_FLAG_SET (src, GST_ELEMENT_IS_SOURCE);
   }
 
   /* re-attach ghostpad */





More information about the Gstreamer-commits mailing list