diff options
author | Seungha Yang <seungha@centricular.com> | 2021-04-28 00:57:35 +0900 |
---|---|---|
committer | Seungha Yang <seungha@centricular.com> | 2021-04-28 01:17:12 +0900 |
commit | 6cd13c3b0956c4b8994b18533085f3efa08dfe48 (patch) | |
tree | 17cafff4d0783710f142031b3c2f01068b852630 /examples | |
parent | 3ee867289762804d24557e80c3834b371507abb6 (diff) |
ges: Port to gst_print*
Sync with gst-launch, as g_print* will print broken string on Windows.
See also
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/258
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/245>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/c/concatenate.c | 6 | ||||
-rw-r--r-- | examples/c/ges-ui.c | 8 | ||||
-rw-r--r-- | examples/c/gessrc.c | 8 | ||||
-rw-r--r-- | examples/c/multifilesrc.c | 4 | ||||
-rw-r--r-- | examples/c/overlays.c | 4 | ||||
-rw-r--r-- | examples/c/play_timeline_with_one_clip.c | 5 | ||||
-rw-r--r-- | examples/c/simple1.c | 4 | ||||
-rw-r--r-- | examples/c/test2.c | 4 | ||||
-rw-r--r-- | examples/c/test3.c | 4 | ||||
-rw-r--r-- | examples/c/test4.c | 10 | ||||
-rw-r--r-- | examples/c/text_properties.c | 4 | ||||
-rw-r--r-- | examples/c/thumbnails.c | 12 | ||||
-rw-r--r-- | examples/c/transition.c | 8 |
13 files changed, 41 insertions, 40 deletions
diff --git a/examples/c/concatenate.c b/examples/c/concatenate.c index 3a0f54e5..b543cc99 100644 --- a/examples/c/concatenate.c +++ b/examples/c/concatenate.c @@ -85,7 +85,7 @@ main (int argc, char **argv) if (argc < 3) { - g_print ("Usage: %s <output uri> <list of files>\n", argv[0]); + gst_print ("Usage: %s <output uri> <list of files>\n", argv[0]); return -1; } @@ -131,11 +131,11 @@ bus_message_cb (GstBus * bus, GstMessage * message, GMainLoop * mainloop) { switch (GST_MESSAGE_TYPE (message)) { case GST_MESSAGE_ERROR: - g_print ("ERROR\n"); + gst_print ("ERROR\n"); g_main_loop_quit (mainloop); break; case GST_MESSAGE_EOS: - g_print ("Done\n"); + gst_print ("Done\n"); g_main_loop_quit (mainloop); break; default: diff --git a/examples/c/ges-ui.c b/examples/c/ges-ui.c index 45694a6b..5f7d2d5e 100644 --- a/examples/c/ges-ui.c +++ b/examples/c/ges-ui.c @@ -380,7 +380,7 @@ layer_object_removed_cb (GESLayer * layer, GESClip * clip, App * app) GST_INFO ("layer clip removed cb %p %p %p", layer, clip, app); if (!find_row_for_object (GTK_LIST_STORE (app->model), &iter, clip)) { - g_print ("clip deleted but we don't own it"); + gst_print ("clip deleted but we don't own it"); return; } app->n_objects--; @@ -446,11 +446,11 @@ project_bus_message_cb (GstBus * bus, GstMessage * message, { switch (GST_MESSAGE_TYPE (message)) { case GST_MESSAGE_ERROR: - g_printerr ("ERROR\n"); + gst_printerr ("ERROR\n"); g_main_loop_quit (mainloop); break; case GST_MESSAGE_EOS: - g_printerr ("Done\n"); + gst_printerr ("Done\n"); g_main_loop_quit (mainloop); break; default: @@ -466,7 +466,7 @@ bus_message_cb (GstBus * bus, GstMessage * message, App * app) switch (GST_MESSAGE_TYPE (message)) { case GST_MESSAGE_ERROR: - g_print ("ERROR\n"); + gst_print ("ERROR\n"); break; case GST_MESSAGE_EOS: gst_element_set_state (GST_ELEMENT (app->pipeline), GST_STATE_READY); diff --git a/examples/c/gessrc.c b/examples/c/gessrc.c index 8e520785..40917f14 100644 --- a/examples/c/gessrc.c +++ b/examples/c/gessrc.c @@ -28,11 +28,11 @@ bus_message_cb (GstBus * bus, GstMessage * message, GMainLoop * mainloop) { switch (GST_MESSAGE_TYPE (message)) { case GST_MESSAGE_ERROR: - g_printerr ("Got error message on the bus\n"); + gst_printerr ("Got error message on the bus\n"); g_main_loop_quit (mainloop); break; case GST_MESSAGE_EOS: - g_print ("Done\n"); + gst_print ("Done\n"); g_main_loop_quit (mainloop); break; default: @@ -60,7 +60,7 @@ main (int argc, char **argv) GstClockTime start = 0; if (argc < 2) { - g_print ("Usage: %s <list of files>\n", argv[0]); + gst_print ("Usage: %s <list of files>\n", argv[0]); return -1; } @@ -85,7 +85,7 @@ main (int argc, char **argv) clip = GES_CLIP (ges_uri_clip_new (uri)); if (!clip) { - g_printerr ("Could not create clip for file: %s\n", argv[i]); + gst_printerr ("Could not create clip for file: %s\n", argv[i]); g_free (uri); goto err; } diff --git a/examples/c/multifilesrc.c b/examples/c/multifilesrc.c index 05a4c298..ac57ff96 100644 --- a/examples/c/multifilesrc.c +++ b/examples/c/multifilesrc.c @@ -50,14 +50,14 @@ main (int argc, gchar ** argv) g_option_context_add_group (ctx, gst_init_get_option_group ()); if (!g_option_context_parse (ctx, &argc, &argv, &err)) { - g_print ("Error initializing %s\n", err->message); + gst_print ("Error initializing %s\n", err->message); g_option_context_free (ctx); g_clear_error (&err); exit (1); } if (filepattern == NULL) { - g_print ("%s", g_option_context_get_help (ctx, TRUE, NULL)); + gst_print ("%s", g_option_context_get_help (ctx, TRUE, NULL)); exit (0); } g_option_context_free (ctx); diff --git a/examples/c/overlays.c b/examples/c/overlays.c index d0edc3b5..331504f3 100644 --- a/examples/c/overlays.c +++ b/examples/c/overlays.c @@ -148,14 +148,14 @@ main (int argc, char **argv) g_option_context_add_group (ctx, gst_init_get_option_group ()); if (!g_option_context_parse (ctx, &argc, &argv, &err)) { - g_print ("Error initializing %s\n", err->message); + gst_print ("Error initializing %s\n", err->message); g_option_context_free (ctx); g_clear_error (&err); exit (1); } if (argc > 1) { - g_print ("%s", g_option_context_get_help (ctx, TRUE, NULL)); + gst_print ("%s", g_option_context_get_help (ctx, TRUE, NULL)); exit (0); } diff --git a/examples/c/play_timeline_with_one_clip.c b/examples/c/play_timeline_with_one_clip.c index cfb8481a..53ae235c 100644 --- a/examples/c/play_timeline_with_one_clip.c +++ b/examples/c/play_timeline_with_one_clip.c @@ -10,7 +10,7 @@ main (int argc, char **argv) GESTimeline *timeline; if (argc == 1) { - g_printerr ("Usage: play_timeline_with_one_clip file:///clip/uri\n"); + gst_printerr ("Usage: play_timeline_with_one_clip file:///clip/uri\n"); return 1; } @@ -26,7 +26,8 @@ main (int argc, char **argv) GESClip *clip = GES_CLIP (ges_uri_clip_new (argv[1])); if (clip == NULL) { - g_printerr ("%s can not be used, make sure it is a supported media file", + gst_printerr + ("%s can not be used, make sure it is a supported media file", argv[1]); return 1; diff --git a/examples/c/simple1.c b/examples/c/simple1.c index bc008e68..e97c84d3 100644 --- a/examples/c/simple1.c +++ b/examples/c/simple1.c @@ -56,14 +56,14 @@ main (int argc, gchar ** argv) g_option_context_add_group (ctx, gst_init_get_option_group ()); if (!g_option_context_parse (ctx, &argc, &argv, &err)) { - g_print ("Error initializing %s\n", err->message); + gst_print ("Error initializing %s\n", err->message); g_option_context_free (ctx); g_clear_error (&err); exit (1); } if (argc == 1) { - g_print ("%s", g_option_context_get_help (ctx, TRUE, NULL)); + gst_print ("%s", g_option_context_get_help (ctx, TRUE, NULL)); exit (0); } g_option_context_free (ctx); diff --git a/examples/c/test2.c b/examples/c/test2.c index c0bf994c..86229aa9 100644 --- a/examples/c/test2.c +++ b/examples/c/test2.c @@ -31,7 +31,7 @@ main (int argc, gchar ** argv) guint i; if (argc < 2) { - g_print ("Usage: %s <list of audio files>\n", argv[0]); + gst_print ("Usage: %s <list of audio files>\n", argv[0]); return -1; } @@ -58,7 +58,7 @@ main (int argc, gchar ** argv) if (!ges_timeline_add_track (timeline, tracka)) return -1; - /* Here we've finished initializing our timeline, we're + /* Here we've finished initializing our timeline, we're * ready to start using it... by solely working with the layer ! */ for (i = 1; i < argc; i++, offset += GST_SECOND) { diff --git a/examples/c/test3.c b/examples/c/test3.c index d458c977..51a6e31b 100644 --- a/examples/c/test3.c +++ b/examples/c/test3.c @@ -30,7 +30,7 @@ main (int argc, gchar ** argv) guint i; if (argc < 2) { - g_print ("Usage: %s <list of audio files>\n", argv[0]); + gst_print ("Usage: %s <list of audio files>\n", argv[0]); return -1; } @@ -57,7 +57,7 @@ main (int argc, gchar ** argv) if (!ges_timeline_add_track (timeline, tracka)) return -1; - /* Here we've finished initializing our timeline, we're + /* Here we've finished initializing our timeline, we're * ready to start using it... by solely working with the layer ! */ for (i = 1; i < argc; i++) { diff --git a/examples/c/test4.c b/examples/c/test4.c index 070b869e..1cec66b6 100644 --- a/examples/c/test4.c +++ b/examples/c/test4.c @@ -23,7 +23,7 @@ GstEncodingProfile *make_encoding_profile (gchar * audio, gchar * container); /* This example will take a series of files and create a audio-only timeline - * containing the first second of each file and render it to the output uri + * containing the first second of each file and render it to the output uri * using ogg/vorbis */ /* make_encoding_profile @@ -79,7 +79,7 @@ main (int argc, gchar ** argv) g_option_context_add_group (ctx, gst_init_get_option_group ()); if (!g_option_context_parse (ctx, &argc, &argv, &err)) { - g_printerr ("Error initializing: %s\n", err->message); + gst_printerr ("Error initializing: %s\n", err->message); g_option_context_free (ctx); g_clear_error (&err); return -1; @@ -87,7 +87,7 @@ main (int argc, gchar ** argv) g_option_context_free (ctx); if (argc < 3) { - g_print ("Usage: %s <output uri> <list of audio files>\n", argv[0]); + gst_print ("Usage: %s <output uri> <list of audio files>\n", argv[0]); return -1; } @@ -114,7 +114,7 @@ main (int argc, gchar ** argv) if (!ges_timeline_add_track (timeline, tracka)) return -1; - /* Here we've finished initializing our timeline, we're + /* Here we've finished initializing our timeline, we're * ready to start using it... by solely working with the layer ! */ for (i = 2; i < argc; i++) { @@ -147,7 +147,7 @@ main (int argc, gchar ** argv) } else if (g_file_test (argv[1], G_FILE_TEST_EXISTS)) { output_uri = gst_filename_to_uri (argv[1], NULL); } else { - g_printerr ("Unrecognised command line argument '%s'.\n" + gst_printerr ("Unrecognised command line argument '%s'.\n" "Please pass an URI or file as argument!\n", argv[1]); return -1; } diff --git a/examples/c/text_properties.c b/examples/c/text_properties.c index 3dc6e061..22525875 100644 --- a/examples/c/text_properties.c +++ b/examples/c/text_properties.c @@ -111,14 +111,14 @@ main (int argc, char **argv) g_option_context_add_group (ctx, gst_init_get_option_group ()); if (!g_option_context_parse (ctx, &argc, &argv, &err)) { - g_print ("Error initializing %s\n", err->message); + gst_print ("Error initializing %s\n", err->message); g_option_context_free (ctx); g_clear_error (&err); exit (1); } if (argc > 1) { - g_print ("%s", g_option_context_get_help (ctx, TRUE, NULL)); + gst_print ("%s", g_option_context_get_help (ctx, TRUE, NULL)); exit (0); } diff --git a/examples/c/thumbnails.c b/examples/c/thumbnails.c index 9211bc7f..0047cb5e 100644 --- a/examples/c/thumbnails.c +++ b/examples/c/thumbnails.c @@ -112,19 +112,19 @@ bus_message_cb (GstBus * bus, GstMessage * message, GMainLoop * mainloop) { switch (GST_MESSAGE_TYPE (message)) { case GST_MESSAGE_ERROR: - g_print ("ERROR\n"); + gst_print ("ERROR\n"); g_main_loop_quit (mainloop); break; case GST_MESSAGE_EOS: if (repeat > 0) { - g_print ("Looping again\n"); + gst_print ("Looping again\n"); /* No need to change state before */ gst_element_seek_simple (GST_ELEMENT (pipeline), GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, 0); gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING); repeat -= 1; } else { - g_print ("Done\n"); + gst_print ("Done\n"); g_main_loop_quit (mainloop); } break; @@ -150,7 +150,7 @@ main (int argc, gchar ** argv) g_option_context_add_group (ctx, gst_init_get_option_group ()); if (!g_option_context_parse (ctx, &argc, &argv, &err)) { - g_print ("Error initializing: %s\n", err->message); + gst_print ("Error initializing: %s\n", err->message); g_option_context_free (ctx); g_clear_error (&err); exit (1); @@ -170,7 +170,7 @@ main (int argc, gchar ** argv) /* Play the pipeline */ mainloop = g_main_loop_new (NULL, FALSE); - g_print ("thumbnailing every 1 seconds\n"); + gst_print ("thumbnailing every 1 seconds\n"); g_timeout_add (1000, thumbnail_cb, pipeline); bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); @@ -179,7 +179,7 @@ main (int argc, gchar ** argv) if (gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) { - g_print ("Failed to start the encoding\n"); + gst_print ("Failed to start the encoding\n"); return 1; } g_main_loop_run (mainloop); diff --git a/examples/c/transition.c b/examples/c/transition.c index 7992e2ac..8a385490 100644 --- a/examples/c/transition.c +++ b/examples/c/transition.c @@ -76,7 +76,7 @@ print_transition_data (GESClip * tr) g_object_get (nleobj, "start", &start, "duration", &duration, "priority", &priority, "name", &name, NULL); - g_print ("nleobject for %s: %f %f %d\n", name, + gst_print ("nleobject for %s: %f %f %d\n", name, ((gfloat) start) / GST_SECOND, ((gfloat) duration) / GST_SECOND, priority); @@ -128,7 +128,7 @@ make_timeline (gchar * nick, gdouble tdur, gchar * patha, gfloat adur, g_timeout_add_seconds (1, (GSourceFunc) print_transition_data, srcb); if (tduration != 0) { - g_print ("creating transition at %" GST_TIME_FORMAT " of %f duration (%" + gst_print ("creating transition at %" GST_TIME_FORMAT " of %f duration (%" GST_TIME_FORMAT ")\n", GST_TIME_ARGS (tstart), tdur, GST_TIME_ARGS (tduration)); if (!(tr = ges_transition_clip_new_for_nick (nick))) @@ -172,14 +172,14 @@ main (int argc, char **argv) g_option_context_add_group (ctx, gst_init_get_option_group ()); if (!g_option_context_parse (ctx, &argc, &argv, &err)) { - g_print ("Error initializing %s\n", err->message); + gst_print ("Error initializing %s\n", err->message); g_option_context_free (ctx); g_clear_error (&err); exit (1); } if (argc < 4) { - g_print ("%s", g_option_context_get_help (ctx, TRUE, NULL)); + gst_print ("%s", g_option_context_get_help (ctx, TRUE, NULL)); exit (0); } |