OpenMAX Bellagio 0.9.3
omx_clocksrc_component.h File Reference
#include <OMX_Types.h>
#include <OMX_Component.h>
#include <OMX_Core.h>
#include <OMX_Audio.h>
#include <omx_base_source.h>
#include <string.h>
#include <sys/time.h>

Go to the source code of this file.

Macros

#define CLOCK_COMP_NAME   "OMX.st.clocksrc"
 
#define CLOCK_COMP_ROLE   "clocksrc"
 
#define MAX_CLOCK_COMPONENTS   20
 
#define MAX_CLOCK_PORTS   8
 
#define omx_clocksrc_component_PrivateType_FIELDS
 

Functions

OMX_ERRORTYPE omx_clocksrc_component_Constructor (OMX_COMPONENTTYPE *openmaxStandComp, OMX_STRING cComponentName)
 
OMX_ERRORTYPE omx_clocksrc_component_Destructor (OMX_COMPONENTTYPE *openmaxStandComp)
 
void omx_clocksrc_component_BufferMgmtCallback (OMX_COMPONENTTYPE *openmaxStandComp, OMX_BUFFERHEADERTYPE *inputbuffer)
 
OMX_ERRORTYPE omx_clocksrc_component_GetParameter (OMX_HANDLETYPE hComponent, OMX_INDEXTYPE nParamIndex, OMX_PTR ComponentParameterStructure)
 
OMX_ERRORTYPE omx_clocksrc_component_SetParameter (OMX_HANDLETYPE hComponent, OMX_INDEXTYPE nParamIndex, OMX_PTR ComponentParameterStructure)
 
OMX_ERRORTYPE omx_clocksrc_component_SetConfig (OMX_HANDLETYPE hComponent, OMX_INDEXTYPE nIndex, OMX_PTR pComponentConfigStructure)
 
OMX_ERRORTYPE omx_clocksrc_component_GetConfig (OMX_HANDLETYPE hComponent, OMX_INDEXTYPE nIndex, OMX_PTR pComponentConfigStructure)
 
void * omx_clocksrc_BufferMgmtFunction (void *param)
 
OMX_ERRORTYPE omx_clocksrc_component_SendCommand (OMX_HANDLETYPE hComponent, OMX_COMMANDTYPE Cmd, OMX_U32 nParam, OMX_PTR pCmdData)
 
OMX_ERRORTYPE clocksrc_port_FlushProcessingBuffers (omx_base_PortType *openmaxStandPort)
 Releases buffers under processing. This function must be implemented in the derived classes, for the specific processing.
 

Macro Definition Documentation

◆ CLOCK_COMP_NAME

#define CLOCK_COMP_NAME   "OMX.st.clocksrc"

src/components/clocksrc/omx_clocksrc_component.h

OpenMAX clocksrc_component component. This component does not perform any multimedia processing. It is provides the media and the reference clock for all the clients connected to it.

Copyright (C) 2008-2009 STMicroelectronics Copyright (C) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Definition at line 38 of file omx_clocksrc_component.h.

Referenced by omx_clocksrc_component_Constructor(), and omx_component_library_Setup().

◆ CLOCK_COMP_ROLE

#define CLOCK_COMP_ROLE   "clocksrc"

Definition at line 39 of file omx_clocksrc_component.h.

Referenced by omx_component_library_Setup().

◆ MAX_CLOCK_COMPONENTS

#define MAX_CLOCK_COMPONENTS   20

Definition at line 40 of file omx_clocksrc_component.h.

Referenced by omx_clocksrc_component_Constructor().

◆ MAX_CLOCK_PORTS

#define MAX_CLOCK_PORTS   8

Maximum number of clock ports

Definition at line 43 of file omx_clocksrc_component.h.

Referenced by omx_clocksrc_BufferMgmtFunction().

◆ omx_clocksrc_component_PrivateType_FIELDS

#define omx_clocksrc_component_PrivateType_FIELDS
Value:
omx_base_source_PrivateType_FIELDS \
OMX_TIME_CONFIG_CLOCKSTATETYPE sClockState; \
tsem_t* startTimeSem; \
tsem_t* clockEventSem; \
tsem_t* clockEventCompleteSem; \
OMX_TICKS WallTimeBase; \
OMX_TICKS MediaTimeBase; \
OMX_TIME_UPDATETYPE eUpdateType; \
OMX_TIME_UPDATETYPE
Definition OMX_Other.h:121
OMX_S64 OMX_TICKS
Definition OMX_Types.h:282

Clock component private structure. see the define above

Parameters
sClockStateThis structure holds the state of the clock
startTimeSemthe semaphore that coordinates the arrival of start times from all clients
clockEventSemthe semaphore that coordinates clock event received from the client
clockEventCompleteSemthe semaphore that coordinates clock event sent to the client
WallTimeBasethe wall time at which the clock was started
MediaTimeBasethe Media time at which the clock was started
eUpdateTypeindicates the type of update received from the clock src component
sMinStartTimekeeps the minimum starttime of the clients
sConfigScaleRepresenting the current media time scale factor

Definition at line 59 of file omx_clocksrc_component.h.

Function Documentation

◆ clocksrc_port_FlushProcessingBuffers()

◆ omx_clocksrc_BufferMgmtFunction()

◆ omx_clocksrc_component_BufferMgmtCallback()

void omx_clocksrc_component_BufferMgmtCallback ( OMX_COMPONENTTYPE * openmaxStandComp,
OMX_BUFFERHEADERTYPE * outputbuffer )

◆ omx_clocksrc_component_Constructor()

OMX_ERRORTYPE omx_clocksrc_component_Constructor ( OMX_COMPONENTTYPE * openmaxStandComp,
OMX_STRING cComponentName )

src/components/clocksrc/omx_clocksrc_component.c

OpenMAX clocksrc_component component. This component does not perform any multimedia processing. It is provides the media and the reference clock for all the clients connected to it.

Copyright (C) 2008-2009 STMicroelectronics Copyright (C) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA The Constructor

Allocate Ports and call port constructor.

Definition at line 35 of file omx_clocksrc_component.c.

References base_clock_port_Constructor(), CLOCK_COMP_NAME, clocksrc_port_FlushProcessingBuffers(), OMX_COMPONENTTYPE::GetConfig, OMX_COMPONENTTYPE::GetParameter, MAX_CLOCK_COMPONENTS, omx_base_source_Constructor(), omx_clocksrc_BufferMgmtFunction(), omx_clocksrc_component_BufferMgmtCallback(), omx_clocksrc_component_Destructor(), omx_clocksrc_component_GetConfig(), omx_clocksrc_component_GetParameter(), omx_clocksrc_component_SendCommand(), omx_clocksrc_component_SetConfig(), omx_clocksrc_component_SetParameter(), OMX_ErrorInsufficientResources, OMX_ErrorNone, OMX_FALSE, OMX_PortDomainOther, OMX_TIME_ClockStateStopped, OMX_TIME_RefClockNone, OMX_TIME_UpdateMax, OMX_COMPONENTTYPE::pComponentPrivate, RM_RegisterComponent(), OMX_COMPONENTTYPE::SendCommand, OMX_COMPONENTTYPE::SetConfig, setHeader(), OMX_COMPONENTTYPE::SetParameter, and tsem_init().

Referenced by omx_component_library_Setup().

◆ omx_clocksrc_component_Destructor()

OMX_ERRORTYPE omx_clocksrc_component_Destructor ( OMX_COMPONENTTYPE * openmaxStandComp)

◆ omx_clocksrc_component_GetConfig()

◆ omx_clocksrc_component_GetParameter()

◆ omx_clocksrc_component_SendCommand()

◆ omx_clocksrc_component_SetConfig()

OMX_ERRORTYPE omx_clocksrc_component_SetConfig ( OMX_HANDLETYPE hComponent,
OMX_INDEXTYPE nIndex,
OMX_PTR pComponentConfigStructure )

????

Definition at line 361 of file omx_clocksrc_component.c.

References DEB_LEV_ERR, DEB_LEV_FUNCTION_NAME, DEB_LEV_SIMPLE_SEQ, DEBUG, OMX_TIME_MEDIATIMETYPE::eState, OMX_TIME_CONFIG_CLOCKSTATETYPE::eState, OMX_TIME_MEDIATIMETYPE::eUpdateType, OMX_TIME_CONFIG_MEDIATIMEREQUESTTYPE::nMediaTimestamp, OMX_TIME_MEDIATIMETYPE::nMediaTimestamp, OMX_TIME_CONFIG_MEDIATIMEREQUESTTYPE::nOffset, OMX_TIME_MEDIATIMETYPE::nOffset, OMX_TIME_CONFIG_TIMESTAMPTYPE::nPortIndex, OMX_TIME_CONFIG_MEDIATIMEREQUESTTYPE::nPortIndex, OMX_TIME_CONFIG_TIMESTAMPTYPE::nTimestamp, OMX_TIME_CONFIG_CLOCKSTATETYPE::nWaitMask, OMX_TIME_MEDIATIMETYPE::nWallTimeAtMediaTime, OMX_ErrorBadParameter, OMX_ErrorBadPortIndex, OMX_ErrorIncorrectStateTransition, OMX_ErrorNone, OMX_ErrorSameState, OMX_IndexConfigTimeActiveRefClock, OMX_IndexConfigTimeClientStartTime, OMX_IndexConfigTimeClockState, OMX_IndexConfigTimeCurrentAudioReference, OMX_IndexConfigTimeCurrentVideoReference, OMX_IndexConfigTimeMediaTimeRequest, OMX_IndexConfigTimeScale, OMX_PortDomainOther, OMX_TIME_ClockStateRunning, OMX_TIME_ClockStateStopped, OMX_TIME_ClockStateWaitingForStartTime, OMX_TIME_UpdateClockStateChanged, OMX_TIME_UpdateRequestFulfillment, OMX_TIME_UpdateScaleChanged, OMX_COMPONENTTYPE::pComponentPrivate, PORT_IS_ENABLED, omx_base_clock_PortType::sMediaTime, omx_base_clock_PortType::sMediaTimeRequest, omx_base_clock_PortType::sTimeStamp, tsem_down(), tsem_up(), and OMX_TIME_MEDIATIMETYPE::xScale.

Referenced by omx_clocksrc_component_Constructor().

◆ omx_clocksrc_component_SetParameter()


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