validate: Enhance output about critical errors

+Lower some warning to INFO
This commit is contained in:
Thibault Saunier 2014-07-24 19:26:29 +02:00
parent 6da09fb919
commit 5c50219fae
2 changed files with 16 additions and 3 deletions

View file

@ -122,18 +122,31 @@ gst_validate_runner_printf (GstValidateRunner * runner)
GSList *tmp;
guint count = 0;
int ret = 0;
GList *criticals = NULL;
for (tmp = gst_validate_runner_get_reports (runner); tmp; tmp = tmp->next) {
GstValidateReport *report = tmp->data;
gst_validate_report_printf (report);
if (ret == 0 && report->level == GST_VALIDATE_REPORT_LEVEL_CRITICAL) {
g_printerr ("Got critical error %s, setting return value to 18\n",
((GstValidateReport *) (tmp->data))->message);
criticals = g_list_append (criticals, tmp->data);
ret = 18;
}
count++;
}
if (criticals) {
GList *iter;
g_printerr ("\n\n==== Got criticals, Return value set to 18 ====\n");
for (iter = criticals; iter; iter = iter->next) {
g_printerr (" Critical error %s\n",
((GstValidateReport *) (iter->data))->message);
}
g_printerr ("\n");
}
gst_validate_printf (NULL, "Pipeline finished, issues found: %u\n", count);
return ret;
}

View file

@ -236,7 +236,7 @@ gst_validate_action_get_clocktime (GstValidateScenario * scenario,
gchar *error = NULL;
if (!(strval = gst_structure_get_string (action->structure, name))) {
GST_WARNING_OBJECT (scenario, "Could not find %s", name);
GST_INFO_OBJECT (scenario, "Could not find %s", name);
return FALSE;
}
val =