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:
Wim Taymans 2006-10-10 14:09:43 +00:00
parent 8c9c6d060c
commit c549303d73
2 changed files with 16 additions and 0 deletions

View file

@ -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>
Patch by: Josep Torre Valles <josep@fluendo.com>

View file

@ -183,6 +183,8 @@ gst_check_setup_src_pad (GstElement * element,
gst_object_unref (sinkpad); /* because we got it higher up */
ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 1);
gst_pad_set_active (srcpad, TRUE);
return srcpad;
}
@ -196,6 +198,8 @@ gst_check_teardown_src_pad (GstElement * element)
ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 2);
srcpad = gst_pad_get_peer (sinkpad);
gst_pad_set_active (srcpad, FALSE);
gst_pad_unlink (srcpad, sinkpad);
/* 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 */
ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 1);
gst_pad_set_active (sinkpad, TRUE);
GST_DEBUG_OBJECT (element, "set up srcpad, refcount is 1");
return sinkpad;
}
@ -250,6 +256,9 @@ gst_check_teardown_sink_pad (GstElement * element)
/* clean up floating sink pad */
srcpad = gst_element_get_pad (element, "src");
sinkpad = gst_pad_get_peer (srcpad);
gst_pad_set_active (sinkpad, FALSE);
gst_pad_unlink (srcpad, sinkpad);
/* pad refs held by both creator and this function (through _get_pad) */