mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 20:59:44 +00:00
libs/gst/check/gstcheck.c: Activate/deactivate pads in setup/teardown respectively.
Original commit message from CVS: * libs/gst/check/gstcheck.c: (gst_check_setup_src_pad), (gst_check_teardown_src_pad), (gst_check_setup_sink_pad), (gst_check_teardown_sink_pad): Activate/deactivate pads in setup/teardown respectively.
This commit is contained in:
parent
8c9c6d060c
commit
c549303d73
2 changed files with 16 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2006-10-10 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* libs/gst/check/gstcheck.c: (gst_check_setup_src_pad),
|
||||||
|
(gst_check_teardown_src_pad), (gst_check_setup_sink_pad),
|
||||||
|
(gst_check_teardown_sink_pad):
|
||||||
|
Activate/deactivate pads in setup/teardown respectively.
|
||||||
|
|
||||||
2006-10-10 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
2006-10-10 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||||
|
|
||||||
Patch by: Josep Torre Valles <josep@fluendo.com>
|
Patch by: Josep Torre Valles <josep@fluendo.com>
|
||||||
|
|
|
@ -183,6 +183,8 @@ gst_check_setup_src_pad (GstElement * element,
|
||||||
gst_object_unref (sinkpad); /* because we got it higher up */
|
gst_object_unref (sinkpad); /* because we got it higher up */
|
||||||
ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 1);
|
ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 1);
|
||||||
|
|
||||||
|
gst_pad_set_active (srcpad, TRUE);
|
||||||
|
|
||||||
return srcpad;
|
return srcpad;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,6 +198,8 @@ gst_check_teardown_src_pad (GstElement * element)
|
||||||
ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 2);
|
ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 2);
|
||||||
srcpad = gst_pad_get_peer (sinkpad);
|
srcpad = gst_pad_get_peer (sinkpad);
|
||||||
|
|
||||||
|
gst_pad_set_active (srcpad, FALSE);
|
||||||
|
|
||||||
gst_pad_unlink (srcpad, sinkpad);
|
gst_pad_unlink (srcpad, sinkpad);
|
||||||
|
|
||||||
/* caps could have been set, make sure they get unset */
|
/* caps could have been set, make sure they get unset */
|
||||||
|
@ -238,6 +242,8 @@ gst_check_setup_sink_pad (GstElement * element, GstStaticPadTemplate * template,
|
||||||
gst_object_unref (srcpad); /* because we got it higher up */
|
gst_object_unref (srcpad); /* because we got it higher up */
|
||||||
ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 1);
|
ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 1);
|
||||||
|
|
||||||
|
gst_pad_set_active (sinkpad, TRUE);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (element, "set up srcpad, refcount is 1");
|
GST_DEBUG_OBJECT (element, "set up srcpad, refcount is 1");
|
||||||
return sinkpad;
|
return sinkpad;
|
||||||
}
|
}
|
||||||
|
@ -250,6 +256,9 @@ gst_check_teardown_sink_pad (GstElement * element)
|
||||||
/* clean up floating sink pad */
|
/* clean up floating sink pad */
|
||||||
srcpad = gst_element_get_pad (element, "src");
|
srcpad = gst_element_get_pad (element, "src");
|
||||||
sinkpad = gst_pad_get_peer (srcpad);
|
sinkpad = gst_pad_get_peer (srcpad);
|
||||||
|
|
||||||
|
gst_pad_set_active (sinkpad, FALSE);
|
||||||
|
|
||||||
gst_pad_unlink (srcpad, sinkpad);
|
gst_pad_unlink (srcpad, sinkpad);
|
||||||
|
|
||||||
/* pad refs held by both creator and this function (through _get_pad) */
|
/* pad refs held by both creator and this function (through _get_pad) */
|
||||||
|
|
Loading…
Reference in a new issue