tests: fix old caps in tests now that core warns
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 1 Mar 2012 10:06:49 +0000 (11:06 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 1 Mar 2012 16:41:56 +0000 (17:41 +0100)
tests/check/elements/capsfilter.c
tests/check/elements/tee.c
tests/check/elements/valve.c
tests/check/gst/capslist.h
tests/check/gst/gstelementfactory.c
tests/check/gst/gstghostpad.c
tests/check/gst/gstpad.c
tests/check/gst/gststructure.c
tests/check/pipelines/parse-launch.c
tests/check/pipelines/queue-error.c

index 17df2ca..cea6eac 100644 (file)
@@ -20,7 +20,7 @@
 #include <gst/check/gstcheck.h>
 
 #define CAPS_TEMPLATE_STRING            \
-    "audio/x-raw-int, "                 \
+    "audio/x-raw, "                     \
     "channels = (int) [ 1, 2], "        \
     "rate = (int) [ 1,  MAX ]"
 
@@ -43,7 +43,7 @@ GST_START_TEST (test_unfixed_downstream_caps)
   g_object_set (src, "sizetype", 2, "sizemax", 1024, "num-buffers", 1, NULL);
 
   filter = gst_check_setup_element ("capsfilter");
-  filter_caps = gst_caps_from_string ("audio/x-raw-int, rate=(int)44100");
+  filter_caps = gst_caps_from_string ("audio/x-raw, rate=(int)44100");
   fail_unless (filter_caps != NULL);
   g_object_set (filter, "caps", filter_caps, NULL);
 
index cc7e16d..3f68056 100644 (file)
@@ -123,7 +123,7 @@ GST_START_TEST (test_stress)
 
   /* Pump 1000 buffers (10 bytes each) per second through tee for 5 secs */
   desc = "fakesrc datarate=10000 sizemin=10 sizemax=10 num-buffers=5000 ! "
-      "video/x-raw-rgb,framerate=25/1 ! tee name=t ! "
+      "video/x-raw,framerate=25/1 ! tee name=t ! "
       "queue max-size-buffers=2 ! fakesink sync=true";
 
   pipeline = gst_parse_launch (desc, NULL);
@@ -193,7 +193,7 @@ buffer_alloc_harness_setup (BufferAllocHarness * h, gint countdown)
   fail_unless_equals_int (gst_element_set_state (h->tee, GST_STATE_PLAYING),
       TRUE);
 
-  h->caps = gst_caps_new_empty_simple ("video/x-raw-yuv");
+  h->caps = gst_caps_new_empty_simple ("video/x-raw");
 
   h->start_srcpad = gst_pad_new ("src", GST_PAD_SRC);
   fail_if (h->start_srcpad == NULL);
index 2d7ef33..932687c 100644 (file)
 static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_SINK,
     GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("audio/x-raw-int"));
+    GST_STATIC_CAPS ("audio/x-raw"));
 
 static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
     GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("audio/x-raw-int"));
+    GST_STATIC_CAPS ("audio/x-raw"));
 
 gboolean event_received = FALSE;
 gboolean buffer_allocated = FALSE;
index ea468b3..20c1409 100644 (file)
@@ -6,15 +6,15 @@
 
 static const gchar *caps_list[] = {
   "audio/x-adpcm, layout=(string)quicktime; audio/x-adpcm, layout=(string)quicktime; audio/x-adpcm, layout=(string)wav; audio/x-adpcm, layout=(string)wav; audio/x-adpcm, layout=(string)dk3; audio/x-adpcm, layout=(string)dk3; audio/x-adpcm, layout=(string)dk4; audio/x-adpcm, layout=(string)dk4; audio/x-adpcm, layout=(string)westwood; audio/x-adpcm, layout=(string)westwood; audio/x-adpcm, layout=(string)smjpeg; audio/x-adpcm, layout=(string)smjpeg; audio/x-adpcm, layout=(string)microsoft; audio/x-adpcm, layout=(string)microsoft; audio/x-adpcm, layout=(string)4xm; audio/x-adpcm, layout=(string)4xm; audio/x-adpcm, layout=(string)xa; audio/x-adpcm, layout=(string)xa; audio/x-adpcm, layout=(string)adx; audio/x-adpcm, layout=(string)adx; audio/x-adpcm, layout=(string)ea; audio/x-adpcm, layout=(string)ea; audio/x-adpcm, layout=(string)g726; audio/x-adpcm, layout=(string)g726",
-  "video/x-raw, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], format=(string)I420; video/x-raw, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], format=(string)YUY2; video/x-raw-rgb, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], bpp=(int)24, depth=(int)24, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, endianness=(int)4321; video/x-raw-rgb, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], bpp=(int)24, depth=(int)24, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, endianness=(int)4321; video/x-raw, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], format=(string)Y42B; video/x-raw-rgb, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], bpp=(int)32, depth=(int)24, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, endianness=(int)4321; video/x-raw, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], format=(string)YUV9; video/x-raw, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], format=(string)Y41B; video/x-raw-rgb, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], bpp=(int)16, depth=(int)16, red_mask=(int)63488, green_mask=(int)2016, blue_mask=(int)31, endianness=(int)1234; video/x-raw-rgb, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], bpp=(int)16, depth=(int)15, red_mask=(int)31744, green_mask=(int)992, blue_mask=(int)31, endianness=(int)1234",
+  "video/x-raw, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], format=(string)I420; video/x-raw, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], format=(string)YUY2; video/x-raw, format=(string)RGB, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw, format=(string)BGR, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], format=(string)Y42B; video/x-raw, format=(string)BGRx, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], format=(string)YUV9; video/x-raw, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], format=(string)Y41B; video/x-raw, format=(string)RGB16 ,width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw, format=(string)RGB15, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]",
   "video/x-raw, format=(string){ YUY2, I420 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-jpeg, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-divx, divxversion=(int)[ 3, 5 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-xvid, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-3ivx, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-msmpeg, msmpegversion=(int)[ 41, 43 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/mpeg, mpegversion=(int)1, systemstream=(boolean)false, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h263, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-dv, systemstream=(boolean)false, width=(int)720, height=(int){ 576, 480 }; video/x-huffyuv, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]",
   "video/x-raw, format=(string){ YUY2, I420 }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; image/jpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-divx, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], divxversion=(int)[ 3, 5 ]; video/x-xvid, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-3ivx, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-msmpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], msmpegversion=(int)[ 41, 43 ]; video/mpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], mpegversion=(int)1, systemstream=(boolean)false; video/x-h263, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-dv, width=(int)720, height=(int){ 576, 480 }, systemstream=(boolean)false; video/x-huffyuv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]",
-  "video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]",
-  "video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]",
+  "video/x-raw, format=(string)BGRx, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw, format=(string)RGBx, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]",
+  "video/x-raw, format=(string)BGRx, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]",
   "video/x-raw, format=(string){ I420 }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]",
-  "video/x-raw-rgb, bpp = (int) 32, depth = (int) 24, endianness = (int) BIG_ENDIAN, red_mask = (int) 0x000000FF, framerate = (double) [ 0, max ]",
-  "video/x-raw-rgb, bpp = (int) 32, depth = (int) 24, endianness = (int) BIG_ENDIAN, red_mask = (int) 0xFF000000, framerate = (double) [ 0, max ]",
-  "video/x-raw-rgb,\\ bpp=(int)32",
+  "video/x-raw, format=(string) xBGR, framerate = (double) [ 0, max ]",
+  "video/x-raw, format=(string) RGBx, framerate = (double) [ 0, max ]",
+  "video/x-raw,\\ format=(string) { RGBA, RGBx, BGRx, BGRA, xRGB, xBGR, ARGB, ABGR }",
   /* Test fraction type */
   "test/gst-fraction, fraction = (fraction) 1/8",
   "test/gst-fraction, fraction = (fraction) MIN",
index 2efb704..cd57387 100644 (file)
 static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_SINK,
     GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("audio/x-raw-int, " "channels = (int) [ 1, 6 ]")
+    GST_STATIC_CAPS ("audio/x-raw, " "channels = (int) [ 1, 6 ]")
     );
 static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
     GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("audio/x-raw-int, " "channels = (int) [ 1, 6 ]")
+    GST_STATIC_CAPS ("audio/x-raw, " "channels = (int) [ 1, 6 ]")
     );
 
 static void
@@ -86,7 +86,7 @@ GST_START_TEST (test_can_sink_any_caps)
   factory = setup_factory ();
   fail_if (factory == NULL);
 
-  caps = gst_caps_new_empty_simple ("audio/x-raw-int");
+  caps = gst_caps_new_empty_simple ("audio/x-raw");
   fail_if (caps == NULL);
   res = gst_element_factory_can_sink_any_caps (factory, caps);
   fail_if (!res);
@@ -107,7 +107,7 @@ GST_START_TEST (test_can_sink_all_caps)
   factory = setup_factory ();
   fail_if (factory == NULL);
 
-  caps = gst_caps_new_empty_simple ("audio/x-raw-int");
+  caps = gst_caps_new_empty_simple ("audio/x-raw");
   fail_if (caps == NULL);
   res = gst_element_factory_can_sink_all_caps (factory, caps);
   fail_if (res);
index 01fcb84..3212553 100644 (file)
@@ -1028,7 +1028,7 @@ GST_START_TEST (test_ghost_pads_change_when_linked)
   gst_bin_add (GST_BIN (b1), fmt);
   gst_bin_add (GST_BIN (b1), b2);
 
-  caps = gst_caps_from_string ("audio/x-raw-int, width=16, channels=1");
+  caps = gst_caps_from_string ("audio/x-raw, format=S16LE, channels=1");
   g_object_set (fmt, "caps", caps, NULL);
   gst_caps_unref (caps);
 
index 72b38f3..073a2ca 100644 (file)
@@ -849,9 +849,9 @@ GST_START_TEST (test_push_negotiation)
   GstPad *src, *sink;
   GstPadLinkReturn plr;
   GstCaps *srccaps =
-      gst_caps_from_string ("audio/x-raw-int,width={16,32},depth={16,32}");
+      gst_caps_from_string ("audio/x-raw,width={16,32},depth={16,32}");
   GstCaps *sinkcaps =
-      gst_caps_from_string ("audio/x-raw-int,width=32,depth={16,32}");
+      gst_caps_from_string ("audio/x-raw,width=32,depth={16,32}");
   GstPadTemplate *src_template;
   GstPadTemplate *sink_template;
   GstCaps *caps;
@@ -878,7 +878,7 @@ GST_START_TEST (test_push_negotiation)
   gst_pad_set_active (src, TRUE);
   gst_pad_set_active (sink, TRUE);
 
-  caps = gst_caps_from_string ("audio/x-raw-int,width=16,depth=16");
+  caps = gst_caps_from_string ("audio/x-raw,width=16,depth=16");
 
   /* Should fail if src pad caps are incompatible with sink pad caps */
   gst_pad_set_caps (src, caps);
index d78380a..3428d17 100644 (file)
 GST_START_TEST (test_from_string_int)
 {
   const char *strings[] = {
-    "video/x-raw-rgb, width = (int) 123456",
-    "video/x-raw-rgb, stride = (int) -123456",
-    "video/x-raw-rgb, red_mask = (int) 0xFFFF",
-    "video/x-raw-rgb, red_mask = (int) 0x0000FFFF",
-    "video/x-raw-rgb, red_mask = (int) 0x7FFFFFFF",
-    "video/x-raw-rgb, red_mask = (int) 0x80000000",
-    "video/x-raw-rgb, red_mask = (int) 0xFF000000",
+    "video/x-raw, width = (int) 123456",
+    "video/x-raw, stride = (int) -123456",
+    "video/x-raw, red_mask = (int) 0xFFFF",
+    "video/x-raw, red_mask = (int) 0x0000FFFF",
+    "video/x-raw, red_mask = (int) 0x7FFFFFFF",
+    "video/x-raw, red_mask = (int) 0x80000000",
+    "video/x-raw, red_mask = (int) 0xFF000000",
     /* result from
      * gst-launch ... ! "video/x-raw-rgb, red_mask=(int)0xFF000000" ! ... */
-    "video/x-raw-rgb,\\ red_mask=(int)0xFF000000",
+    "video/x-raw,\\ red_mask=(int)0xFF000000",
   };
   gint results[] = {
     123456,
index bfb2250..32ad9cf 100644 (file)
@@ -95,9 +95,9 @@ static const gchar *test_lines[] = {
   "filesrc location=music.ogg ! tee ! identity silent=true ! identity silent=true ! fakesink silent=true",
   "filesrc location=http://domain.com/music.mp3 ! identity silent=true ! fakesink silent=true",
   "filesrc location=movie.avi ! tee name=demuxer ! ( queue ! identity silent=true ! fakesink silent=true ) ( demuxer. ! queue ! identity silent=true ! fakesink silent=true )",
-  "fakesrc ! video/x-raw-yuv ! fakesink silent=true",
+  "fakesrc ! video/x-raw ! fakesink silent=true",
   "fakesrc !   video/raw,  format=(string)YUY2; video/raw, format=(string)YV12 ! fakesink silent=true",
-  "fakesrc ! audio/x-raw-int, width=[16,  32], depth={16, 24, 32}, signed=TRUE ! fakesink silent=true",
+  "fakesrc ! audio/x-raw, width=[16,  32], depth={16, 24, 32}, signed=TRUE ! fakesink silent=true",
   "fakesrc ! identity silent=true ! identity silent=true ! identity silent=true ! fakesink silent=true",
   "fakesrc name=100 fakesink name=101 silent=true 100. ! 101.",
   "fakesrc ! 1dentity ! fakesink silent=true",
index 123ba51..50f9104 100644 (file)
@@ -37,7 +37,7 @@ modify_caps (GstObject * pad, GstPadProbeInfo * info, gpointer data)
     return GST_PAD_PROBE_OK;
 
   /* trigger caps negotiation error */
-  caps = gst_caps_new_empty_simple ("video/x-raw-rgb");
+  caps = gst_caps_new_empty_simple ("video/x-raw");
   g_object_set (filter, "caps", caps, NULL);
   gst_caps_unref (caps);
 
@@ -53,7 +53,7 @@ GST_START_TEST (test_queue)
   GstPad *pad;
   guint probe;
   gchar *pipe_desc =
-      g_strdup_printf ("fakesrc num-buffers=1 ! video/x-raw-yuv ! "
+      g_strdup_printf ("fakesrc num-buffers=1 ! video/x-raw ! "
       "queue min-threshold-buffers=2 name=queue ! "
       "capsfilter name=nasty ! fakesink");