mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
ges-launch: add an option to use a custom video sink
This commit is contained in:
parent
324742826b
commit
7138bfb700
1 changed files with 13 additions and 0 deletions
|
@ -720,7 +720,9 @@ main (int argc, gchar ** argv)
|
||||||
static gdouble thumbinterval = 0;
|
static gdouble thumbinterval = 0;
|
||||||
static gboolean verbose = FALSE;
|
static gboolean verbose = FALSE;
|
||||||
gchar *load_path = NULL;
|
gchar *load_path = NULL;
|
||||||
|
gchar *videosink = NULL;
|
||||||
const gchar *scenario = NULL;
|
const gchar *scenario = NULL;
|
||||||
|
|
||||||
GOptionEntry options[] = {
|
GOptionEntry options[] = {
|
||||||
{"thumbnail", 'm', 0.0, G_OPTION_ARG_DOUBLE, &thumbinterval,
|
{"thumbnail", 'm', 0.0, G_OPTION_ARG_DOUBLE, &thumbinterval,
|
||||||
"Take thumbnails every n seconds (saved in current directory)", "N"},
|
"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"},
|
"Mute playback output, which means that we use faksinks"},
|
||||||
{"disable-mixing", 0, 0, G_OPTION_ARG_NONE, &disable_mixing,
|
{"disable-mixing", 0, 0, G_OPTION_ARG_NONE, &disable_mixing,
|
||||||
"Do not use mixing element in the tracks"},
|
"Do not use mixing element in the tracks"},
|
||||||
|
{"videosink", 'v', 0, G_OPTION_ARG_STRING, &videosink,
|
||||||
|
"The video sink used for playing back", "<videosink>"},
|
||||||
#ifdef HAVE_GST_VALIDATE
|
#ifdef HAVE_GST_VALIDATE
|
||||||
{"set-scenario", 0, 0, G_OPTION_ARG_STRING, &scenario,
|
{"set-scenario", 0, 0, G_OPTION_ARG_STRING, &scenario,
|
||||||
"Specify a GstValidate scenario to run, 'none' means load gst-validate"
|
"Specify a GstValidate scenario to run, 'none' means load gst-validate"
|
||||||
|
@ -833,6 +837,15 @@ main (int argc, gchar ** argv)
|
||||||
if (!pipeline)
|
if (!pipeline)
|
||||||
exit (1);
|
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 */
|
/* Setup profile/encoding if needed */
|
||||||
if (smartrender || outputuri) {
|
if (smartrender || outputuri) {
|
||||||
GstEncodingProfile *prof = NULL;
|
GstEncodingProfile *prof = NULL;
|
||||||
|
|
Loading…
Reference in a new issue