From be22feb106f3c63f58ce7c8ffbcb9a987b0e0d9b Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 10 Feb 2012 15:41:36 +0100 Subject: [PATCH] tests: don't run with unsupported formats videoconvert does not work with GRAY formats yet so don't try to run the unit test with it. --- tests/check/elements/videoscale.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/check/elements/videoscale.c b/tests/check/elements/videoscale.c index 0e3095e4..0cf0812 100644 --- a/tests/check/elements/videoscale.c +++ b/tests/check/elements/videoscale.c @@ -72,7 +72,7 @@ on_sink_handoff (GstElement * element, GstBuffer * buffer, GstPad * pad, } static gboolean -caps_are_64bpp (const GstCaps * caps) +caps_is_supported (const GstCaps * caps) { GstVideoFormat fmt; GstStructure *s; @@ -87,7 +87,9 @@ caps_are_64bpp (const GstCaps * caps) fmt = gst_video_format_from_string (format); fail_if (fmt == GST_VIDEO_FORMAT_UNKNOWN); - return (fmt == GST_VIDEO_FORMAT_ARGB64 || fmt == GST_VIDEO_FORMAT_AYUV64); + return (fmt == GST_VIDEO_FORMAT_ARGB64 || fmt == GST_VIDEO_FORMAT_AYUV64 + || fmt == GST_VIDEO_FORMAT_GRAY8 || fmt == GST_VIDEO_FORMAT_GRAY16_BE + || GST_VIDEO_FORMAT_GRAY16_LE); } static void @@ -105,7 +107,7 @@ run_test (const GstCaps * caps, gint src_width, gint src_height, guint n_buffers = 0; /* skip formats that videoconvert can't handle */ - if (caps_are_64bpp (caps)) + if (caps_is_supported (caps)) return; pipeline = gst_element_factory_make ("pipeline", "pipeline"); @@ -225,7 +227,7 @@ GST_START_TEST (test_passthrough) for (method = 0; method < 3; method++) { /* skip formats that videoconvert can't handle */ - if (caps_are_64bpp (caps)) + if (caps_is_supported (caps)) continue; GST_DEBUG ("Running test for caps '%" GST_PTR_FORMAT "'" -- 2.7.4