diff --git a/src/OMXAudio.h b/src/OMXAudio.h index d01637d..1b45485 100755 --- a/src/OMXAudio.h +++ b/src/OMXAudio.h @@ -203,8 +203,8 @@ class COMXAudio COMXCoreComponent m_omx_render; COMXCoreComponent m_omx_mixer; COMXCoreComponent m_omx_decoder; - COMXCoreTunel m_omx_tunnel_clock; - COMXCoreTunel m_omx_tunnel_mixer; - COMXCoreTunel m_omx_tunnel_decoder; + COMXCoreTunnel m_omx_tunnel_clock; + COMXCoreTunnel m_omx_tunnel_mixer; + COMXCoreTunnel m_omx_tunnel_decoder; CPCMRemap m_remap; }; diff --git a/src/OMXCore.cpp b/src/OMXCore.cpp index 498f28c..8bba6d0 100755 --- a/src/OMXCore.cpp +++ b/src/OMXCore.cpp @@ -49,9 +49,9 @@ string COMXCore::getOMXError(OMX_ERRORTYPE error) return printOMXError(error); } -#pragma mark COMXCoreTunel +#pragma mark COMXCoreTunnel -COMXCoreTunel::COMXCoreTunel() +COMXCoreTunnel::COMXCoreTunnel() { srcName = "UNDEFINED_srcName"; dstName = "UNDEFINED_dstName"; @@ -65,7 +65,7 @@ COMXCoreTunel::COMXCoreTunel() pthread_mutex_init(&m_lock, NULL); } -COMXCoreTunel::~COMXCoreTunel() +COMXCoreTunnel::~COMXCoreTunnel() { if(isEstablished) { @@ -76,17 +76,17 @@ COMXCoreTunel::~COMXCoreTunel() pthread_mutex_destroy(&m_lock); } -void COMXCoreTunel::Lock() +void COMXCoreTunnel::Lock() { pthread_mutex_lock(&m_lock); } -void COMXCoreTunel::UnLock() +void COMXCoreTunnel::UnLock() { pthread_mutex_unlock(&m_lock); } -void COMXCoreTunel::Initialize(COMXCoreComponent *src_component, unsigned int src_port, COMXCoreComponent *dst_component, unsigned int dst_port) +void COMXCoreTunnel::Initialize(COMXCoreComponent *src_component, unsigned int src_port, COMXCoreComponent *dst_component, unsigned int dst_port) { m_src_component = src_component; @@ -98,7 +98,7 @@ void COMXCoreTunel::Initialize(COMXCoreComponent *src_component, unsigned int sr dstName = m_dst_component->GetName(); } -OMX_ERRORTYPE COMXCoreTunel::Flush() +OMX_ERRORTYPE COMXCoreTunnel::Flush() { if(!m_src_component || !m_dst_component || !isEstablished) { @@ -120,7 +120,7 @@ OMX_ERRORTYPE COMXCoreTunel::Flush() return OMX_ErrorNone; } -OMX_ERRORTYPE COMXCoreTunel::Deestablish(bool doWait) +OMX_ERRORTYPE COMXCoreTunnel::Deestablish(bool doWait) { if (!isEstablished) @@ -182,7 +182,7 @@ OMX_ERRORTYPE COMXCoreTunel::Deestablish(bool doWait) return OMX_ErrorNone; } -OMX_ERRORTYPE COMXCoreTunel::Establish(bool portSettingsChanged) +OMX_ERRORTYPE COMXCoreTunnel::Establish(bool portSettingsChanged) { Lock(); diff --git a/src/OMXCore.h b/src/OMXCore.h index 271aeaa..72f3946 100755 --- a/src/OMXCore.h +++ b/src/OMXCore.h @@ -36,35 +36,7 @@ typedef struct omx_event OMX_U32 nData2; } omx_event; -class DllLibOMXCore; class COMXCore; -class COMXCoreComponent; -class COMXCoreTunel; -class COMXCoreClock; - -class COMXCoreTunel -{ - public: - COMXCoreTunel(); - ~COMXCoreTunel(); - - void Initialize(COMXCoreComponent *src_component, unsigned int src_port, COMXCoreComponent *dst_component, unsigned int dst_port); - OMX_ERRORTYPE Flush(); - OMX_ERRORTYPE Deestablish(bool doWait = true); - OMX_ERRORTYPE Establish(bool portSettingsChanged); - string srcName; - string dstName; - private: - bool isEstablished; - pthread_mutex_t m_lock; - bool m_portSettingsChanged; - COMXCoreComponent *m_src_component; - COMXCoreComponent *m_dst_component; - unsigned int m_src_port; - unsigned int m_dst_port; - void Lock(); - void UnLock(); -}; class COMXCoreComponent { @@ -217,6 +189,30 @@ class COMXCoreComponent }; +class COMXCoreTunnel +{ +public: + COMXCoreTunnel(); + ~COMXCoreTunnel(); + + void Initialize(COMXCoreComponent *src_component, unsigned int src_port, COMXCoreComponent *dst_component, unsigned int dst_port); + OMX_ERRORTYPE Flush(); + OMX_ERRORTYPE Deestablish(bool doWait = true); + OMX_ERRORTYPE Establish(bool portSettingsChanged); + string srcName; + string dstName; +private: + bool isEstablished; + pthread_mutex_t m_lock; + bool m_portSettingsChanged; + COMXCoreComponent *m_src_component; + COMXCoreComponent *m_dst_component; + unsigned int m_src_port; + unsigned int m_dst_port; + void Lock(); + void UnLock(); +}; + class COMXCore { public: diff --git a/src/OMXDecoderBase.h b/src/OMXDecoderBase.h index 2b355dc..369ad83 100755 --- a/src/OMXDecoderBase.h +++ b/src/OMXDecoderBase.h @@ -30,8 +30,6 @@ #define OMX_MJPEG_DECODER OMX_VIDEO_DECODER -class DllAvUtil; -class DllAvFormat; class OMXDecoderBase { public: @@ -39,9 +37,9 @@ class OMXDecoderBase virtual ~OMXDecoderBase(); OMX_VIDEO_CODINGTYPE m_codingType; - COMXCoreTunel m_omx_tunnel_clock; - COMXCoreTunel m_omx_tunnel_sched; - COMXCoreTunel m_omx_tunnel_decoder; + COMXCoreTunnel m_omx_tunnel_clock; + COMXCoreTunnel m_omx_tunnel_sched; + COMXCoreTunnel m_omx_tunnel_decoder; COMXCoreComponent m_omx_decoder; COMXCoreComponent m_omx_render; diff --git a/src/OMXVideo.h b/src/OMXVideo.h index 03cf708..66f22d8 100755 --- a/src/OMXVideo.h +++ b/src/OMXVideo.h @@ -16,7 +16,7 @@ class COMXVideo : public OMXDecoderBase bool Decode(uint8_t *pData, int iSize, double pts); COMXCoreComponent m_omx_image_fx; - COMXCoreTunel m_omx_tunnel_image_fx; + COMXCoreTunnel m_omx_tunnel_image_fx;