[vlc-devel] [PATCH 1/3] omxil: Set OMX version 1.0.0 when using IOMX

Jean-Baptiste Kempf jb at videolan.org
Thu Sep 22 13:18:45 CEST 2011


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

Best Regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list