tests: enforce I420 format
authorGuillaume Desmottes <guillaume.desmottes@collabora.com>
Fri, 5 Jun 2020 13:26:58 +0000 (15:26 +0200)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 9 Jun 2020 08:09:58 +0000 (08:09 +0000)
Tests are assuming video is I420 but are not actually enforcing it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/689>

tests/check/elements/compositor.c
tests/validate/videorate/change_rate_reverse_playback.validatetest
tests/validate/videorate/change_rate_while_playing.validatetest
tests/validate/videorate/check-rate-prop.meta

index a1cec01..a02ed9e 100644 (file)
@@ -1580,7 +1580,7 @@ GST_START_TEST (test_obscured_skipped)
   gdouble alpha0, alpha1;
   const gchar *caps_str;
 
-  caps_str = "video/x-raw";
+  caps_str = "video/x-raw, format=I420";
   buffer_mapped = FALSE;
   /* Set else to compositor defaults */
   alpha0 = alpha1 = 1.0;
@@ -1602,7 +1602,7 @@ GST_START_TEST (test_obscured_skipped)
   _test_obscured (caps_str, xpos0, ypos0, width0, height0, alpha0, xpos1, ypos1,
       width1, height1, alpha1, out_width, out_height);
   fail_unless (buffer_mapped == TRUE);
-  caps_str = "video/x-raw";
+  caps_str = "video/x-raw, format=I420";
   buffer_mapped = FALSE;
 
   alpha1 = 0.0;
index 9230d6d..1282820 100644 (file)
@@ -3,7 +3,7 @@ meta,
     ignore-eos=true,
     args = {
         # We just want each frame to be different, and we just check their content by 'id'
-        "videotestsrc ! video/x-raw,framerate=10/1,width=320,height=240 ! videorate name=videorate ! fakesink sync=true qos=true",
+        "videotestsrc ! video/x-raw,format=I420,framerate=10/1,width=320,height=240 ! videorate name=videorate ! fakesink sync=true qos=true",
     },
     configs = {
         # Check dataflow on both videorate pads
index 125153e..ff0763e 100644 (file)
@@ -1,7 +1,7 @@
 meta,
     args = {
         # We just want each frame to be different, and we just check their content by 'id'
-        "videotestsrc ! video/x-raw,framerate=10/1,width=320,height=240 ! videorate name=videorate ! fakesink sync=true qos=true",
+        "videotestsrc ! video/x-raw,format=I420,framerate=10/1,width=320,height=240 ! videorate name=videorate ! fakesink sync=true qos=true",
     },
     configs = {
         # Check dataflow on both videorate pads
index 7a96680..344328e 100644 (file)
@@ -8,7 +8,7 @@
 
 meta,
     args = {
-        "videotestsrc pattern=ball animation-mode=frames ! video/x-raw,framerate=30/1,width=320,height=240 $(decoder) videorate name=videorate rate=$(rate) ! fakesink sync=true qos=true",
+        "videotestsrc pattern=ball animation-mode=frames ! video/x-raw,format=I420,framerate=30/1,width=320,height=240 $(decoder) videorate name=videorate rate=$(rate) ! fakesink sync=true qos=true",
     },
     configs = {
        "$(validateflow), pad=videorate:sink, buffers-checksum=as-id, ignored-event-types={ tag }",