scenario: Add GST_VALIDATE_SCENARIOS_PATH environment variable

So you can specify the PATHS where to look for scenario files
This commit is contained in:
Thibault Saunier 2013-09-19 07:38:20 -03:00
parent 720010f073
commit 42857faaae

View file

@ -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,