From 5f3bb469be57aff749c16665df3196451883bad8 Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Wed, 5 Aug 2009 11:29:49 +0100 Subject: [test] Port the tests to the new clutter_gst_init_with_args() API --- tests/test-rgb-upload.c | 18 +++++++++--------- tests/test-yuv-upload.c | 17 ++++++++--------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/tests/test-rgb-upload.c b/tests/test-rgb-upload.c index 8491f5a..e5be8be 100644 --- a/tests/test-rgb-upload.c +++ b/tests/test-rgb-upload.c @@ -101,7 +101,6 @@ size_change (ClutterTexture *texture, int main (int argc, char *argv[]) { - GOptionContext *context; GError *error = NULL; gboolean result; ClutterActor *stage; @@ -115,18 +114,19 @@ main (int argc, char *argv[]) if (!g_thread_supported ()) g_thread_init (NULL); - context = g_option_context_new (" - test-colorspace options"); - g_option_context_add_group (context, gst_init_get_option_group ()); - g_option_context_add_group (context, clutter_get_option_group ()); - g_option_context_add_main_entries (context, options, NULL); - if (!g_option_context_parse (context, &argc, &argv, &error)) - { - g_option_context_free (context); + result = clutter_gst_init_with_args (&argc, + &argv, + " - Test RGB frames uploading", + options, + NULL, + &error); + if (error) + { g_print ("%s\n", error->message); g_error_free (error); - exit(EXIT_FAILURE); + return EXIT_FAILURE; } stage = clutter_stage_get_default (); diff --git a/tests/test-yuv-upload.c b/tests/test-yuv-upload.c index abc399e..996af24 100644 --- a/tests/test-yuv-upload.c +++ b/tests/test-yuv-upload.c @@ -100,7 +100,6 @@ size_change (ClutterTexture *texture, int main (int argc, char *argv[]) { - GOptionContext *context; GError *error = NULL; gboolean result; ClutterActor *stage; @@ -114,18 +113,18 @@ main (int argc, char *argv[]) if (!g_thread_supported ()) g_thread_init (NULL); - context = g_option_context_new (" - test-colorspace options"); - g_option_context_add_group (context, gst_init_get_option_group ()); - g_option_context_add_group (context, clutter_get_option_group ()); - g_option_context_add_main_entries (context, options, NULL); + result = clutter_gst_init_with_args (&argc, + &argv, + " - Test YUV frames uploading", + options, + NULL, + &error); - if (!g_option_context_parse (context, &argc, &argv, &error)) + if (error) { - g_option_context_free (context); - g_print ("%s\n", error->message); g_error_free (error); - exit(EXIT_FAILURE); + return EXIT_FAILURE; } stage = clutter_stage_get_default (); -- cgit v1.2.1