tests/check/elements/: Fix the dp tests, but activating the pads for the streamheader tests too and cleaning up condi...

Original commit message from CVS:
* tests/check/elements/gdpdepay.c: (cleanup_gdpdepay),
(setup_gdpdepay_streamheader):
* tests/check/elements/gdppay.c: (cleanup_gdppay),
(setup_gdppay_streamheader):
Fix the dp tests, but activating the pads for the streamheader tests
too and cleaning up conditionaly
This commit is contained in:
Stefan Kost 2006-12-22 12:10:18 +00:00 committed by Tim-Philipp Müller
parent 556f09893c
commit b8fad312fe
2 changed files with 16 additions and 2 deletions

View file

@ -84,10 +84,15 @@ cleanup_gdpdepay (GstElement * gdpdepay)
GST_DEBUG ("cleanup_gdpdepay"); GST_DEBUG ("cleanup_gdpdepay");
gst_pad_set_active (mysrcpad, FALSE); gst_pad_set_active (mysrcpad, FALSE);
if (mysinkpad)
gst_pad_set_active (mysinkpad, FALSE); gst_pad_set_active (mysinkpad, FALSE);
if (myshsinkpad)
gst_pad_set_active (myshsinkpad, FALSE);
gst_check_teardown_src_pad (gdpdepay); gst_check_teardown_src_pad (gdpdepay);
gst_check_teardown_sink_pad (gdpdepay); gst_check_teardown_sink_pad (gdpdepay);
gst_check_teardown_element (gdpdepay); gst_check_teardown_element (gdpdepay);
mysinkpad = NULL;
myshsinkpad = NULL;
} }
static void static void
@ -270,6 +275,8 @@ setup_gdpdepay_streamheader ()
gdpdepay = gst_check_setup_element ("gdpdepay"); gdpdepay = gst_check_setup_element ("gdpdepay");
mysrcpad = gst_check_setup_src_pad (gdpdepay, &srctemplate, NULL); mysrcpad = gst_check_setup_src_pad (gdpdepay, &srctemplate, NULL);
myshsinkpad = gst_check_setup_sink_pad (gdpdepay, &shsinktemplate, NULL); myshsinkpad = gst_check_setup_sink_pad (gdpdepay, &shsinktemplate, NULL);
gst_pad_set_active (mysrcpad, TRUE);
gst_pad_set_active (myshsinkpad, TRUE);
return gdpdepay; return gdpdepay;
} }

View file

@ -82,11 +82,16 @@ cleanup_gdppay (GstElement * gdppay)
{ {
GST_DEBUG ("cleanup_gdppay"); GST_DEBUG ("cleanup_gdppay");
if (mysrcpad)
gst_pad_set_active (mysrcpad, FALSE); gst_pad_set_active (mysrcpad, FALSE);
if (myshsrcpad)
gst_pad_set_active (myshsrcpad, FALSE);
gst_pad_set_active (mysinkpad, FALSE); gst_pad_set_active (mysinkpad, FALSE);
gst_check_teardown_src_pad (gdppay); gst_check_teardown_src_pad (gdppay);
gst_check_teardown_sink_pad (gdppay); gst_check_teardown_sink_pad (gdppay);
gst_check_teardown_element (gdppay); gst_check_teardown_element (gdppay);
mysrcpad = NULL;
myshsrcpad = NULL;
} }
GST_START_TEST (test_audio) GST_START_TEST (test_audio)
@ -220,6 +225,8 @@ setup_gdppay_streamheader ()
gdppay = gst_check_setup_element ("gdppay"); gdppay = gst_check_setup_element ("gdppay");
myshsrcpad = gst_check_setup_src_pad (gdppay, &shsrctemplate, NULL); myshsrcpad = gst_check_setup_src_pad (gdppay, &shsrctemplate, NULL);
mysinkpad = gst_check_setup_sink_pad (gdppay, &sinktemplate, NULL); mysinkpad = gst_check_setup_sink_pad (gdppay, &sinktemplate, NULL);
gst_pad_set_active (myshsrcpad, TRUE);
gst_pad_set_active (mysinkpad, TRUE);
return gdppay; return gdppay;
} }