tests: no need to blacklist 64-bit formats in videoscale test any longer
authorTim-Philipp Müller <tim@centricular.net>
Mon, 16 Jul 2012 23:31:57 +0000 (00:31 +0100)
committerTim-Philipp Müller <tim@centricular.net>
Mon, 16 Jul 2012 23:31:57 +0000 (00:31 +0100)
Since we now use videoconvert, which supports these.

Unfortunately videoscale still crashes with 64-bit formats
right now because of a too small temp buffer, but I'm sure
someone is going to fix this real soon now, just like the
other unit tests.

tests/check/elements/videoscale.c

index 86fc3af..a0125d6 100644 (file)
@@ -187,24 +187,10 @@ on_sink_handoff (GstElement * element, GstBuffer * buffer, GstPad * pad,
 }
 
 static gboolean
-caps_is_supported (const GstCaps * caps)
+videoconvert_supports_caps (const GstCaps * caps)
 {
-  GstVideoFormat fmt;
-  GstStructure *s;
-  const gchar *format;
-
   GST_DEBUG ("have caps %" GST_PTR_FORMAT, caps);
-
-  s = gst_caps_get_structure (caps, 0);
-  format = gst_structure_get_string (s, "format");
-  fail_if (format == NULL);
-
-  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
-      || fmt == GST_VIDEO_FORMAT_GRAY8 || fmt == GST_VIDEO_FORMAT_GRAY16_BE
-      || fmt == GST_VIDEO_FORMAT_GRAY16_LE);
+  return TRUE;
 }
 
 static void
@@ -222,7 +208,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_is_supported (caps))
+  if (!videoconvert_supports_caps (caps))
     return;
 
   pipeline = gst_element_factory_make ("pipeline", "pipeline");
@@ -341,9 +327,8 @@ test_passthrough (int method)
     GstCaps *caps = *p;
 
     /* skip formats that videoconvert can't handle */
-    if (caps_is_supported (caps)) {
+    if (!videoconvert_supports_caps (caps))
       goto next;
-    }
 
     GST_DEBUG ("Running test for caps '%" GST_PTR_FORMAT "'"
         " from %dx%u to %dx%d with method %d", caps, src_width, src_height,