summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2009-09-05 22:50:48 +0100
committerDamien Lespiau <damien.lespiau@intel.com>2009-09-05 22:50:48 +0100
commita98e0a09e36e0c680368279793d803ba384939b6 (patch)
treef80a619ee6c3a523b0f2a6045c117eb0c852b981
parentc3f5fd7f51502e886791a1b76574a769a9e38524 (diff)
downloadclutter-gst-a98e0a09e36e0c680368279793d803ba384939b6.tar.gz
[tests] Extends test-alpha with RGB videos
It just works.
-rw-r--r--tests/test-alpha.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/tests/test-alpha.c b/tests/test-alpha.c
index 4a9dbc1..224062d 100644
--- a/tests/test-alpha.c
+++ b/tests/test-alpha.c
@@ -34,6 +34,8 @@
static gint opt_framerate = 30;
static gchar *opt_fourcc = "I420";
+static gint opt_bpp = 24;
+static gint opt_depth = 24;
static GOptionEntry options[] =
{
@@ -166,11 +168,26 @@ main (int argc, char *argv[])
sink = clutter_gst_video_sink_new (CLUTTER_TEXTURE (texture));
/* make videotestsrc spit the format we want */
- caps = gst_caps_new_simple ("video/x-raw-yuv",
- "format", GST_TYPE_FOURCC,
- parse_fourcc (opt_fourcc),
- "framerate", GST_TYPE_FRACTION, opt_framerate, 1,
- NULL);
+ if (g_strcmp0 (opt_fourcc, "RGB ") == 0)
+ {
+ caps = gst_caps_new_simple ("video/x-raw-rgb",
+ "bpp", G_TYPE_INT, opt_bpp,
+ "depth", G_TYPE_INT, opt_depth,
+ "framerate", GST_TYPE_FRACTION,
+ opt_framerate, 1,
+ NULL);
+
+ }
+ else
+ {
+ caps = gst_caps_new_simple ("video/x-raw-yuv",
+ "format", GST_TYPE_FOURCC,
+ parse_fourcc (opt_fourcc),
+ "framerate", GST_TYPE_FRACTION,
+ opt_framerate, 1,
+ NULL);
+ }
+
g_object_set (capsfilter, "caps", caps, NULL);
g_printf ("%s: [caps] %s\n", __FILE__, gst_caps_to_string (caps));