validate: Handle setting several scenarios
The user might have scenarios specific to a particular pipeline, and the application might have several pipelines running and scenarios that apply on specific pipeline. We have to handle that valid use case.
This commit is contained in:
parent
3bd31854a8
commit
024b1762d7
@ -184,10 +184,15 @@ static void
|
|||||||
gst_validate_pipeline_monitor_create_scenarios (GstValidateBinMonitor * monitor)
|
gst_validate_pipeline_monitor_create_scenarios (GstValidateBinMonitor * monitor)
|
||||||
{
|
{
|
||||||
/* scenarios currently only make sense for pipelines */
|
/* scenarios currently only make sense for pipelines */
|
||||||
const gchar *scenario_name;
|
const gchar *scenarios_names;
|
||||||
|
gchar **scenarios;
|
||||||
|
|
||||||
if ((scenario_name = g_getenv ("GST_VALIDATE_SCENARIO"))) {
|
if ((scenarios_names = g_getenv ("GST_VALIDATE_SCENARIO"))) {
|
||||||
gchar **scenario_v = g_strsplit (scenario_name, "->", 2);
|
gint i;
|
||||||
|
|
||||||
|
scenarios = g_strsplit (scenarios_names, G_SEARCHPATH_SEPARATOR_S, 0);
|
||||||
|
for (i = 0; scenarios[i]; i++) {
|
||||||
|
gchar **scenario_v = g_strsplit (scenarios[i], "->", 2);
|
||||||
|
|
||||||
if (scenario_v[1] && GST_VALIDATE_MONITOR_GET_OBJECT (monitor)) {
|
if (scenario_v[1] && GST_VALIDATE_MONITOR_GET_OBJECT (monitor)) {
|
||||||
if (!g_pattern_match_simple (scenario_v[1],
|
if (!g_pattern_match_simple (scenario_v[1],
|
||||||
@ -207,6 +212,9 @@ gst_validate_pipeline_monitor_create_scenarios (GstValidateBinMonitor * monitor)
|
|||||||
scenario_v[0]);
|
scenario_v[0]);
|
||||||
g_strfreev (scenario_v);
|
g_strfreev (scenario_v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_strfreev (scenarios);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user