validate:scenario: Report an EXECUTION_ERROR on action execution failure
authorThibault Saunier <tsaunier@gnome.org>
Sun, 28 Sep 2014 20:37:01 +0000 (22:37 +0200)
committerThibault Saunier <tsaunier@gnome.org>
Tue, 4 Nov 2014 16:33:09 +0000 (17:33 +0100)
If the action type handles a better error report type, it should just
return TRUE, and report its issue itself.

validate/gst/validate/gst-validate-scenario.c

index 1675fbd..6ed97d9 100644 (file)
@@ -895,9 +895,14 @@ get_position (GstValidateScenario * scenario)
 
     GST_DEBUG_OBJECT (scenario, "Executing %" GST_PTR_FORMAT
         " at %" GST_TIME_FORMAT, act->structure, GST_TIME_ARGS (position));
-    if (!type->execute (scenario, act))
-      GST_WARNING_OBJECT (scenario, "Could not execute %" GST_PTR_FORMAT,
-          act->structure);
+    if (!type->execute (scenario, act)) {
+      gchar *str = gst_structure_to_string (act->structure);
+
+      GST_VALIDATE_REPORT (scenario,
+          SCENARIO_ACTION_EXECUTION_ERROR, "Could not execute %s", str);
+
+      g_free (str);
+    }
 
     if (act->repeat > 0) {
       act->repeat--;