[vlc-devel] [PATCH 1/3] omxil: Set OMX version 1.0.0 when using IOMX
Martin Storsjö
martin at martin.st
Thu Sep 22 13:21:55 CEST 2011
On Thu, 22 Sep 2011, Jean-Baptiste Kempf wrote:
> On Thu, Sep 22, 2011 at 02:12:35PM +0300, Martin Storsjö wrote :
>> +#ifdef USE_IOMX
>> +#define OMX_INIT_COMMON(a) \
>> + (a).nSize = sizeof(a); \
>> + (a).nVersion.s.nVersionMajor = 1; \
>> + (a).nVersion.s.nVersionMinor = 0; \
>> + (a).nVersion.s.nRevision = 0; \
>> + (a).nVersion.s.nStep = 0
>> +#else
>> #define OMX_INIT_COMMON(a) \
>> (a).nSize = sizeof(a); \
>> (a).nVersion.s.nVersionMajor = 1; \
>> (a).nVersion.s.nVersionMinor = 1; \
>> (a).nVersion.s.nRevision = 1; \
>> (a).nVersion.s.nStep = 0
>> +#endif
>
> Wouldn't it better to do a
>
> #ifdef __ANDROID__
> OMX_VERSION_MAJOR = 1;
> OMX_VERSION_MINOR = 0;
> OMX_VERSION_REV = 0;
> #else
> OMX_VERSION_MAJOR = 1;
> OMX_VERSION_MINOR = 1;
> OMX_VERSION_REV = 1;
> #endif
>
> #define OMX_INIT_COMMON(a) \
> (a).nSize = sizeof(a); \
> (a).nVersion.s.nVersionMajor = OMX_VERSION_MAJOR; \
> (a).nVersion.s.nVersionMinor = OMX_VERSION_MINOR; \
> (a).nVersion.s.nRevision = OMX_VERSION_REV; \
> (a).nVersion.s.nStep = 0
> #endif
>
>
> Because, in the end, there might be more OMX users than just Maemo5 and
> Android 2.x/3.X
Hmm, do you mean using __ANDROID__ (or something similar) instead of
USE_IOMX (which in itself never is defined outside of android), or just
moving the definitions of the actual values out from the OMX_INIT_COMMON
definition?
// Martin
More information about the vlc-devel
mailing list