scenario = gst_validate_action_get_scenario (action);
if (action_type->prepare) {
- if (action_type->prepare (action) == FALSE) {
+ res = action_type->prepare (action);
+ if (res != GST_VALIDATE_EXECUTE_ACTION_OK) {
GST_ERROR_OBJECT (scenario, "Action %" GST_PTR_FORMAT
" could not be prepared", action->structure);
gst_object_unref (scenario);
- return GST_VALIDATE_EXECUTE_ACTION_ERROR;
+ return res;
}
}
}
}
-static gboolean
+static GstValidateExecuteActionReturn
gst_validate_action_default_prepare_func (GstValidateAction * action)
{
gint i;
}
if (action->repeat > 0)
- return TRUE;
+ return GST_VALIDATE_EXECUTE_ACTION_OK;
if (!gst_structure_has_field (action->structure, "repeat"))
- return TRUE;
+ return GST_VALIDATE_EXECUTE_ACTION_OK;
if (gst_structure_get_int (action->structure, "repeat", &action->repeat))
- return TRUE;
+ return GST_VALIDATE_EXECUTE_ACTION_OK;
if (gst_structure_get_double (action->structure, "repeat",
(gdouble *) & action->repeat))
- return TRUE;
+ return GST_VALIDATE_EXECUTE_ACTION_OK;
repeat_expr =
g_strdup (gst_structure_get_string (action->structure, "repeat"));
g_error ("Invalid value for 'repeat' in %s",
gst_structure_to_string (action->structure));
- return FALSE;
+ return GST_VALIDATE_EXECUTE_ACTION_ERROR;
}
action->repeat =
g_error ("Invalid value for 'repeat' in %s: %s",
gst_structure_to_string (action->structure), error);
- return FALSE;
+ return GST_VALIDATE_EXECUTE_ACTION_ERROR;
}
g_free (repeat_expr);
if (scenario)
gst_object_unref (scenario);
- return TRUE;
+ return GST_VALIDATE_EXECUTE_ACTION_OK;
}
static void