1 #ifndef TORCOMXCOMPONENT_H 2 #define TORCOMXCOMPONENT_H 6 #include <QWaitCondition> 13 #include "OMX_Component.h" 20 TorcOMXEvent(OMX_EVENTTYPE Type, OMX_U32 Data1, OMX_U32 Data2);
30 static OMX_ERRORTYPE EventHandlerCallback (OMX_HANDLETYPE Component, OMX_PTR OMXComponent, OMX_EVENTTYPE Event, OMX_U32 Data1, OMX_U32 Data2, OMX_PTR EventData);
31 static OMX_ERRORTYPE EmptyBufferDoneCallback (OMX_HANDLETYPE Component, OMX_PTR OMXComponent, OMX_BUFFERHEADERTYPE *Buffer);
32 static OMX_ERRORTYPE FillBufferDoneCallback (OMX_HANDLETYPE Component, OMX_PTR OMXComponent, OMX_BUFFERHEADERTYPE *Buffer);
39 QString GetName (
void);
40 OMX_HANDLETYPE GetHandle (
void);
41 OMX_ERRORTYPE SetState (OMX_STATETYPE State,
bool Wait =
true);
42 OMX_STATETYPE GetState (
void);
43 OMX_ERRORTYPE SetParameter (OMX_INDEXTYPE Index, OMX_PTR Structure);
44 OMX_ERRORTYPE GetParameter (OMX_INDEXTYPE Index, OMX_PTR Structure);
45 OMX_ERRORTYPE SetConfig (OMX_INDEXTYPE Index, OMX_PTR Structure);
46 OMX_ERRORTYPE GetConfig (OMX_INDEXTYPE Index, OMX_PTR Structure);
47 OMX_U32 GetPort (OMX_DIRTYPE Direction, OMX_U32 Index, OMX_INDEXTYPE Domain);
48 OMX_ERRORTYPE EnablePort (OMX_DIRTYPE Direction, OMX_U32 Index,
bool Enable, OMX_INDEXTYPE Domain,
bool Wait =
true);
49 OMX_ERRORTYPE DisablePorts (OMX_INDEXTYPE Domain);
50 OMX_U32 GetAvailableBuffers (OMX_DIRTYPE Direction, OMX_U32 Index, OMX_INDEXTYPE Domain);
51 OMX_U32 GetInUseBuffers (OMX_DIRTYPE Direction, OMX_U32 Index, OMX_INDEXTYPE Domain);
52 OMX_ERRORTYPE EmptyThisBuffer (OMX_BUFFERHEADERTYPE *Buffer);
53 OMX_ERRORTYPE FillThisBuffer (OMX_BUFFERHEADERTYPE *Buffer);
54 OMX_ERRORTYPE CreateBuffers (OMX_DIRTYPE Direction, OMX_U32 Index, OMX_INDEXTYPE Domain, QObject* Owner =
nullptr);
55 OMX_ERRORTYPE DestroyBuffers (OMX_DIRTYPE Direction, OMX_U32 Index, OMX_INDEXTYPE Domain);
56 OMX_BUFFERHEADERTYPE* GetBuffer (OMX_DIRTYPE Direction, OMX_U32 Index, OMX_U32 Timeout, OMX_INDEXTYPE Domain);
57 OMX_ERRORTYPE FlushBuffer (OMX_DIRTYPE Direction, OMX_U32 Index, OMX_INDEXTYPE Domain);
58 OMX_ERRORTYPE EventHandler (OMX_HANDLETYPE Component, OMX_EVENTTYPE Event, OMX_U32 Data1, OMX_U32 Data2, OMX_PTR EventData);
59 OMX_ERRORTYPE EmptyBufferDone (OMX_HANDLETYPE Component, OMX_BUFFERHEADERTYPE *Buffer);
60 OMX_ERRORTYPE FillBufferDone (OMX_HANDLETYPE Component, OMX_BUFFERHEADERTYPE *Buffer);
61 OMX_ERRORTYPE SendCommand (OMX_COMMANDTYPE Command, OMX_U32 Parameter, OMX_PTR Data);
62 OMX_ERRORTYPE WaitForResponse (OMX_U32 Command, OMX_U32 Data2, OMX_S32 Timeout);
65 void AnalysePorts (OMX_INDEXTYPE Domain);
66 TorcOMXPort* FindPort (OMX_DIRTYPE Direction, OMX_U32 Index, OMX_INDEXTYPE Domain);
TorcOMXEvent(OMX_EVENTTYPE Type, OMX_U32 Data1, OMX_U32 Data2)
QList< TorcOMXPort * > m_outputPorts
QWaitCondition m_eventQueueWait
QList< TorcOMXEvent > m_eventQueue
QList< TorcOMXPort * > m_inputPorts