Commit 37329669 authored by Stefan Kost's avatar Stefan Kost
Browse files

tests/check/elements/: consistent pad (de)activation

Original commit message from CVS:
* tests/check/elements/mpeg2enc.c: (setup_mpeg2enc),
(cleanup_mpeg2enc):
* tests/check/elements/rganalysis.c: (cleanup_rganalysis):
* tests/check/elements/wavpackdec.c: (setup_wavpackdec),
(cleanup_wavpackdec):
* tests/check/elements/wavpackenc.c: (setup_wavpackenc),
(cleanup_wavpackenc):
* tests/check/elements/y4menc.c: (setup_y4menc), (cleanup_y4menc):
consistent pad (de)activation
parent 4b7d466a
...@@ -187,6 +187,8 @@ cleanup_rganalysis (GstElement * element) ...@@ -187,6 +187,8 @@ cleanup_rganalysis (GstElement * element)
/* The bus owns references to the element: */ /* The bus owns references to the element: */
gst_element_set_bus (element, NULL); gst_element_set_bus (element, NULL);
gst_pad_set_active (mysrcpad, FALSE);
gst_pad_set_active (mysinkpad, FALSE);
gst_check_teardown_src_pad (element); gst_check_teardown_src_pad (element);
gst_check_teardown_sink_pad (element); gst_check_teardown_sink_pad (element);
gst_check_teardown_element (element); gst_check_teardown_element (element);
......
...@@ -69,6 +69,8 @@ setup_wavpackdec () ...@@ -69,6 +69,8 @@ setup_wavpackdec ()
wavpackdec = gst_check_setup_element ("wavpackdec"); wavpackdec = gst_check_setup_element ("wavpackdec");
mysrcpad = gst_check_setup_src_pad (wavpackdec, &srctemplate, NULL); mysrcpad = gst_check_setup_src_pad (wavpackdec, &srctemplate, NULL);
mysinkpad = gst_check_setup_sink_pad (wavpackdec, &sinktemplate, NULL); mysinkpad = gst_check_setup_sink_pad (wavpackdec, &sinktemplate, NULL);
gst_pad_set_active (mysrcpad, TRUE);
gst_pad_set_active (mysinkpad, TRUE);
return wavpackdec; return wavpackdec;
} }
...@@ -79,6 +81,8 @@ cleanup_wavpackdec (GstElement * wavpackdec) ...@@ -79,6 +81,8 @@ cleanup_wavpackdec (GstElement * wavpackdec)
GST_DEBUG ("cleanup_wavpackdec"); GST_DEBUG ("cleanup_wavpackdec");
gst_element_set_state (wavpackdec, GST_STATE_NULL); gst_element_set_state (wavpackdec, GST_STATE_NULL);
gst_pad_set_active (mysrcpad, FALSE);
gst_pad_set_active (mysinkpad, FALSE);
gst_check_teardown_src_pad (wavpackdec); gst_check_teardown_src_pad (wavpackdec);
gst_check_teardown_sink_pad (wavpackdec); gst_check_teardown_sink_pad (wavpackdec);
gst_check_teardown_element (wavpackdec); gst_check_teardown_element (wavpackdec);
......
...@@ -62,6 +62,8 @@ setup_wavpackenc () ...@@ -62,6 +62,8 @@ setup_wavpackenc ()
wavpackenc = gst_check_setup_element ("wavpackenc"); wavpackenc = gst_check_setup_element ("wavpackenc");
mysrcpad = gst_check_setup_src_pad (wavpackenc, &srctemplate, NULL); mysrcpad = gst_check_setup_src_pad (wavpackenc, &srctemplate, NULL);
mysinkpad = gst_check_setup_sink_pad (wavpackenc, &sinktemplate, NULL); mysinkpad = gst_check_setup_sink_pad (wavpackenc, &sinktemplate, NULL);
gst_pad_set_active (mysrcpad, TRUE);
gst_pad_set_active (mysinkpad, TRUE);
fail_unless (gst_element_set_state (wavpackenc, fail_unless (gst_element_set_state (wavpackenc,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS, GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
...@@ -82,6 +84,8 @@ cleanup_wavpackenc (GstElement * wavpackenc) ...@@ -82,6 +84,8 @@ cleanup_wavpackenc (GstElement * wavpackenc)
gst_element_set_state (wavpackenc, GST_STATE_NULL); gst_element_set_state (wavpackenc, GST_STATE_NULL);
gst_pad_set_active (mysrcpad, FALSE);
gst_pad_set_active (mysinkpad, FALSE);
gst_check_teardown_src_pad (wavpackenc); gst_check_teardown_src_pad (wavpackenc);
gst_check_teardown_sink_pad (wavpackenc); gst_check_teardown_sink_pad (wavpackenc);
gst_check_teardown_element (wavpackenc); gst_check_teardown_element (wavpackenc);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment