summaryrefslogtreecommitdiffstats
path: root/tests/check/elements
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2006-09-29 15:39:41 +0000
committerTim-Philipp Müller <tim@centricular.net>2006-09-29 15:39:41 +0000
commit475aed8af6d2a57c1d21490c824e754a6b2367a9 (patch)
treeabae26a9871e632a0639936743edc485ff0e8cfa /tests/check/elements
parent6e0855034567eb50e9e2b1d897e6d0f39f10ec4b (diff)
tests/check/Makefile.am: Disable autodetect test temporarily, so that the build bots update -bad and the ranks of unr...
Original commit message from CVS: * tests/check/Makefile.am: Disable autodetect test temporarily, so that the build bots update -bad and the ranks of unreliable video sinks in there. * tests/check/elements/autodetect.c: (GST_START_TEST): Skip test if no usable videosink is found.
Diffstat (limited to 'tests/check/elements')
-rw-r--r--tests/check/elements/autodetect.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/tests/check/elements/autodetect.c b/tests/check/elements/autodetect.c
index 65562439..a7b61909 100644
--- a/tests/check/elements/autodetect.c
+++ b/tests/check/elements/autodetect.c
@@ -30,10 +30,23 @@ GST_START_TEST (test_autovideosink_ghostpad_error_case)
GstElement *pipeline, *src, *filter, *sink;
GstCaps *caps;
+ /* check that there's a usable video sink (think of build bot case) */
+ sink = gst_element_factory_make ("autovideosink", NULL);
+ state_ret = gst_element_set_state (sink, GST_STATE_READY);
+
+ /* need to set state back to NULL, or our test won't work since we
+ * already have detected the real caps in ready and then linking fails */
+ gst_element_set_state (sink, GST_STATE_NULL);
+
+ if (state_ret != GST_STATE_CHANGE_SUCCESS) {
+ GST_WARNING ("No usable video sink, skipping test");
+ gst_object_unref (sink);
+ return;
+ }
+
pipeline = gst_pipeline_new ("pipeline");
src = gst_element_factory_make ("fakesrc", NULL);
filter = gst_element_factory_make ("capsfilter", NULL);
- sink = gst_element_factory_make ("autovideosink", NULL);
caps = gst_caps_new_simple ("video/x-raw-yuv", "format", GST_TYPE_FOURCC,
GST_MAKE_FOURCC ('A', 'C', 'D', 'C'), NULL);
@@ -71,10 +84,23 @@ GST_START_TEST (test_autoaudiosink_ghostpad_error_case)
GstElement *pipeline, *src, *filter, *sink;
GstCaps *caps;
+ /* check that there's a usable audio sink (think of build bot case) */
+ sink = gst_element_factory_make ("autoaudiosink", NULL);
+ state_ret = gst_element_set_state (sink, GST_STATE_READY);
+
+ /* need to set state back to NULL, or our test won't work since we
+ * already have detected the real caps in ready and then linking fails */
+ gst_element_set_state (sink, GST_STATE_NULL);
+
+ if (state_ret != GST_STATE_CHANGE_SUCCESS) {
+ GST_WARNING ("No usable audio sink, skipping test");
+ gst_object_unref (sink);
+ return;
+ }
+
pipeline = gst_pipeline_new ("pipeline");
src = gst_element_factory_make ("fakesrc", NULL);
filter = gst_element_factory_make ("capsfilter", NULL);
- sink = gst_element_factory_make ("autoaudiosink", NULL);
caps = gst_caps_new_simple ("audio/x-raw-int", "width", G_TYPE_INT, 42, NULL);