diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2009-08-05 11:29:49 +0100 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2009-08-05 11:29:49 +0100 |
commit | 5f3bb469be57aff749c16665df3196451883bad8 (patch) | |
tree | ab4b2a3e83e991a5e236ed8722a7da9ac8077b1a | |
parent | 9a8646a73e900160dd803f45a731e354c6623aec (diff) |
[test] Port the tests to the new clutter_gst_init_with_args() API
-rw-r--r-- | tests/test-rgb-upload.c | 18 | ||||
-rw-r--r-- | 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 (); |