From: Mathieu Duponchelle Date: Thu, 8 May 2014 12:12:11 +0000 (+0200) Subject: ges-launch: add an option to use a custom video sink X-Git-Tag: 1.19.3~493^2~1587 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7138bfb70019e03f4feb11dd0e4371c1af0c6662;p=platform%2Fupstream%2Fgstreamer.git ges-launch: add an option to use a custom video sink --- diff --git a/tools/ges-launch.c b/tools/ges-launch.c index df95c3c..f4e754b 100644 --- a/tools/ges-launch.c +++ b/tools/ges-launch.c @@ -720,7 +720,9 @@ main (int argc, gchar ** argv) static gdouble thumbinterval = 0; static gboolean verbose = FALSE; gchar *load_path = NULL; + gchar *videosink = NULL; const gchar *scenario = NULL; + GOptionEntry options[] = { {"thumbnail", 'm', 0.0, G_OPTION_ARG_DOUBLE, &thumbinterval, "Take thumbnails every n seconds (saved in current directory)", "N"}, @@ -762,6 +764,8 @@ main (int argc, gchar ** argv) "Mute playback output, which means that we use faksinks"}, {"disable-mixing", 0, 0, G_OPTION_ARG_NONE, &disable_mixing, "Do not use mixing element in the tracks"}, + {"videosink", 'v', 0, G_OPTION_ARG_STRING, &videosink, + "The video sink used for playing back", ""}, #ifdef HAVE_GST_VALIDATE {"set-scenario", 0, 0, G_OPTION_ARG_STRING, &scenario, "Specify a GstValidate scenario to run, 'none' means load gst-validate" @@ -833,6 +837,15 @@ main (int argc, gchar ** argv) if (!pipeline) exit (1); + if (videosink != NULL) { + GstElement *sink = gst_element_factory_make (videosink, "custom-videosink"); + if (sink == NULL) { + GST_ERROR ("could not create the requested videosink %s, exiting", videosink); + exit (1); + } + ges_pipeline_preview_set_video_sink (pipeline, sink); + } + /* Setup profile/encoding if needed */ if (smartrender || outputuri) { GstEncodingProfile *prof = NULL;