Skip to content

Commit

Permalink
rename to COMXCoreTunnel
Browse files Browse the repository at this point in the history
  • Loading branch information
jvcleave committed Nov 12, 2015
1 parent b63441f commit 5cdd03c
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 46 deletions.
6 changes: 3 additions & 3 deletions src/OMXAudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
18 changes: 9 additions & 9 deletions src/OMXCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -65,7 +65,7 @@ COMXCoreTunel::COMXCoreTunel()
pthread_mutex_init(&m_lock, NULL);
}

COMXCoreTunel::~COMXCoreTunel()
COMXCoreTunnel::~COMXCoreTunnel()
{
if(isEstablished)
{
Expand All @@ -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;
Expand All @@ -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)
{
Expand All @@ -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)
Expand Down Expand Up @@ -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();

Expand Down
52 changes: 24 additions & 28 deletions src/OMXCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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:
Expand Down
8 changes: 3 additions & 5 deletions src/OMXDecoderBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,16 @@
#define OMX_MJPEG_DECODER OMX_VIDEO_DECODER


class DllAvUtil;
class DllAvFormat;
class OMXDecoderBase
{
public:
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;
Expand Down
2 changes: 1 addition & 1 deletion src/OMXVideo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;



Expand Down

0 comments on commit 5cdd03c

Please sign in to comment.