gst/gstghostpad.c (gst_ghost_pad_do_activate_push): Proxy activate_push down to the...
authorAndy Wingo <wingo@pobox.com>
Thu, 30 Jun 2005 11:39:34 +0000 (11:39 +0000)
committerAndy Wingo <wingo@pobox.com>
Thu, 30 Jun 2005 11:39:34 +0000 (11:39 +0000)
Original commit message from CVS:
2005-06-30  Andy Wingo  <wingo@pobox.com>

* gst/gstghostpad.c (gst_ghost_pad_do_activate_push): Proxy
activate_push down to the internal pad as well.

ChangeLog
gst/gstghostpad.c

index ef65576..900d034 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-06-30  Andy Wingo  <wingo@pobox.com>
+
+       * gst/gstghostpad.c (gst_ghost_pad_do_activate_push): Proxy
+       activate_push down to the internal pad as well.
+
 2005-06-30  Torsten Schoenfeld  <kaffeetisch@gmx.de>
 
        Reviewed by:  Ronald S. Bultje  <rbultje@ronald.bitfreak.net>
index ed76c3e..0aa5dd1 100644 (file)
@@ -506,6 +506,26 @@ gst_ghost_proxy_pad_do_activate_pull (GstPad * pad, gboolean active)
   return ret;
 }
 
+static gboolean
+gst_ghost_pad_do_activate_push (GstPad * pad, gboolean active)
+{
+  GstPad *internal;
+  gboolean ret;
+
+  ret = gst_proxy_pad_do_activatepush (pad, active);
+
+  GST_LOCK (pad);
+
+  internal = GST_GHOST_PAD (pad)->internal;
+
+  if (internal)
+    ret &= gst_pad_activate_push (internal, active);
+
+  GST_UNLOCK (pad);
+
+  return ret;
+}
+
 static GstPadLinkReturn
 gst_ghost_pad_do_link (GstPad * pad, GstPad * peer)
 {
@@ -680,6 +700,7 @@ gst_ghost_pad_new (const gchar * name, GstPad * target)
       "direction", GST_PAD_DIRECTION (target),
       "template", GST_PAD_PAD_TEMPLATE (target), "target", target, NULL);
 
+  gst_pad_set_activatepush_function (ret, gst_ghost_pad_do_activate_push);
   gst_pad_set_link_function (ret, gst_ghost_pad_do_link);
   gst_pad_set_unlink_function (ret, gst_ghost_pad_do_unlink);