Commit 65d59232 authored by Wim Taymans's avatar Wim Taymans
Browse files

tests: fix some more tests

parent b5f19694
......@@ -119,7 +119,7 @@ push_and_test (GstCaps * prop_caps, gboolean join, gboolean replace,
static GstCaps *
make_src_caps (void)
{
return gst_caps_new_simple ("video/x-raw-yuv", "width", G_TYPE_INT, SRC_WIDTH,
return gst_caps_new_simple ("video/x-foo", "width", G_TYPE_INT, SRC_WIDTH,
"height", G_TYPE_INT, SRC_HEIGHT, NULL);
}
......@@ -130,9 +130,9 @@ GST_START_TEST (test_n_join_n_replace)
GstCaps *in_caps, *prop_caps, *out_caps;
in_caps = make_src_caps ();
prop_caps = gst_caps_new_simple ("video/x-raw-rgb",
prop_caps = gst_caps_new_simple ("video/x-bar",
"width", G_TYPE_INT, 2 * SRC_WIDTH, NULL);
out_caps = gst_caps_new_simple ("video/x-raw-rgb",
out_caps = gst_caps_new_simple ("video/x-bar",
"width", G_TYPE_INT, 2 * SRC_WIDTH,
"height", G_TYPE_INT, SRC_HEIGHT, NULL);
push_and_test (prop_caps, FALSE, FALSE, in_caps, out_caps);
......@@ -145,7 +145,7 @@ GST_START_TEST (test_n_join_replace)
GstCaps *in_caps, *prop_caps, *out_caps;
in_caps = make_src_caps ();
prop_caps = gst_caps_new_simple ("video/x-raw-rgb",
prop_caps = gst_caps_new_simple ("video/x-bar",
"width", G_TYPE_INT, 2 * SRC_WIDTH, NULL);
out_caps = gst_caps_copy (prop_caps);
push_and_test (prop_caps, FALSE, TRUE, in_caps, out_caps);
......@@ -159,7 +159,7 @@ GST_START_TEST (test_join_n_replace_n_match)
/* non joining caps */
in_caps = make_src_caps ();
prop_caps = gst_caps_new_simple ("video/x-raw-rgb",
prop_caps = gst_caps_new_simple ("video/x-bar",
"width", G_TYPE_INT, 2 * SRC_WIDTH, NULL);
out_caps = gst_caps_copy (in_caps);
push_and_test (prop_caps, TRUE, FALSE, in_caps, out_caps);
......@@ -173,9 +173,9 @@ GST_START_TEST (test_join_n_replace_match)
/* joining caps */
in_caps = make_src_caps ();
prop_caps = gst_caps_new_simple ("video/x-raw-yuv",
prop_caps = gst_caps_new_simple ("video/x-foo",
"width", G_TYPE_INT, 2 * SRC_WIDTH, NULL);
out_caps = gst_caps_new_simple ("video/x-raw-yuv",
out_caps = gst_caps_new_simple ("video/x-foo",
"width", G_TYPE_INT, 2 * SRC_WIDTH,
"height", G_TYPE_INT, SRC_HEIGHT, NULL);
push_and_test (prop_caps, TRUE, FALSE, in_caps, out_caps);
......@@ -189,7 +189,7 @@ GST_START_TEST (test_join_replace_n_match)
/* non joining caps */
in_caps = make_src_caps ();
prop_caps = gst_caps_new_simple ("video/x-raw-rgb",
prop_caps = gst_caps_new_simple ("video/x-bar",
"width", G_TYPE_INT, 2 * SRC_WIDTH, NULL);
out_caps = gst_caps_copy (in_caps);
push_and_test (prop_caps, TRUE, TRUE, in_caps, out_caps);
......@@ -203,7 +203,7 @@ GST_START_TEST (test_join_replace_match)
/* joining caps */
in_caps = make_src_caps ();
prop_caps = gst_caps_new_simple ("video/x-raw-yuv",
prop_caps = gst_caps_new_simple ("video/x-foo",
"width", G_TYPE_INT, 2 * SRC_WIDTH, NULL);
out_caps = gst_caps_copy (prop_caps);
push_and_test (prop_caps, TRUE, TRUE, in_caps, out_caps);
......
......@@ -26,6 +26,8 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#define CAPS_RGB "video/x-raw, format=RGB"
#define CAPS_RGBA "video/x-raw, format=RGBA"
#define WxH ",width=(int)319,height=(int)241"
#define N_BUFFERS 5
......@@ -100,11 +102,11 @@ check_message_pixbuf (GstMessage * msg, const gchar * name, gint channels,
gboolean has_alpha)
{
GdkPixbuf *pixbuf;
GstStructure *s;
const GstStructure *s;
fail_unless (msg->structure != NULL);
fail_unless (gst_message_get_structure (msg) != NULL);
s = msg->structure;
s = gst_message_get_structure (msg);
fail_unless_equals_string (gst_structure_get_name (s), name);
fail_unless (gst_structure_has_field (s, "pixbuf"));
......@@ -129,7 +131,7 @@ GST_START_TEST (test_rgb)
GstBus *bus;
gint i;
gdkpixbufsink_init_test_context (&ctx, GST_VIDEO_CAPS_RGB WxH, N_BUFFERS);
gdkpixbufsink_init_test_context (&ctx, CAPS_RGB WxH, N_BUFFERS);
fail_unless (check_last_pixbuf (&ctx, NULL));
......@@ -206,7 +208,7 @@ GST_START_TEST (test_rgba)
GstBus *bus;
gint i;
gdkpixbufsink_init_test_context (&ctx, GST_VIDEO_CAPS_RGBA WxH, N_BUFFERS);
gdkpixbufsink_init_test_context (&ctx, CAPS_RGBA WxH, N_BUFFERS);
fail_unless (check_last_pixbuf (&ctx, NULL));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment