validate-scenarios: list scenarios in GST_VALIDATE_SCENARIOS_PATH

GST_VALIDATE_SCENARIOS_PATH was used only for loading scenarios,
so any in that path would not be listed by -l.

Change-Id: If3cb94867ef3876933bda02477675c8ccf67baaf
This commit is contained in:
Vincent Penquerc'h 2013-11-15 05:22:24 -05:00 committed by Thibault Saunier
parent e9dee065f7
commit 70931813ad

View file

@ -1080,6 +1080,7 @@ _list_scenarios_in_dir (GFile * dir)
void
gst_validate_list_scenarios (void)
{
const gchar *env_scenariodir = g_getenv ("GST_VALIDATE_SCENARIOS_PATH");
gchar *tldir = g_build_filename (g_get_user_data_dir (),
"gstreamer-" GST_API_VERSION, GST_VALIDATE_SCENARIO_DIRECTORY,
NULL);
@ -1098,6 +1099,12 @@ gst_validate_list_scenarios (void)
g_object_unref (dir);
g_free (tldir);
if (env_scenariodir) {
dir = g_file_new_for_path (env_scenariodir);
_list_scenarios_in_dir (dir);
g_object_unref (dir);
}
/* Hack to make it work uninstalled */
dir = g_file_new_for_path ("data/");
_list_scenarios_in_dir (dir);