[vlc-devel] [PATCH 1/3] omxil: Avoid duplicate symbols when linking the omxil module statically into the same module as the avcodec module

Martin Storsjö martin at martin.st
Thu Sep 29 11:05:10 CEST 2011


On Maemo/Nokia N900, the modules are linked dynamically, explaining
why this issue hasn't shown up before.

For proper production use, the iomx module needs to be dynamically
loaded, to avoid breaking loading of the full libvlcjni.so if the
IOMX module fails to load (which may happen at any time since it
uses unsupported ABI), so in that case, this patch isn't necessary
any longer.
---
 modules/codec/omxil/omxil.c       |    4 ++--
 modules/codec/omxil/omxil_utils.h |    2 +-
 modules/codec/omxil/utils.c       |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index f636493..6c98ad3 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -336,7 +336,7 @@ static OMX_ERRORTYPE SetPortDefinition(decoder_t *p_dec, OmxPort *p_port,
         }
         else
         {
-            if( !GetVlcAudioFormat(def->format.audio.eEncoding,
+            if( !GetVlcAudioFormat_omxil(def->format.audio.eEncoding,
                                    &p_fmt->i_codec, 0 ) )
             {
                 omx_error = OMX_ErrorNotImplemented;
@@ -446,7 +446,7 @@ static OMX_ERRORTYPE GetPortDefinition(decoder_t *p_dec, OmxPort *p_port,
         break;
 
     case AUDIO_ES:
-        if( !GetVlcAudioFormat( def->format.audio.eEncoding,
+        if( !GetVlcAudioFormat_omxil( def->format.audio.eEncoding,
                                 &p_fmt->i_codec, 0 ) )
         {
             omx_error = OMX_ErrorNotImplemented;
diff --git a/modules/codec/omxil/omxil_utils.h b/modules/codec/omxil/omxil_utils.h
index 7d1224e..f71916c 100644
--- a/modules/codec/omxil/omxil_utils.h
+++ b/modules/codec/omxil/omxil_utils.h
@@ -155,7 +155,7 @@ int GetVlcVideoFormat( OMX_VIDEO_CODINGTYPE i_omx_codec,
 int GetOmxAudioFormat( vlc_fourcc_t i_fourcc,
                        OMX_AUDIO_CODINGTYPE *pi_omx_codec,
                        const char **ppsz_name );
-int GetVlcAudioFormat( OMX_AUDIO_CODINGTYPE i_omx_codec,
+int GetVlcAudioFormat_omxil( OMX_AUDIO_CODINGTYPE i_omx_codec,
                        vlc_fourcc_t *pi_fourcc, const char **ppsz_name );
 const char *GetOmxRole( vlc_fourcc_t i_fourcc, int i_cat, bool b_enc );
 int GetOmxChromaFormat( vlc_fourcc_t i_fourcc,
diff --git a/modules/codec/omxil/utils.c b/modules/codec/omxil/utils.c
index c3916ed..c2c72d9 100644
--- a/modules/codec/omxil/utils.c
+++ b/modules/codec/omxil/utils.c
@@ -426,7 +426,7 @@ int GetOmxAudioFormat( vlc_fourcc_t i_fourcc,
     return !!audio_format_table[i].i_codec;
 }
 
-int GetVlcAudioFormat( OMX_AUDIO_CODINGTYPE i_omx_codec,
+int GetVlcAudioFormat_omxil( OMX_AUDIO_CODINGTYPE i_omx_codec,
                        vlc_fourcc_t *pi_fourcc, const char **ppsz_name )
 {
     unsigned int i;
@@ -875,7 +875,7 @@ void PrintOmx(decoder_t *p_dec, OMX_HANDLETYPE omx_handle, OMX_U32 i_port)
 
             case OMX_PortDomainAudio:
 
-                GetVlcAudioFormat( definition.format.audio.eEncoding,
+                GetVlcAudioFormat_omxil( definition.format.audio.eEncoding,
                                    &i_fourcc, &psz_name );
 
                 GetAudioParameters(omx_handle, &format_param,
-- 
1.7.2.5




More information about the vlc-devel mailing list