From 79322a452d90323509194d67f23bffc6ee6b1d08 Mon Sep 17 00:00:00 2001 From: Lubosz Sarnecki Date: Sun, 20 Jul 2014 11:47:18 +0200 Subject: [PATCH] ges-launch: option to select encoding profile from xml https://bugzilla.gnome.org/show_bug.cgi?id=735121 --- tools/ges-launch.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/ges-launch.c b/tools/ges-launch.c index b2906b0ad4..6c66f73527 100644 --- a/tools/ges-launch.c +++ b/tools/ges-launch.c @@ -741,6 +741,7 @@ main (int argc, gchar ** argv) gchar *videosink = NULL, *audiosink = NULL; const gchar *scenario = NULL; gboolean list_action_types = FALSE; + gchar *encoding_profile = NULL; GOptionEntry options[] = { {"thumbnail", 'm', 0.0, G_OPTION_ARG_DOUBLE, &thumbinterval, @@ -752,6 +753,8 @@ main (int argc, gchar ** argv) {"format", 'f', 0, G_OPTION_ARG_STRING, &format, "Specify an encoding profile on the command line", ""}, + {"encoding-profile", 'e', 0, G_OPTION_ARG_STRING, &encoding_profile, + "Use a specific encoding profile from XML", ""}, {"repeat", 'r', 0, G_OPTION_ARG_INT, &repeat, "Number of times to repeat timeline", ""}, {"list-transitions", 't', 0, G_OPTION_ARG_NONE, &list_transitions, @@ -908,7 +911,14 @@ main (int argc, gchar ** argv) GES_PROJECT (ges_extractable_get_asset (GES_EXTRACTABLE (timeline))); const GList *profiles = ges_project_list_encoding_profiles (proj); - prof = profiles ? profiles->data : NULL; + if (profiles) { + prof = profiles->data; + if (encoding_profile) + for (; profiles; profiles = profiles->next) + if (strcmp (encoding_profile, + gst_encoding_profile_get_name (profiles->data)) == 0) + prof = profiles->data; + } } if (!prof) {