From 42857faaaefe21f05e731f8b949275c3ab529ee4 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 19 Sep 2013 07:38:20 -0300 Subject: [PATCH] scenario: Add GST_VALIDATE_SCENARIOS_PATH environment variable So you can specify the PATHS where to look for scenario files --- validate/gst/validate/gst-validate-scenario.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/validate/gst/validate/gst-validate-scenario.c b/validate/gst/validate/gst-validate-scenario.c index 3608bfb68d..d7d7ee34ba 100644 --- a/validate/gst/validate/gst-validate-scenario.c +++ b/validate/gst/validate/gst-validate-scenario.c @@ -652,6 +652,7 @@ gst_validate_scenario_load (GstValidateScenario * scenario, { gboolean ret = TRUE; gchar *lfilename = NULL, *tldir = NULL; + const gchar *env_scenariodir = g_getenv ("GST_VALIDATE_SCENARIOS_PATH"); if (!scenario_name) goto invalid_name; @@ -665,6 +666,13 @@ gst_validate_scenario_load (GstValidateScenario * scenario, goto done; g_free (tldir); + if (env_scenariodir) { + tldir = g_build_filename (env_scenariodir, lfilename, NULL); + if ((ret = _load_scenario_file (scenario, tldir))) + goto done; + g_free (tldir); + } + /* Try from local profiles */ tldir = g_build_filename (g_get_user_data_dir (), "gstreamer-" GST_API_VERSION,