gst-devtools: validate: Add a way to use config actions in GST_VALIDATE_CONFIG files
Thibault Saunier
tsaunier at gnome.org
Wed Jun 7 18:22:09 UTC 2017
Those g_error() are meant to abort yes.
On Wed, Jun 7, 2017 at 1:34 PM, Reynaldo H. Verdejo Pinochet
<reynaldo at osg.samsung.com> wrote:
> 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
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list