OpenMAX Bellagio 0.9.3
omx_base_port.h
Go to the documentation of this file.
1
25
26#include "tsemaphore.h"
27#include "queue.h"
28#include "omx_classmagic.h"
29
30#ifndef __OMX_BASE_PORT_H__
31#define __OMX_BASE_PORT_H__
32
33#define TUNNEL_USE_BUFFER_RETRY 20
34#define TUNNEL_USE_BUFFER_RETRY_USLEEP_TIME 50000
35
39#define PORT_IS_BEING_FLUSHED(pPort) (pPort->bIsPortFlushed == OMX_TRUE)
40#define PORT_IS_BEING_DISABLED(pPort) (pPort->bIsTransientToDisabled == OMX_TRUE)
41#define PORT_IS_ENABLED(pPort) (pPort->sPortParam.bEnabled == OMX_TRUE)
42#define PORT_IS_POPULATED(pPort) (pPort->sPortParam.bPopulated == OMX_TRUE)
43#define PORT_IS_TUNNELED(pPort) (pPort->nTunnelFlags & TUNNEL_ESTABLISHED)
44#define PORT_IS_DEEP_TUNNELED(pPort) (pPort->nTunnelFlags & PROPRIETARY_COMMUNICATION_ESTABLISHED)
45#define PORT_IS_BUFFER_SUPPLIER(pPort) (pPort->nTunnelFlags & TUNNEL_IS_SUPPLIER)
46#define PORT_IS_TUNNELED_N_BUFFER_SUPPLIER(pPort) ((pPort->nTunnelFlags & TUNNEL_ESTABLISHED) && (pPort->nTunnelFlags & TUNNEL_IS_SUPPLIER))
47
81
97
98
106#define omx_base_PortType_FIELDS \
107 OMX_HANDLETYPE hTunneledComponent; \
108 OMX_U32 nTunnelFlags; \
109 OMX_U32 nTunneledPort; \
110 OMX_BUFFERSUPPLIERTYPE eBufferSupplier; \
111 OMX_U32 nNumTunnelBuffer; \
112 tsem_t* pAllocSem; \
113 pthread_mutex_t exitMutex; \
114 OMX_BOOL bIsDestroying; \
115 OMX_U32 nNumBufferFlushed; \
116 OMX_BOOL bIsPortFlushed; \
117 queue_t* pBufferQueue; \
118 tsem_t* pBufferSem; \
119 OMX_U32 nNumAssignedBuffers; \
120 OMX_PARAM_PORTDEFINITIONTYPE sPortParam; \
121 OMX_BUFFERHEADERTYPE **pInternalBufferStorage; \
122 BUFFER_STATUS_FLAG *bBufferStateAllocated; \
123 OMX_COMPONENTTYPE *standCompContainer;\
124 OMX_BOOL bIsTransientToEnabled; \
125 OMX_BOOL bIsTransientToDisabled; \
126 OMX_BOOL bIsFullOfBuffers; \
127 OMX_BOOL bIsEmptyOfBuffers; \
128 OMX_ERRORTYPE (*PortConstructor)(OMX_COMPONENTTYPE *openmaxStandComp,omx_base_PortType **openmaxStandPort,OMX_U32 nPortIndex, OMX_BOOL isInput); \
129 OMX_ERRORTYPE (*PortDestructor)(omx_base_PortType *openmaxStandPort); \
130 OMX_ERRORTYPE (*Port_DisablePort)(omx_base_PortType *openmaxStandPort); \
131 OMX_ERRORTYPE (*Port_EnablePort)(omx_base_PortType *openmaxStandPort); \
132 OMX_ERRORTYPE (*Port_SendBufferFunction)(omx_base_PortType *openmaxStandPort, OMX_BUFFERHEADERTYPE* pBuffer); \
133 OMX_ERRORTYPE (*Port_AllocateBuffer)(omx_base_PortType *openmaxStandPort, OMX_BUFFERHEADERTYPE** pBuffer, OMX_U32 nPortIndex, OMX_PTR pAppPrivate, OMX_U32 nSizeBytes); \
134 OMX_ERRORTYPE (*Port_UseBuffer)(omx_base_PortType *openmaxStandPort,OMX_BUFFERHEADERTYPE** ppBufferHdr,OMX_U32 nPortIndex,OMX_PTR pAppPrivate,OMX_U32 nSizeBytes,OMX_U8* pBuffer); \
135 OMX_ERRORTYPE (*Port_FreeBuffer)(omx_base_PortType *openmaxStandPort,OMX_U32 nPortIndex,OMX_BUFFERHEADERTYPE* pBuffer); \
136 OMX_ERRORTYPE (*Port_AllocateTunnelBuffer)(omx_base_PortType *openmaxStandPort,OMX_U32 nPortIndex); \
137 OMX_ERRORTYPE (*Port_FreeTunnelBuffer)(omx_base_PortType *openmaxStandPort,OMX_U32 nPortIndex); \
138 OMX_ERRORTYPE (*BufferProcessedCallback)(OMX_HANDLETYPE hComponent, OMX_PTR pAppData, OMX_BUFFERHEADERTYPE* pBuffer); \
139 OMX_ERRORTYPE (*FlushProcessingBuffers)(omx_base_PortType *openmaxStandPort); \
140 OMX_ERRORTYPE (*ReturnBufferFunction)(omx_base_PortType* openmaxStandPort,OMX_BUFFERHEADERTYPE* pBuffer); \
141 OMX_ERRORTYPE (*ComponentTunnelRequest)(omx_base_PortType* openmaxStandPort, OMX_HANDLETYPE hTunneledComp, OMX_U32 nTunneledPort, OMX_TUNNELSETUPTYPE* pTunnelSetup);
143
144
156OMX_ERRORTYPE base_port_Constructor(OMX_COMPONENTTYPE *openmaxStandComp,omx_base_PortType **openmaxStandPort,OMX_U32 nPortIndex, OMX_BOOL isInput);
157
168
177
186
193 omx_base_PortType *openmaxStandPort,
194 OMX_BUFFERHEADERTYPE* pBuffer);
195
205 omx_base_PortType *openmaxStandPort,
206 OMX_BUFFERHEADERTYPE** pBuffer,
207 OMX_U32 nPortIndex,
208 OMX_PTR pAppPrivate,
209 OMX_U32 nSizeBytes);
210
220 omx_base_PortType *openmaxStandPort,
221 OMX_BUFFERHEADERTYPE** ppBufferHdr,
222 OMX_U32 nPortIndex,
223 OMX_PTR pAppPrivate,
224 OMX_U32 nSizeBytes,
225 OMX_U8* pBuffer);
226
233 omx_base_PortType *openmaxStandPort,
234 OMX_U32 nPortIndex,
235 OMX_BUFFERHEADERTYPE* pBuffer);
236
243
248
250 omx_base_PortType* openmaxStandPort,
251 OMX_BUFFERHEADERTYPE* pBuffer);
252
255
257 omx_base_PortType* openmaxStandPort,
258 OMX_HANDLETYPE hTunneledComp,
260 OMX_TUNNELSETUPTYPE* pTunnelSetup);
261
265 omx_base_PortType *openmaxStandPort,
266 OMX_U32 nPortIndex);
267
271 omx_base_PortType *openmaxStandPort,
272 OMX_U32 nPortIndex);
273
274
275#endif
OMX_ERRORTYPE
Definition OMX_Core.h:127
unsigned long OMX_U32
Definition OMX_Types.h:145
unsigned char OMX_U8
Definition OMX_Types.h:133
OMX_BOOL
Definition OMX_Types.h:189
void * OMX_PTR
Definition OMX_Types.h:199
void * OMX_HANDLETYPE
Definition OMX_Types.h:295
OMX_ERRORTYPE base_port_FlushProcessingBuffers(omx_base_PortType *openmaxStandPort)
Releases buffers under processing.
BUFFER_STATUS_FLAG
@ BUFFER_ASSIGNED
@ HEADER_ALLOCATED
@ BUFFER_FREE
@ BUFFER_ALLOCATED
OMX_ERRORTYPE base_port_SendBufferFunction(omx_base_PortType *openmaxStandPort, OMX_BUFFERHEADERTYPE *pBuffer)
The entry point for sending buffers to the port.
TUNNEL_STATUS_FLAG
the status of a port related to the tunneling with another component
@ PROPRIETARY_COMMUNICATION_ESTABLISHED
@ TUNNEL_ESTABLISHED
@ NO_TUNNEL
@ TUNNEL_IS_SUPPLIER
OMX_ERRORTYPE base_port_ReturnBufferFunction(omx_base_PortType *openmaxStandPort, OMX_BUFFERHEADERTYPE *pBuffer)
Returns buffers when processed.
OMX_ERRORTYPE base_port_DisablePort(omx_base_PortType *openmaxStandPort)
Disables the port.
OMX_ERRORTYPE base_port_FreeBuffer(omx_base_PortType *openmaxStandPort, OMX_U32 nPortIndex, OMX_BUFFERHEADERTYPE *pBuffer)
Called by the standard function.
OMX_ERRORTYPE base_port_FreeTunnelBuffer(omx_base_PortType *openmaxStandPort, OMX_U32 nPortIndex)
Free buffers used in tunnel.
OMX_ERRORTYPE base_port_ComponentTunnelRequest(omx_base_PortType *openmaxStandPort, OMX_HANDLETYPE hTunneledComp, OMX_U32 nTunneledPort, OMX_TUNNELSETUPTYPE *pTunnelSetup)
Setup Tunnel with the port.
OMX_ERRORTYPE base_port_AllocateTunnelBuffer(omx_base_PortType *openmaxStandPort, OMX_U32 nPortIndex)
Allocate Buffers for tunneling use.
OMX_ERRORTYPE base_port_UseBuffer(omx_base_PortType *openmaxStandPort, OMX_BUFFERHEADERTYPE **ppBufferHdr, OMX_U32 nPortIndex, OMX_PTR pAppPrivate, OMX_U32 nSizeBytes, OMX_U8 *pBuffer)
Called by the standard use buffer, it implements a base functionality.
OMX_ERRORTYPE base_port_Constructor(OMX_COMPONENTTYPE *openmaxStandComp, omx_base_PortType **openmaxStandPort, OMX_U32 nPortIndex, OMX_BOOL isInput)
The base contructor for the generic OpenMAX ST port.
OMX_ERRORTYPE base_port_AllocateBuffer(omx_base_PortType *openmaxStandPort, OMX_BUFFERHEADERTYPE **pBuffer, OMX_U32 nPortIndex, OMX_PTR pAppPrivate, OMX_U32 nSizeBytes)
Called by the standard allocate buffer, it implements a base functionality.
OMX_ERRORTYPE base_port_Destructor(omx_base_PortType *openmaxStandPort)
The base destructor for the generic OpenMAX ST port.
OMX_ERRORTYPE base_port_EnablePort(omx_base_PortType *openmaxStandPort)
Enables the port.
#define ENDCLASS(a)
#define CLASS(a)

Generated for OpenMAX Bellagio rel. 0.9.3 by  doxygen 1.5.1
SourceForge.net Logo