Commit 875945f0 authored by Martin Storsjö's avatar Martin Storsjö Committed by Jean-Baptiste Kempf

omxil: Set OMX version 1.0.0 on android

The Samsung OMX components on e.g. Nexus S require major == 1
and minor == 0, otherwise they simply return errors on all
SetParameter/GetParameter calls.

Stagefright's OMX client always sets version 1.0.0, which thus
probably should be a safe choice for all android cases.

An alternative would be to store the version to set as a
variable in decoder_sys_t, and set that to 1.0.0 conditionally
only for Samsung OMX components, but that would make
OMX_INIT_COMMON more complex.
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 0ad141d3
...@@ -24,12 +24,24 @@ ...@@ -24,12 +24,24 @@
/***************************************************************************** /*****************************************************************************
* OMX macros * OMX macros
*****************************************************************************/ *****************************************************************************/
#ifdef __ANDROID__
#define OMX_VERSION_MAJOR 1
#define OMX_VERSION_MINOR 0
#define OMX_VERSION_REV 0
#define OMX_VERSION_STEP 0
#else
#define OMX_VERSION_MAJOR 1
#define OMX_VERSION_MINOR 1
#define OMX_VERSION_REV 1
#define OMX_VERSION_STEP 0
#endif
#define OMX_INIT_COMMON(a) \ #define OMX_INIT_COMMON(a) \
(a).nSize = sizeof(a); \ (a).nSize = sizeof(a); \
(a).nVersion.s.nVersionMajor = 1; \ (a).nVersion.s.nVersionMajor = OMX_VERSION_MAJOR; \
(a).nVersion.s.nVersionMinor = 1; \ (a).nVersion.s.nVersionMinor = OMX_VERSION_MINOR; \
(a).nVersion.s.nRevision = 1; \ (a).nVersion.s.nRevision = OMX_VERSION_REV; \
(a).nVersion.s.nStep = 0 (a).nVersion.s.nStep = OMX_VERSION_STEP
#define OMX_INIT_STRUCTURE(a) \ #define OMX_INIT_STRUCTURE(a) \
memset(&(a), 0, sizeof(a)); \ memset(&(a), 0, sizeof(a)); \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment