gst-devtools: validate: Add a way to use config actions in GST_VALIDATE_CONFIG files

Reynaldo H. Verdejo Pinochet reynaldo at osg.samsung.com
Wed Jun 7 17:34:36 UTC 2017


Hi

On 06/07/2017 08:20 AM, Thibault Saunier wrote:
> [...]
> @@ -4222,6 +4240,33 @@ init_scenarios (void)
>        GST_VALIDATE_ACTION_TYPE_NONE);
>    /*  *INDENT-ON* */
>
> +  for (tmp = gst_validate_plugin_get_config (NULL); tmp; tmp = tmp->next) {
> +    const gchar *action_typename;
> +
> +    if ((action_typename = gst_structure_get_string (tmp->data, "action"))) {
> +      GstValidateAction *action;
> +      GstValidateActionType *atype = _find_action_type (action_typename);
> +
> +      if (!atype) {
> +        g_error ("[CONFIG ERROR] Action type %s not found", action_typename);
> +
> +        continue;
> +      }
> +
> +      if (!(atype->flags & GST_VALIDATE_ACTION_TYPE_CONFIG) &&
> +          !(_action_type_has_parameter (atype, "as-config"))) {
> +        g_error ("[CONFIG ERROR] Action is not a config action");
> +
> +        continue;
> +      }
> +

Are these g_error() calls intentional or something
you forgot to remove before pushing? The two here
will call abort() before ever reaching your
"continue"s. You should not use g_error() on
any condition you wouldn't use an assert() on.

Bests,

-- 
Reynaldo H. Verdejo Pinochet
Open Source Group - Samsung Research America


More information about the gstreamer-devel mailing list