MythTV  master
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
OMXComponent Class Reference

#include <omxcontext.h>

Collaboration diagram for OMXComponent:
Collaboration graph
[legend]

Public Member Functions

 OMXComponent (const QString &name, OMXComponentCtx &)
 
virtual ~OMXComponent ()
 
OMX_ERRORTYPE Init (OMX_INDEXTYPE)
 
void Shutdown ()
 
bool IsValid () const
 
OMX_HANDLETYPE Handle () const
 
 operator OMX_HANDLETYPE () const
 
int Id () const
 
OMX_U32 Base () const
 
unsigned Ports () const
 
OMX_ERRORTYPE GetPortDef (unsigned index=0)
 
const OMX_PARAM_PORTDEFINITIONTYPE & PortDef (unsigned index=0) const
 
OMX_PARAM_PORTDEFINITIONTYPE & PortDef (unsigned index=0)
 
void ShowPortDef (unsigned index=0, LogLevel_t=LOG_INFO, uint64_t=VB_PLAYBACK) const
 
void ShowFormats (unsigned index=0, LogLevel_t=LOG_INFO, uint64_t=VB_PLAYBACK) const
 
OMX_ERRORTYPE SendCommand (OMX_COMMANDTYPE cmd, OMX_U32 nParam=0, void *pCmdData=nullptr, int ms=-1, OMXComponentAbstractCB *cb=nullptr)
 
bool IsCommandComplete () const
 
OMX_ERRORTYPE WaitComplete (int ms=-1)
 
OMX_ERRORTYPE LastError ()
 
OMX_ERRORTYPE SetState (OMX_STATETYPE state, int ms=-1, OMXComponentAbstractCB *cb=nullptr)
 
OMX_STATETYPE GetState ()
 
OMX_ERRORTYPE SetParameter (OMX_INDEXTYPE type, OMX_PTR p)
 
OMX_ERRORTYPE GetParameter (OMX_INDEXTYPE type, OMX_PTR p) const
 
OMX_ERRORTYPE SetConfig (OMX_INDEXTYPE type, OMX_PTR p)
 
OMX_ERRORTYPE GetConfig (OMX_INDEXTYPE type, OMX_PTR p) const
 
OMX_ERRORTYPE PortEnable (unsigned index=0, int ms=-1, OMXComponentAbstractCB *cb=nullptr)
 
OMX_ERRORTYPE PortDisable (unsigned index=0, int ms=-1, OMXComponentAbstractCB *cb=nullptr)
 

Static Public Member Functions

static void EnumComponents (const QRegExp &re, LogLevel_t level=LOG_INFO, uint64_t mask=VB_PLAYBACK)
 

Private Member Functions

 OMXComponent (OMXComponent &)
 
OMXComponentoperator= (OMXComponent &rhs)
 
OMX_ERRORTYPE ReleaseBuffers ()
 

Static Private Member Functions

static OMX_ERRORTYPE GetComponent (OMXComponent *, const QRegExp &, LogLevel_t level=LOG_INFO, uint64_t mask=VB_PLAYBACK)
 
static bool IncrRef ()
 OMXComponent. More...
 
static void DecrRef ()
 
static OMX_ERRORTYPE EventCB (OMX_IN OMX_HANDLETYPE, OMX_IN OMX_PTR, OMX_IN OMX_EVENTTYPE, OMX_IN OMX_U32, OMX_IN OMX_U32, OMX_IN OMX_PTR)
 
static OMX_ERRORTYPE EmptyBufferCB (OMX_IN OMX_HANDLETYPE, OMX_IN OMX_PTR, OMX_IN OMX_BUFFERHEADERTYPE *)
 
static OMX_ERRORTYPE FillBufferCB (OMX_IN OMX_HANDLETYPE, OMX_IN OMX_PTR, OMX_IN OMX_BUFFERHEADERTYPE *)
 

Private Attributes

int const m_ref
 
OMXComponentCtxm_cb
 
OMX_HANDLETYPE m_handle {nullptr}
 
OMX_U32 m_base {0}
 
QVector< OMX_PARAM_PORTDEFINITIONTYPE > m_portdefs
 
QMutex m_state_lock {QMutex::Recursive}
 
OMX_STATETYPE m_state {OMX_StateInvalid}
 
OMX_ERRORTYPE m_error {OMX_ErrorNone}
 
QSemaphore m_state_sema
 

Friends

class OMXComponentCtx
 

Detailed Description

Definition at line 27 of file omxcontext.h.

Constructor & Destructor Documentation

◆ OMXComponent() [1/2]

OMXComponent::OMXComponent ( OMXComponent )
private

◆ OMXComponent() [2/2]

OMXComponent::OMXComponent ( const QString &  name,
OMXComponentCtx cb 
)

Definition at line 128 of file omxcontext.cpp.

◆ ~OMXComponent()

OMXComponent::~OMXComponent ( )
virtual

Definition at line 168 of file omxcontext.cpp.

Member Function Documentation

◆ operator=()

OMXComponent& OMXComponent::operator= ( OMXComponent rhs)
private

◆ Init()

OMX_ERRORTYPE OMXComponent::Init ( OMX_INDEXTYPE  type)

◆ Shutdown()

void OMXComponent::Shutdown ( )

◆ IsValid()

bool OMXComponent::IsValid ( ) const
inline

◆ Handle()

OMX_HANDLETYPE OMXComponent::Handle ( ) const
inline

◆ operator OMX_HANDLETYPE()

OMXComponent::operator OMX_HANDLETYPE ( ) const
inline

Definition at line 45 of file omxcontext.h.

◆ Id()

int OMXComponent::Id ( ) const
inline

Definition at line 46 of file omxcontext.h.

◆ Base()

OMX_U32 OMXComponent::Base ( ) const
inline

◆ Ports()

unsigned OMXComponent::Ports ( ) const
inline

◆ GetPortDef()

OMX_ERRORTYPE OMXComponent::GetPortDef ( unsigned  index = 0)

◆ PortDef() [1/2]

const OMX_PARAM_PORTDEFINITIONTYPE & OMXComponent::PortDef ( unsigned  index = 0) const

◆ PortDef() [2/2]

OMX_PARAM_PORTDEFINITIONTYPE & OMXComponent::PortDef ( unsigned  index = 0)

Definition at line 303 of file omxcontext.cpp.

◆ ShowPortDef()

void OMXComponent::ShowPortDef ( unsigned  index = 0,
LogLevel_t  level = LOG_INFO,
uint64_t  mask = VB_PLAYBACK 
) const

◆ ShowFormats()

void OMXComponent::ShowFormats ( unsigned  index = 0,
LogLevel_t  level = LOG_INFO,
uint64_t  mask = VB_PLAYBACK 
) const

◆ SendCommand()

OMX_ERRORTYPE OMXComponent::SendCommand ( OMX_COMMANDTYPE  cmd,
OMX_U32  nParam = 0,
void *  pCmdData = nullptr,
int  ms = -1,
OMXComponentAbstractCB cb = nullptr 
)

Definition at line 493 of file omxcontext.cpp.

Referenced by PrivateDecoderOMX::Reset(), and SetState().

◆ IsCommandComplete()

bool OMXComponent::IsCommandComplete ( ) const
inline

Definition at line 58 of file omxcontext.h.

◆ WaitComplete()

OMX_ERRORTYPE OMXComponent::WaitComplete ( int  ms = -1)

Definition at line 556 of file omxcontext.cpp.

◆ LastError()

OMX_ERRORTYPE OMXComponent::LastError ( )

Definition at line 570 of file omxcontext.cpp.

Referenced by SendCommand(), PrivateDecoderOMX::SettingsChanged(), and WaitComplete().

◆ SetState()

OMX_ERRORTYPE OMXComponent::SetState ( OMX_STATETYPE  state,
int  ms = -1,
OMXComponentAbstractCB cb = nullptr 
)

◆ GetState()

OMX_STATETYPE OMXComponent::GetState ( )

Definition at line 485 of file omxcontext.cpp.

Referenced by AudioOutputOMX::AudioOutputOMX().

◆ SetParameter()

OMX_ERRORTYPE OMXComponent::SetParameter ( OMX_INDEXTYPE  type,
OMX_PTR  p 
)
inline

◆ GetParameter()

OMX_ERRORTYPE OMXComponent::GetParameter ( OMX_INDEXTYPE  type,
OMX_PTR  p 
) const
inline

◆ SetConfig()

OMX_ERRORTYPE OMXComponent::SetConfig ( OMX_INDEXTYPE  type,
OMX_PTR  p 
)
inline

◆ GetConfig()

OMX_ERRORTYPE OMXComponent::GetConfig ( OMX_INDEXTYPE  type,
OMX_PTR  p 
) const
inline

◆ PortEnable()

OMX_ERRORTYPE OMXComponent::PortEnable ( unsigned  index = 0,
int  ms = -1,
OMXComponentAbstractCB cb = nullptr 
)
inline

Definition at line 76 of file omxcontext.h.

Referenced by PrivateDecoderOMX::SettingsChanged(), and VideoOutputOMX::Start().

◆ PortDisable()

OMX_ERRORTYPE OMXComponent::PortDisable ( unsigned  index = 0,
int  ms = -1,
OMXComponentAbstractCB cb = nullptr 
)
inline

◆ EnumComponents()

static void OMXComponent::EnumComponents ( const QRegExp &  re,
LogLevel_t  level = LOG_INFO,
uint64_t  mask = VB_PLAYBACK 
)
inlinestatic

Definition at line 83 of file omxcontext.h.

Referenced by OMXComponent().

◆ GetComponent()

OMX_ERRORTYPE OMXComponent::GetComponent ( OMXComponent cmpnt,
const QRegExp &  re,
LogLevel_t  level = LOG_INFO,
uint64_t  mask = VB_PLAYBACK 
)
staticprivate

Definition at line 582 of file omxcontext.cpp.

Referenced by OMXComponent().

◆ IncrRef()

bool OMXComponent::IncrRef ( )
staticprivate

OMXComponent.

Definition at line 79 of file omxcontext.cpp.

Referenced by OMXComponent().

◆ DecrRef()

void OMXComponent::DecrRef ( )
staticprivate

Definition at line 109 of file omxcontext.cpp.

Referenced by ~OMXComponent().

◆ EventCB()

OMX_ERRORTYPE OMXComponent::EventCB ( OMX_IN  OMX_HANDLETYPE,
OMX_IN OMX_PTR  pAppData,
OMX_IN OMX_EVENTTYPE  eEvent,
OMX_IN OMX_U32  nData1,
OMX_IN OMX_U32  nData2,
OMX_IN OMX_PTR  pEventData 
)
staticprivate

Definition at line 624 of file omxcontext.cpp.

Referenced by GetComponent().

◆ EmptyBufferCB()

OMX_ERRORTYPE OMXComponent::EmptyBufferCB ( OMX_IN  OMX_HANDLETYPE,
OMX_IN OMX_PTR  pAppData,
OMX_IN OMX_BUFFERHEADERTYPE *  hdr 
)
staticprivate

Definition at line 637 of file omxcontext.cpp.

Referenced by GetComponent().

◆ FillBufferCB()

OMX_ERRORTYPE OMXComponent::FillBufferCB ( OMX_IN  OMX_HANDLETYPE,
OMX_IN OMX_PTR  pAppData,
OMX_IN OMX_BUFFERHEADERTYPE *  hdr 
)
staticprivate

Definition at line 647 of file omxcontext.cpp.

Referenced by GetComponent().

◆ ReleaseBuffers()

OMX_ERRORTYPE OMXComponent::ReleaseBuffers ( )
private

Definition at line 212 of file omxcontext.cpp.

Referenced by Shutdown().

Friends And Related Function Documentation

◆ OMXComponentCtx

friend class OMXComponentCtx
friend

Definition at line 29 of file omxcontext.h.

Member Data Documentation

◆ m_ref

int const OMXComponent::m_ref
private

Definition at line 103 of file omxcontext.h.

◆ m_cb

OMXComponentCtx& OMXComponent::m_cb
private

Definition at line 104 of file omxcontext.h.

Referenced by EmptyBufferCB(), EventCB(), FillBufferCB(), and ReleaseBuffers().

◆ m_handle

OMX_HANDLETYPE OMXComponent::m_handle {nullptr}
private

◆ m_base

OMX_U32 OMXComponent::m_base {0}
private

Definition at line 106 of file omxcontext.h.

Referenced by GetPortDef(), and Init().

◆ m_portdefs

QVector<OMX_PARAM_PORTDEFINITIONTYPE> OMXComponent::m_portdefs
private

Definition at line 107 of file omxcontext.h.

Referenced by GetPortDef(), Init(), and PortDef().

◆ m_state_lock

QMutex OMXComponent::m_state_lock {QMutex::Recursive}
mutableprivate

Definition at line 108 of file omxcontext.h.

Referenced by OMXComponentCtx::Event(), GetState(), LastError(), and SetState().

◆ m_state

OMX_STATETYPE OMXComponent::m_state {OMX_StateInvalid}
private

◆ m_error

OMX_ERRORTYPE OMXComponent::m_error {OMX_ErrorNone}
private

Definition at line 110 of file omxcontext.h.

Referenced by OMXComponentCtx::Event(), and LastError().

◆ m_state_sema

QSemaphore OMXComponent::m_state_sema
private

Definition at line 111 of file omxcontext.h.

Referenced by OMXComponentCtx::Event(), SendCommand(), and WaitComplete().


The documentation for this class was generated from the following files: