OpenMAX Bellagio 0.9.3
omx_video_scheduler_component.h File Reference
#include <OMX_Types.h>
#include <OMX_Component.h>
#include <OMX_Core.h>
#include <omx_base_filter.h>
#include <omx_base_video_port.h>
#include <omx_base_clock_port.h>

Go to the source code of this file.

Macros

#define VIDEO_SCHEDULER_COMP_NAME   "OMX.st.video.scheduler"
 
#define VIDEO_SCHEDULER_COMP_ROLE   "video.scheduler"
 
#define MAX_VIDEOSCHED_COMPONENTS   10
 
#define VIDEOSCHED_QUALITY_LEVELS   2
 
#define omx_video_scheduler_component_PrivateType_FIELDS
 

Functions

OMX_ERRORTYPE omx_video_scheduler_component_Constructor (OMX_COMPONENTTYPE *openmaxStandComp, OMX_STRING cComponentName)
 
OMX_ERRORTYPE omx_fbdev_sink_component_Init (OMX_COMPONENTTYPE *openmaxStandComp)
 
OMX_ERRORTYPE omx_fbdev_sink_component_Deinit (OMX_COMPONENTTYPE *openmaxStandComp)
 
OMX_ERRORTYPE omx_video_scheduler_component_Destructor (OMX_COMPONENTTYPE *openmaxStandComp)
 
void omx_video_scheduler_component_BufferMgmtCallback (OMX_COMPONENTTYPE *openmaxStandComp, OMX_BUFFERHEADERTYPE *inputbuffer, OMX_BUFFERHEADERTYPE *outputbuffer)
 
OMX_ERRORTYPE omx_video_scheduler_component_GetParameter (OMX_HANDLETYPE hComponent, OMX_INDEXTYPE nParamIndex, OMX_PTR ComponentParameterStructure)
 
OMX_ERRORTYPE omx_video_scheduler_component_SetParameter (OMX_HANDLETYPE hComponent, OMX_INDEXTYPE nParamIndex, OMX_PTR ComponentParameterStructure)
 
OMX_BOOL omx_video_scheduler_component_ClockPortHandleFunction (omx_video_scheduler_component_PrivateType *omx_video_scheduler_component_Private, OMX_BUFFERHEADERTYPE *inputbuffer)
 
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
 
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.
 

Macro Definition Documentation

◆ MAX_VIDEOSCHED_COMPONENTS

#define MAX_VIDEOSCHED_COMPONENTS   10

Definition at line 38 of file omx_video_scheduler_component.h.

◆ omx_video_scheduler_component_PrivateType_FIELDS

#define omx_video_scheduler_component_PrivateType_FIELDS
Value:
omx_base_filter_PrivateType_FIELDS \
OMX_S32 xScale; \
OMX_BOOL frameDropFlag;\
int dropFrameCount;
OMX_TIME_CLOCKSTATE
Definition OMX_Other.h:141
OMX_BOOL
Definition OMX_Types.h:189

video scheduler component private structure.

Parameters
xScalethe scale of the media clock
eStatethe state of the media clock
frameDropFlagthe flag active on scale change indicates that frames are to be dropped
dropFrameCountcounts the number of frames dropped

Definition at line 50 of file omx_video_scheduler_component.h.

◆ VIDEO_SCHEDULER_COMP_NAME

#define VIDEO_SCHEDULER_COMP_NAME   "OMX.st.video.scheduler"

src/components/videoscheduler/omx_video_scheduler_component.h

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 36 of file omx_video_scheduler_component.h.

◆ VIDEO_SCHEDULER_COMP_ROLE

#define VIDEO_SCHEDULER_COMP_ROLE   "video.scheduler"

Definition at line 37 of file omx_video_scheduler_component.h.

◆ VIDEOSCHED_QUALITY_LEVELS

#define VIDEOSCHED_QUALITY_LEVELS   2

Definition at line 40 of file omx_video_scheduler_component.h.

Function Documentation

◆ omx_fbdev_sink_component_Deinit()

OMX_ERRORTYPE omx_fbdev_sink_component_Deinit ( OMX_COMPONENTTYPE openmaxStandComp)

◆ omx_fbdev_sink_component_Init()

OMX_ERRORTYPE omx_fbdev_sink_component_Init ( OMX_COMPONENTTYPE openmaxStandComp)

◆ omx_video_scheduler_component_BufferMgmtCallback()

◆ omx_video_scheduler_component_ClockPortHandleFunction()

OMX_BOOL omx_video_scheduler_component_ClockPortHandleFunction ( omx_video_scheduler_component_PrivateType *  omx_video_scheduler_component_Private,
OMX_BUFFERHEADERTYPE inputbuffer 
)

◆ omx_video_scheduler_component_Constructor()

OMX_ERRORTYPE omx_video_scheduler_component_Constructor ( OMX_COMPONENTTYPE openmaxStandComp,
OMX_STRING  cComponentName 
)

The Constructor

Parameters
openmaxStandCompthe component handle to be constructed
cComponentNameis 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_video_scheduler_component_Destructor()

◆ omx_video_scheduler_component_GetParameter()

◆ omx_video_scheduler_component_port_FlushProcessingBuffers()

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_video_scheduler_component_port_SendBufferFunction()

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_video_scheduler_component_SetParameter()

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().


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