summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/audio-player.c9
-rw-r--r--examples/video-player.c10
2 files changed, 10 insertions, 9 deletions
diff --git a/examples/audio-player.c b/examples/audio-player.c
index 796c7bb..613c9fa 100644
--- a/examples/audio-player.c
+++ b/examples/audio-player.c
@@ -32,15 +32,14 @@ main (int argc, char *argv[])
ClutterColor stage_color = { 0xcc, 0xcc, 0xcc, 0xff };
ClutterGstAudio *audio;
+ clutter_gst_init (&argc, &argv);
+
if (argc < 2)
{
- g_error ("Usage: %s URI", argv[0]);
- return 1;
+ g_print ("Usage: [OPTIONS] %s URI\n", argv[0]);
+ return EXIT_FAILURE;
}
- clutter_init (&argc, &argv);
- gst_init (&argc, &argv);
-
stage = clutter_stage_get_default ();
clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
diff --git a/examples/video-player.c b/examples/video-player.c
index 721014d..67b08ee 100644
--- a/examples/video-player.c
+++ b/examples/video-player.c
@@ -278,11 +278,13 @@ main (int argc, char *argv[])
ClutterColor control_color2 = { 0xcc, 0xcc, 0xcc, 0xff };
gfloat x,y;
- if (argc < 2)
- g_error("%s <video file>", argv[0]);
+ clutter_gst_init (&argc, &argv);
- clutter_init (&argc, &argv);
- gst_init (&argc, &argv);
+ if (argc < 2)
+ {
+ g_print ("Usage: %s [OPTIONS] <video file>\n", argv[0]);
+ return EXIT_FAILURE;
+ }
stage = clutter_stage_get_default ();
clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);