OpenMAX Bellagio 0.9.3
|
Go to the source code of this file.
Macros | |
#define | DEFAULT_WIDTH 352 |
#define | DEFAULT_HEIGHT 288 |
#define | CLOCKPORT_INDEX 2 |
#define | DEFAULT_VIDEO_INPUT_BUF_SIZE DEFAULT_WIDTH*DEFAULT_HEIGHT*3/2 |
#define CLOCKPORT_INDEX 2 |
Definition at line 31 of file omx_video_scheduler_component.c.
#define DEFAULT_HEIGHT 288 |
Definition at line 30 of file omx_video_scheduler_component.c.
#define DEFAULT_VIDEO_INPUT_BUF_SIZE DEFAULT_WIDTH*DEFAULT_HEIGHT*3/2 |
define the max input buffer size
Definition at line 34 of file omx_video_scheduler_component.c.
#define DEFAULT_WIDTH 352 |
src/components/videoscheduler/omx_video_scheduler_component.c
This component implements a video scheduler
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 29 of file omx_video_scheduler_component.c.
void omx_video_scheduler_component_BufferMgmtCallback | ( | OMX_COMPONENTTYPE * | openmaxStandComp, |
OMX_BUFFERHEADERTYPE * | pInputBuffer, | ||
OMX_BUFFERHEADERTYPE * | pOutputBuffer | ||
) |
This function is used to process the input buffer and provide one output buffer
Definition at line 520 of file omx_video_scheduler_component.c.
References CLOCKPORT_INDEX, OMX_BUFFERHEADERTYPE::nFilledLen, OMX_BUFFERHEADERTYPE::nFlags, OMX_BUFFERHEADERTYPE::nOffset, OMX_BASE_FILTER_INPUTPORT_INDEX, OMX_BUFFERFLAG_EOS, OMX_TransStateExecutingToIdle, omx_video_scheduler_component_ClockPortHandleFunction(), OMX_BUFFERHEADERTYPE::pBuffer, OMX_COMPONENTTYPE::pComponentPrivate, PORT_IS_BEING_FLUSHED, and PORT_IS_TUNNELED.
Referenced by omx_video_scheduler_component_Constructor().
OMX_BOOL omx_video_scheduler_component_ClockPortHandleFunction | ( | omx_video_scheduler_component_PrivateType * | omx_video_scheduler_component_Private, |
OMX_BUFFERHEADERTYPE * | pInputBuffer | ||
) |
Definition at line 272 of file omx_video_scheduler_component.c.
References CLOCKPORT_INDEX, DEB_LEV_ERR, DEB_LEV_FULL_SEQ, DEBUG, dequeue(), err, OMX_TIME_MEDIATIMETYPE::eState, OMX_TIME_MEDIATIMETYPE::eUpdateType, omx_base_clock_PortType::hTunneledComponent, queue_t::nelem, OMX_BUFFERHEADERTYPE::nFilledLen, OMX_BUFFERHEADERTYPE::nFlags, OMX_TIME_CONFIG_MEDIATIMEREQUESTTYPE::nMediaTimestamp, OMX_TIME_CONFIG_MEDIATIMEREQUESTTYPE::nOffset, OMX_TIME_MEDIATIMETYPE::nOffset, OMX_TIME_CONFIG_TIMESTAMPTYPE::nPortIndex, OMX_TIME_CONFIG_MEDIATIMEREQUESTTYPE::nPortIndex, OMX_BUFFERHEADERTYPE::nTimeStamp, OMX_TIME_CONFIG_TIMESTAMPTYPE::nTimestamp, omx_base_clock_PortType::nTunneledPort, OMX_BUFFERFLAG_STARTTIME, OMX_ErrorNone, OMX_FALSE, OMX_IndexConfigTimeClientStartTime, OMX_IndexConfigTimeCurrentVideoReference, OMX_IndexConfigTimeMediaTimeRequest, OMX_SetConfig, OMX_TIME_ClockStateRunning, OMX_TIME_UpdateRequestFulfillment, OMX_TIME_UpdateScaleChanged, OMX_TransStateExecutingToIdle, OMX_TRUE, OMX_BUFFERHEADERTYPE::pBuffer, omx_base_clock_PortType::pBufferQueue, omx_base_clock_PortType::pBufferSem, OMX_TIME_CONFIG_MEDIATIMEREQUESTTYPE::pClientPrivate, PORT_IS_BEING_FLUSHED, omx_base_clock_PortType::ReturnBufferFunction, tsem_t::semval, setHeader(), omx_base_clock_PortType::sMediaTimeRequest, tsem_down(), and OMX_TIME_MEDIATIMETYPE::xScale.
Referenced by omx_video_scheduler_component_BufferMgmtCallback(), and omx_video_scheduler_component_port_SendBufferFunction().
OMX_ERRORTYPE omx_video_scheduler_component_Constructor | ( | OMX_COMPONENTTYPE * | openmaxStandComp, |
OMX_STRING | cComponentName | ||
) |
The Constructor
openmaxStandComp | the component handle to be constructed |
cComponentName | is the name of the constructed component |
we could create our own port structures here fixme maybe the base class could use a "port factory" function pointer?
Allocate Ports and call port constructor.
Domain specific section for the ports.
Definition at line 40 of file omx_video_scheduler_component.c.
References base_clock_port_Constructor(), base_video_port_Constructor(), CLOCKPORT_INDEX, DEB_LEV_FUNCTION_NAME, DEBUG, DEFAULT_HEIGHT, DEFAULT_VIDEO_INPUT_BUF_SIZE, DEFAULT_WIDTH, OMX_VIDEO_PORTDEFINITIONTYPE::eColorFormat, OMX_VIDEO_PARAM_PORTFORMATTYPE::eColorFormat, err, omx_base_video_PortType::FlushProcessingBuffers, OMX_PARAM_PORTDEFINITIONTYPE::format, OMX_COMPONENTTYPE::GetParameter, MAX_VIDEOSCHED_COMPONENTS, OMX_PARAM_PORTDEFINITIONTYPE::nBufferSize, OMX_VIDEO_PORTDEFINITIONTYPE::nFrameHeight, OMX_VIDEO_PORTDEFINITIONTYPE::nFrameWidth, omx_base_filter_Constructor(), OMX_BASE_FILTER_INPUTPORT_INDEX, OMX_BASE_FILTER_OUTPUTPORT_INDEX, OMX_COLOR_Format24bitRGB888, OMX_ErrorInsufficientResources, OMX_ErrorNone, OMX_FALSE, OMX_PortDomainOther, OMX_PortDomainVideo, OMX_TRUE, omx_video_scheduler_component_BufferMgmtCallback(), omx_video_scheduler_component_Destructor(), omx_video_scheduler_component_GetParameter(), omx_video_scheduler_component_port_FlushProcessingBuffers(), omx_video_scheduler_component_SetParameter(), OMX_COMPONENTTYPE::pComponentPrivate, RM_RegisterComponent(), OMX_COMPONENTTYPE::SetParameter, omx_base_video_PortType::sPortParam, omx_base_video_PortType::sVideoParam, OMX_PARAM_PORTDEFINITIONTYPE::video, VIDEO_SCHEDULER_COMP_NAME, and VIDEOSCHED_QUALITY_LEVELS.
Referenced by omx_component_library_Setup().
OMX_ERRORTYPE omx_video_scheduler_component_Destructor | ( | OMX_COMPONENTTYPE * | openmaxStandComp | ) |
The destructor
Definition at line 139 of file omx_video_scheduler_component.c.
References DEB_LEV_FUNCTION_NAME, DEBUG, omx_base_filter_Destructor(), OMX_ErrorNone, OMX_PortDomainOther, OMX_PortDomainVideo, and OMX_COMPONENTTYPE::pComponentPrivate.
Referenced by omx_video_scheduler_component_Constructor().
OMX_ERRORTYPE omx_video_scheduler_component_GetParameter | ( | OMX_HANDLETYPE | hComponent, |
OMX_INDEXTYPE | nParamIndex, | ||
OMX_PTR | ComponentParameterStructure | ||
) |
Definition at line 671 of file omx_video_scheduler_component.c.
References checkHeader(), CLOCKPORT_INDEX, DEB_LEV_SIMPLE_SEQ, DEBUG, err, OMX_OTHER_PARAM_PORTFORMATTYPE::nPortIndex, OMX_VIDEO_PARAM_PORTFORMATTYPE::nPortIndex, omx_base_component_GetParameter(), OMX_ErrorBadParameter, OMX_ErrorBadPortIndex, OMX_ErrorNone, OMX_IndexParamOtherInit, OMX_IndexParamOtherPortFormat, OMX_IndexParamStandardComponentRole, OMX_IndexParamVideoInit, OMX_IndexParamVideoPortFormat, OMX_PortDomainOther, OMX_PortDomainVideo, OMX_COMPONENTTYPE::pComponentPrivate, omx_base_clock_PortType::sOtherParam, omx_base_video_PortType::sVideoParam, and VIDEO_SCHEDULER_COMP_ROLE.
Referenced by omx_video_scheduler_component_Constructor().
OMX_ERRORTYPE omx_video_scheduler_component_port_FlushProcessingBuffers | ( | omx_base_PortType * | openmaxStandPort | ) |
Releases buffers under processing. This function must be implemented in the derived classes, for the specific processing.
Definition at line 417 of file omx_video_scheduler_component.c.
References omx_base_PortType::bIsPortFlushed, omx_base_component_PrivateType::bMgmtSem, omx_base_component_PrivateType::bStateSem, omx_base_PortType::BufferProcessedCallback, omx_base_component_PrivateType::callbackData, CLOCKPORT_INDEX, DEB_LEV_FULL_SEQ, DEB_LEV_FUNCTION_NAME, DEB_LEV_PARAMS, DEBUG, dequeue(), OMX_PARAM_PORTDEFINITIONTYPE::eDir, OMX_PARAM_PORTDEFINITIONTYPE::eDomain, omx_base_component_PrivateType::flush_all_condition, omx_base_component_PrivateType::flush_condition, omx_base_component_PrivateType::flush_mutex, omx_base_PortType::hTunneledComponent, omx_base_component_PrivateType::name, queue_t::nelem, omx_base_PortType::nNumAssignedBuffers, OMX_PARAM_PORTDEFINITIONTYPE::nPortIndex, omx_base_PortType::nTunnelFlags, OMX_DirInput, OMX_ErrorInsufficientResources, OMX_ErrorNone, OMX_FALSE, OMX_PortDomainOther, OMX_StateExecuting, OMX_TRUE, omx_base_PortType::pBufferQueue, omx_base_clock_PortType::pBufferSem, omx_base_PortType::pBufferSem, OMX_COMPONENTTYPE::pComponentPrivate, PORT_IS_BUFFER_SUPPLIER, PORT_IS_TUNNELED, PORT_IS_TUNNELED_N_BUFFER_SUPPLIER, queue(), tsem_t::semval, omx_base_PortType::sPortParam, omx_base_PortType::standCompContainer, omx_base_component_PrivateType::state, tsem_down(), tsem_reset(), tsem_signal(), and tsem_up().
Referenced by omx_video_scheduler_component_Constructor().
OMX_ERRORTYPE omx_video_scheduler_component_port_SendBufferFunction | ( | omx_base_PortType * | openmaxStandPort, |
OMX_BUFFERHEADERTYPE * | pBuffer | ||
) |
the entry point for sending buffers to the video scheduler ports
This function can be called by the EmptyThisBuffer or FillThisBuffer. It depends on the nature of the port, that can be an input or output port.
Definition at line 168 of file omx_video_scheduler_component.c.
References omx_base_component_PrivateType::bMgmtSem, checkHeader(), CLOCKPORT_INDEX, DEB_LEV_ERR, DEB_LEV_FULL_SEQ, DEB_LEV_FUNCTION_NAME, DEBUG, OMX_PARAM_PORTDEFINITIONTYPE::eDir, err, omx_base_component_PrivateType::name, OMX_PARAM_PORTDEFINITIONTYPE::nBufferCountActual, OMX_BUFFERHEADERTYPE::nFilledLen, OMX_BUFFERHEADERTYPE::nFlags, OMX_BUFFERHEADERTYPE::nInputPortIndex, OMX_BUFFERHEADERTYPE::nOutputPortIndex, OMX_PARAM_PORTDEFINITIONTYPE::nPortIndex, OMX_BUFFERFLAG_EOS, OMX_DirInput, OMX_ErrorBadParameter, OMX_ErrorBadPortIndex, OMX_ErrorIncorrectStateOperation, OMX_ErrorInsufficientResources, OMX_ErrorInvalidState, OMX_ErrorNone, OMX_FALSE, OMX_StateExecuting, OMX_StateIdle, OMX_StateInvalid, OMX_StatePause, OMX_TransStateExecutingToIdle, OMX_TRUE, omx_video_scheduler_component_ClockPortHandleFunction(), OMX_BUFFERHEADERTYPE::pBuffer, omx_base_PortType::pBufferQueue, omx_base_PortType::pBufferSem, OMX_COMPONENTTYPE::pComponentPrivate, omx_base_PortType::pInternalBufferStorage, PORT_IS_BEING_DISABLED, PORT_IS_BEING_FLUSHED, PORT_IS_BUFFER_SUPPLIER, PORT_IS_ENABLED, PORT_IS_TUNNELED, PORT_IS_TUNNELED_N_BUFFER_SUPPLIER, omx_base_component_PrivateType::ports, queue(), omx_base_PortType::sPortParam, omx_base_PortType::standCompContainer, omx_base_component_PrivateType::state, omx_base_component_PrivateType::transientState, and tsem_up().
OMX_ERRORTYPE omx_video_scheduler_component_SetParameter | ( | OMX_HANDLETYPE | hComponent, |
OMX_INDEXTYPE | nParamIndex, | ||
OMX_PTR | ComponentParameterStructure | ||
) |
Definition at line 545 of file omx_video_scheduler_component.c.
References OMX_VIDEO_PORTDEFINITIONTYPE::bFlagErrorConcealment, checkHeader(), CLOCKPORT_INDEX, OMX_VIDEO_PORTDEFINITIONTYPE::cMIMEType, OMX_PARAM_COMPONENTROLETYPE::cRole, DEB_LEV_ERR, DEB_LEV_SIMPLE_SEQ, DEBUG, OMX_VIDEO_PARAM_PORTFORMATTYPE::eColorFormat, OMX_VIDEO_PARAM_PORTFORMATTYPE::eCompressionFormat, OMX_OTHER_PORTDEFINITIONTYPE::eFormat, OMX_OTHER_PARAM_PORTFORMATTYPE::eFormat, err, OMX_PARAM_PORTDEFINITIONTYPE::format, OMX_VIDEO_PORTDEFINITIONTYPE::nBitrate, OMX_PARAM_PORTDEFINITIONTYPE::nBufferCountActual, OMX_PARAM_PORTDEFINITIONTYPE::nBufferSize, OMX_VIDEO_PORTDEFINITIONTYPE::nFrameHeight, OMX_VIDEO_PORTDEFINITIONTYPE::nFrameWidth, OMX_PARAM_PORTDEFINITIONTYPE::nPortIndex, OMX_OTHER_PARAM_PORTFORMATTYPE::nPortIndex, OMX_VIDEO_PARAM_PORTFORMATTYPE::nPortIndex, OMX_VIDEO_PORTDEFINITIONTYPE::nSliceHeight, OMX_VIDEO_PORTDEFINITIONTYPE::nStride, omx_base_component_ParameterSanityCheck(), omx_base_component_SetParameter(), OMX_ErrorBadParameter, OMX_ErrorBadPortIndex, OMX_ErrorIncorrectStateOperation, OMX_ErrorNone, OMX_ErrorUnsupportedSetting, OMX_IndexParamOtherPortFormat, OMX_IndexParamPortDefinition, OMX_IndexParamStandardComponentRole, OMX_IndexParamVideoPortFormat, OMX_PortDomainOther, OMX_PortDomainVideo, OMX_StateLoaded, OMX_StateWaitForResources, OMX_VIDEO_CodingUnused, OMX_PARAM_PORTDEFINITIONTYPE::other, OMX_COMPONENTTYPE::pComponentPrivate, omx_base_clock_PortType::sOtherParam, omx_base_clock_PortType::sPortParam, omx_base_video_PortType::sPortParam, omx_base_video_PortType::sVideoParam, OMX_PARAM_PORTDEFINITIONTYPE::video, VIDEO_SCHEDULER_COMP_ROLE, OMX_VIDEO_PORTDEFINITIONTYPE::xFramerate, and OMX_VIDEO_PARAM_PORTFORMATTYPE::xFramerate.
Referenced by omx_video_scheduler_component_Constructor().