mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 10:40:34 +00:00
launch: Add a way to disable validate at runtime
Also avoid to add useless bin in our sinks
This commit is contained in:
parent
dcb3ad620d
commit
130140d059
3 changed files with 15 additions and 1 deletions
|
@ -283,7 +283,8 @@ _set_sink (GESLauncher * self, const gchar * sink_desc,
|
|||
{
|
||||
if (sink_desc != NULL) {
|
||||
GError *err = NULL;
|
||||
GstElement *sink = gst_parse_bin_from_description (sink_desc, TRUE, &err);
|
||||
GstElement *sink = gst_parse_bin_from_description_full (sink_desc, TRUE,
|
||||
NULL, GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS, &err);
|
||||
if (sink == NULL) {
|
||||
GST_ERROR ("could not create the requested videosink %s (err: %s), "
|
||||
"exiting", err ? err->message : "", sink_desc);
|
||||
|
@ -782,6 +783,10 @@ ges_launcher_parse_options (GESLauncher * self,
|
|||
"scenarios, " "and --inspect-action-type.",
|
||||
"<scenario_name>"}
|
||||
,
|
||||
{"disable-validate", 'n', 0, G_OPTION_ARG_NONE, &opts->disable_validate,
|
||||
"Do not run inside GstValidate.",
|
||||
"<scenario_name>"}
|
||||
,
|
||||
#endif
|
||||
{
|
||||
"embed-nesteds",
|
||||
|
|
|
@ -50,6 +50,7 @@ typedef struct
|
|||
gchar *video_track_caps;
|
||||
gchar *audio_track_caps;
|
||||
gboolean embed_nesteds;
|
||||
gboolean disable_validate;
|
||||
} GESLauncherParsedOptions;
|
||||
|
||||
struct _GESLauncher {
|
||||
|
|
|
@ -107,6 +107,14 @@ ges_validate_activate (GstPipeline * pipeline, GESLauncher * launcher,
|
|||
GstValidateRunner *runner = NULL;
|
||||
GstValidateMonitor *monitor = NULL;
|
||||
|
||||
if (opts->disable_validate) {
|
||||
if (opts->scenario)
|
||||
g_error ("Trying to run scenario: %s but validate is deactivated",
|
||||
opts->scenario);
|
||||
opts->needs_set_state = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
ges_validate_register_action_types ();
|
||||
ges_validate_register_issues ();
|
||||
|
||||
|
|
Loading…
Reference in a new issue