+2008-12-19 Alessandro Decina <alessandro.decina@collabora.co.uk>
+
+ * gst/gstghostpad.c:
+ * tests/check/gst/gstghostpad.c:
+ Don't forward gst_pad_set_caps() on a source ghostpad to its target.
+ That would cause the ghostpad to emit notify::caps two times (fist
+ from gst_pad_set_caps() and after from on_src_target_notify()).
+
2008-12-19 Wim Taymans <wim.taymans@collabora.co.uk>
* tests/check/gst/gstghostpad.c: (ghost_notify_caps),
}
+static gboolean
+gst_ghost_pad_do_setcaps (GstPad * pad, GstCaps * caps)
+{
+ if (GST_PAD_DIRECTION (pad) == GST_PAD_SRC)
+ return TRUE;
+
+ return gst_proxy_pad_do_setcaps (pad, caps);
+}
+
static void
gst_ghost_pad_init (GstGhostPad * pad)
{
GST_GHOST_PAD_PRIVATE (pad) = G_TYPE_INSTANCE_GET_PRIVATE (pad,
GST_TYPE_GHOST_PAD, GstGhostPadPrivate);
+ gst_pad_set_setcaps_function (GST_PAD_CAST (pad),
+ GST_DEBUG_FUNCPTR (gst_ghost_pad_do_setcaps));
gst_pad_set_activatepull_function (GST_PAD_CAST (pad),
GST_DEBUG_FUNCPTR (gst_ghost_pad_do_activate_pull));
gst_pad_set_activatepush_function (GST_PAD_CAST (pad),
caps1 = gst_caps_from_string ("meh");
fail_unless (gst_pad_set_caps (ghost, caps1));
caps2 = GST_PAD_CAPS (src);
- fail_unless (gst_caps_is_equal (caps1, caps2));
+ fail_unless (caps2 == NULL);
fail_unless_equals_int (notify_counter, 1);
gst_object_unref (ghost);