validate:scenario: Handle not mandatory action types
authorThibault Saunier <tsaunier@gnome.org>
Thu, 5 Mar 2015 12:33:27 +0000 (13:33 +0100)
committerThibault Saunier <tsaunier@gnome.org>
Thu, 5 Mar 2015 13:55:39 +0000 (14:55 +0100)
Summary:
There is currently no way to handle the fact that action types
might be handled only by a specific application but not handling
this action types would not cause any difference for the good execution
of the scenario as a whole

Differential Revision: http://phabricator.freedesktop.org/D33

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

index f0b88f3..0a92eeb 100644 (file)
@@ -1808,6 +1808,12 @@ _load_scenario_file (GstValidateScenario * scenario,
           &priv->handles_state);
       continue;
     } else if (!(action_type = _find_action_type (type))) {
+      if (gst_structure_has_field (structure, "optional-action-type")) {
+        GST_INFO_OBJECT (scenario,
+            "Action type not found %s but marked as not mandatory", type);
+        continue;
+      }
+
       GST_ERROR_OBJECT (scenario, "We do not handle action types %s", type);
       goto failed;
     }