diff options
author | Thibault Saunier <tsaunier@igalia.com> | 2021-08-10 17:10:43 -0400 |
---|---|---|
committer | Thibault Saunier <tsaunier@igalia.com> | 2021-09-02 22:34:09 +0000 |
commit | aff2b3ea0ad5001576a214cef58eb67d8792be48 (patch) | |
tree | 294cb2d916af348c18bdd202105b1197aacac484 | |
parent | 0ec4893c8e06e80a5cc3b8f71e781de71e527163 (diff) |
launch: Make enabling validate opt-in
Instead of opt-out.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/264>
-rw-r--r-- | tests/check/meson.build | 2 | ||||
-rw-r--r-- | tools/ges-launcher.c | 9 | ||||
-rw-r--r-- | tools/ges-validate.c | 5 | ||||
-rw-r--r-- | tools/utils.h | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/tests/check/meson.build b/tests/check/meson.build index 1a00e39e..4b5c3985 100644 --- a/tests/check/meson.build +++ b/tests/check/meson.build @@ -112,7 +112,7 @@ if gstvalidate_dep.found() endif endforeach - test('simple_playback_test', ges_launch, env: env, args: ['+test-clip', 'blue', 'd=0.1', '--disable-validate', '--videosink=fakevideosink', '--audiosink=fakeaudiosink']) + test('simple_playback_test', ges_launch, env: env, args: ['+test-clip', 'blue', 'd=0.1', '--videosink=fakevideosink', '--audiosink=fakeaudiosink']) endif if build_gir diff --git a/tools/ges-launcher.c b/tools/ges-launcher.c index aa0b711b..a13238e8 100644 --- a/tools/ges-launcher.c +++ b/tools/ges-launcher.c @@ -1374,9 +1374,8 @@ 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>" + {"enable-validate", 0, 0, G_OPTION_ARG_NONE, &opts->enable_validate, + "Run inside GstValidate.", NULL, }, #endif { @@ -1386,6 +1385,7 @@ ges_launcher_parse_options (GESLauncher * self, G_OPTION_ARG_NONE, &opts->embed_nesteds, "Embed nested timelines when saving.", + NULL, }, {"no-interactive", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &opts->interactive, @@ -1437,6 +1437,9 @@ ges_launcher_parse_options (GESLauncher * self, if (err) g_propagate_error (error, err); + opts->enable_validate |= opts->testfile || opts->scenario + || g_getenv ("GST_VALIDATE_SCENARIO"); + if (owns_ctx) { g_option_context_free (ctx); /* sinks passed in the command line are preferred. */ diff --git a/tools/ges-validate.c b/tools/ges-validate.c index 5379bb9c..5ea786ed 100644 --- a/tools/ges-validate.c +++ b/tools/ges-validate.c @@ -125,10 +125,7 @@ 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); + if (!opts->enable_validate) { opts->needs_set_state = TRUE; g_object_set_data (G_OBJECT (pipeline), "pposition-id", GUINT_TO_POINTER (g_timeout_add (200, diff --git a/tools/utils.h b/tools/utils.h index c0674243..09ba6f27 100644 --- a/tools/utils.h +++ b/tools/utils.h @@ -47,7 +47,7 @@ typedef struct gchar *video_track_caps; gchar *audio_track_caps; gboolean embed_nesteds; - gboolean disable_validate; + gboolean enable_validate; gboolean ignore_eos; gboolean interactive; |