[Gstreamer-openmax] [PATCH 06/10] add g_omx_core_{get, set}_{config, param} helper functions

Felipe Contreras felipe.contreras at Nokia.com
Mon Mar 8 09:04:45 PST 2010


On Mon, Mar 08, 2010 at 12:14:53AM +0100, Rob Clark wrote:
> The helper functions consolidate error handling.
> ---

> +void
> +g_omx_core_get_param (GOmxCore *core, OMX_INDEXTYPE idx, OMX_PTR param)

Wouldn't it make sense to return the error?

> +{
> +    OMX_HANDLETYPE omx_handle = g_omx_core_get_handle (core);
> +    OMX_ERRORTYPE err;
> +
> +    if (!omx_handle)
> +        return;

I think this check should be done much sooner.

> +    err = OMX_GetParameter (omx_handle, idx, param);
> +
> +    if (OMX_ErrorNone != err)

The other way around: err != OMX_ErrorNone

> +        GST_WARNING_OBJECT (core->object, "OMX_GetParameter(%d) failed: %s",
> +                idx, omx_error_to_str (err));
> +}

-- 
Felipe Contreras




More information about the Gstreamer-openmax mailing list