mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
tests: fix old caps in tests now that core warns
This commit is contained in:
parent
a8dcb63616
commit
92b61a6a18
10 changed files with 32 additions and 32 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -29,12 +29,12 @@
|
|||
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;
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -24,12 +24,12 @@
|
|||
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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -27,16 +27,16 @@
|
|||
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,
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in a new issue