mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
validate:scenario: Report disabling plugin issues
Summary: + typedef GstValidateActionReturn so it can be used in the introspection + Add GST_VALIDATE_EXECUTE_ACTION_ERROR_REPORTED which should be used to tell Validate that something wrong happened so the sub action won't be executed, but that it should not report an error itself as it has already been handled in the action function. Reviewers: Mathieu_Du Differential Revision: http://phabricator.freedesktop.org/D81
This commit is contained in:
parent
69ca5c69cc
commit
774dbf9346
2 changed files with 11 additions and 6 deletions
|
@ -1099,6 +1099,7 @@ _fill_action (GstValidateScenario * scenario, GstValidateAction * action,
|
||||||
if (IS_CONFIG_ACTION_TYPE (action_type->flags) ||
|
if (IS_CONFIG_ACTION_TYPE (action_type->flags) ||
|
||||||
(gst_structure_get_boolean (action->structure, "as-config",
|
(gst_structure_get_boolean (action->structure, "as-config",
|
||||||
&is_config) && is_config == TRUE)) {
|
&is_config) && is_config == TRUE)) {
|
||||||
|
|
||||||
gst_validate_print_action (action, NULL);
|
gst_validate_print_action (action, NULL);
|
||||||
res = action_type->execute (scenario, action);
|
res = action_type->execute (scenario, action);
|
||||||
|
|
||||||
|
@ -1594,8 +1595,12 @@ _execute_disable_plugin (GstValidateScenario * scenario,
|
||||||
|
|
||||||
plugin = gst_registry_find_plugin (gst_registry_get (), plugin_name);
|
plugin = gst_registry_find_plugin (gst_registry_get (), plugin_name);
|
||||||
|
|
||||||
if (plugin == NULL)
|
if (plugin == NULL) {
|
||||||
return GST_VALIDATE_EXECUTE_ACTION_ERROR;
|
GST_VALIDATE_REPORT (action->scenario, SCENARIO_ACTION_EXECUTION_ERROR,
|
||||||
|
"Could not find plugin to disable: %s", plugin_name);
|
||||||
|
|
||||||
|
return GST_VALIDATE_EXECUTE_ACTION_ERROR_REPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
gst_registry_remove_plugin (gst_registry_get (), plugin);
|
gst_registry_remove_plugin (gst_registry_get (), plugin);
|
||||||
|
|
||||||
|
|
|
@ -42,14 +42,14 @@ typedef struct _GstValidateActionParameter GstValidateActionParameter;
|
||||||
|
|
||||||
GST_EXPORT GType _gst_validate_action_type;
|
GST_EXPORT GType _gst_validate_action_type;
|
||||||
|
|
||||||
enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GST_VALIDATE_EXECUTE_ACTION_ERROR,
|
GST_VALIDATE_EXECUTE_ACTION_ERROR,
|
||||||
GST_VALIDATE_EXECUTE_ACTION_OK,
|
GST_VALIDATE_EXECUTE_ACTION_OK,
|
||||||
GST_VALIDATE_EXECUTE_ACTION_ASYNC,
|
GST_VALIDATE_EXECUTE_ACTION_ASYNC,
|
||||||
GST_VALIDATE_EXECUTE_ACTION_INTERLACED
|
GST_VALIDATE_EXECUTE_ACTION_INTERLACED,
|
||||||
|
GST_VALIDATE_EXECUTE_ACTION_ERROR_REPORTED
|
||||||
};
|
} GstValidateActionReturn;
|
||||||
|
|
||||||
/* TODO 2.0 -- Make it an actual enum type */
|
/* TODO 2.0 -- Make it an actual enum type */
|
||||||
#define GstValidateExecuteActionReturn gint
|
#define GstValidateExecuteActionReturn gint
|
||||||
|
|
Loading…
Reference in a new issue