[gst-cvs] gstreamer: ghostpad: Implement iterate internal links

Sebastian Dröge slomo at kemper.freedesktop.org
Sun Nov 1 02:27:04 PST 2009


Module: gstreamer
Branch: master
Commit: 15229ab6697a40357679c0ff31efe1b2b147b12b
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=15229ab6697a40357679c0ff31efe1b2b147b12b

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Sun Nov  1 11:24:40 2009 +0100

ghostpad: Implement iterate internal links

The internally linked pad of the ghost pad is its
proxy pad, which is the pad that is linked to the ghost
pads target.

---

 gst/gstghostpad.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/gst/gstghostpad.c b/gst/gstghostpad.c
index b5a6299..2eb1a0f 100644
--- a/gst/gstghostpad.c
+++ b/gst/gstghostpad.c
@@ -763,6 +763,21 @@ gst_ghost_pad_do_setcaps (GstPad * pad, GstCaps * caps)
   return gst_proxy_pad_do_setcaps (pad, caps);
 }
 
+static GstIterator *
+gst_ghost_pad_do_iterate_internal_links (GstPad * pad)
+{
+  GstIterator *res = NULL;
+  GstPad *internal = GST_PROXY_PAD_INTERNAL (GST_GHOST_PAD_CAST (pad));
+
+  if (internal) {
+    res =
+        gst_iterator_new_single (GST_TYPE_PAD, internal,
+        (GstCopyFunction) gst_object_ref, (GFreeFunc) gst_object_unref);
+  }
+
+  return res;
+}
+
 static void
 gst_ghost_pad_init (GstGhostPad * pad)
 {
@@ -775,6 +790,8 @@ gst_ghost_pad_init (GstGhostPad * pad)
       GST_DEBUG_FUNCPTR (gst_ghost_pad_do_activate_pull));
   gst_pad_set_activatepush_function (GST_PAD_CAST (pad),
       GST_DEBUG_FUNCPTR (gst_ghost_pad_do_activate_push));
+  gst_pad_set_iterate_internal_links_function (GST_PAD_CAST (pad),
+      GST_DEBUG_FUNCPTR (gst_ghost_pad_do_iterate_internal_links));
 }
 
 static void





More information about the Gstreamer-commits mailing list