alessandro gstreamer: gstreamer/ gstreamer/gst/ gstreamer/tests/check/gst/
[email protected] Fri, 19 Dec 2008 07:11:20 -0800 (PST)
| Newsgroups | gmane.comp.video.gstreamer.cvs |
|---|---|
| Message-ID | <[email protected]> |
CVS Root: /cvs/gstreamer
Module: gstreamer
Changes by: alessandro
Date: Fri Dec 19 2008 15:11:20 UTC
Log message:
* 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()).
Modified files:
. : ChangeLog
gst : gstghostpad.c
tests/check/gst : gstghostpad.c
Links:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.4203&r2=1.4204
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstghostpad.c.diff?r1=1.61&r2=1.62
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/tests/check/gst/gstghostpad.c.diff?r1=1.32&r2=1.33
====Begin Diffs====
Index: ChangeLog
===================================================================
RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v
retrieving revision 1.4203
retrieving revision 1.4204
diff -u -d -r1.4203 -r1.4204
--- ChangeLog 19 Dec 2008 11:24:33 -0000 1.4203
+++ ChangeLog 19 Dec 2008 15:11:03 -0000 1.4204
@@ -1,3 +1,11 @@
+2008-12-19 Alessandro Decina <[email protected]>
+
+ * 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 <[email protected]>
* tests/check/gst/gstghostpad.c: (ghost_notify_caps),
Index: gstghostpad.c
RCS file: /cvs/gstreamer/gstreamer/gst/gstghostpad.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- gstghostpad.c 17 Dec 2008 16:16:45 -0000 1.61
+++ gstghostpad.c 19 Dec 2008 15:11:05 -0000 1.62
@@ -704,12 +704,23 @@
}
+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),
RCS file: /cvs/gstreamer/gstreamer/tests/check/gst/gstghostpad.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- gstghostpad.c 19 Dec 2008 11:24:36 -0000 1.32
+++ gstghostpad.c 19 Dec 2008 15:11:06 -0000 1.33
@@ -721,7 +721,7 @@
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);
------------------------------------------------------------------------------