mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
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.
This commit is contained in:
parent
e22f406a9a
commit
be22feb106
1 changed files with 6 additions and 4 deletions
|
@ -72,7 +72,7 @@ on_sink_handoff (GstElement * element, GstBuffer * buffer, GstPad * pad,
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
caps_are_64bpp (const GstCaps * caps)
|
caps_is_supported (const GstCaps * caps)
|
||||||
{
|
{
|
||||||
GstVideoFormat fmt;
|
GstVideoFormat fmt;
|
||||||
GstStructure *s;
|
GstStructure *s;
|
||||||
|
@ -87,7 +87,9 @@ caps_are_64bpp (const GstCaps * caps)
|
||||||
fmt = gst_video_format_from_string (format);
|
fmt = gst_video_format_from_string (format);
|
||||||
fail_if (fmt == GST_VIDEO_FORMAT_UNKNOWN);
|
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
|
static void
|
||||||
|
@ -105,7 +107,7 @@ run_test (const GstCaps * caps, gint src_width, gint src_height,
|
||||||
guint n_buffers = 0;
|
guint n_buffers = 0;
|
||||||
|
|
||||||
/* skip formats that videoconvert can't handle */
|
/* skip formats that videoconvert can't handle */
|
||||||
if (caps_are_64bpp (caps))
|
if (caps_is_supported (caps))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pipeline = gst_element_factory_make ("pipeline", "pipeline");
|
pipeline = gst_element_factory_make ("pipeline", "pipeline");
|
||||||
|
@ -225,7 +227,7 @@ GST_START_TEST (test_passthrough)
|
||||||
|
|
||||||
for (method = 0; method < 3; method++) {
|
for (method = 0; method < 3; method++) {
|
||||||
/* skip formats that videoconvert can't handle */
|
/* skip formats that videoconvert can't handle */
|
||||||
if (caps_are_64bpp (caps))
|
if (caps_is_supported (caps))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
GST_DEBUG ("Running test for caps '%" GST_PTR_FORMAT "'"
|
GST_DEBUG ("Running test for caps '%" GST_PTR_FORMAT "'"
|
||||||
|
|
Loading…
Reference in a new issue