[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:12:35 CEST 2011


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 IOMX 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.
---
 modules/codec/omxil/omxil_utils.h |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/modules/codec/omxil/omxil_utils.h b/modules/codec/omxil/omxil_utils.h
index 5667bf4..a974c27 100644
--- a/modules/codec/omxil/omxil_utils.h
+++ b/modules/codec/omxil/omxil_utils.h
@@ -24,12 +24,21 @@
 /*****************************************************************************
  * OMX macros
  *****************************************************************************/
+#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
 
 #define OMX_INIT_STRUCTURE(a) \
   memset(&(a), 0, sizeof(a)); \
-- 
1.7.2.5




More information about the vlc-devel mailing list