omx_base_component.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <OMX_Core.h>
#include <OMX_Component.h>
#include "omxcore.h"
#include "omx_base_component.h"
#include "tsemaphore.h"
#include "queue.h"

Go to the source code of this file.

Functions

OMX_ERRORTYPE omx_base_component_Constructor (OMX_COMPONENTTYPE *openmaxStandComp, OMX_STRING cComponentName)
 The base contructor for the OpenMAX st components.
OMX_ERRORTYPE omx_base_component_Destructor (OMX_COMPONENTTYPE *openmaxStandComp)
 The base destructor for ST OpenMAX components.
OMX_ERRORTYPE omx_base_component_ComponentDeInit (OMX_IN OMX_HANDLETYPE hComponent)
 This standard functionality is called when the component is destroyed in the FreeHandle standard call.
OMX_ERRORTYPE omx_base_component_DoStateSet (OMX_COMPONENTTYPE *openmaxStandComp, OMX_U32 destinationState)
OMX_ERRORTYPE checkHeader (OMX_PTR header, OMX_U32 size)
 Checks the header of a structure for consistency with size and spec version.
void setHeader (OMX_PTR header, OMX_U32 size)
 Simply fills the first two fields in any OMX structure with the size and the version.
OMX_ERRORTYPE omx_base_component_ParameterSanityCheck (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_U32 nPortIndex, OMX_IN OMX_PTR pStructure, OMX_IN size_t size)
OMX_ERRORTYPE omx_base_component_GetComponentVersion (OMX_IN OMX_HANDLETYPE hComponent, OMX_OUT OMX_STRING pComponentName, OMX_OUT OMX_VERSIONTYPE *pComponentVersion, OMX_OUT OMX_VERSIONTYPE *pSpecVersion, OMX_OUT OMX_UUIDTYPE *pComponentUUID)
 Standard OpenMAX function.
OMX_ERRORTYPE omx_base_component_ComponentRoleEnum (OMX_IN OMX_HANDLETYPE hComponent, OMX_OUT OMX_U8 *cRole, OMX_IN OMX_U32 nIndex)
 Enumerates all the roles of the component.
OMX_ERRORTYPE omx_base_component_SetCallbacks (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_CALLBACKTYPE *pCallbacks, OMX_IN OMX_PTR pAppData)
 standard OpenMAX function
OMX_ERRORTYPE omx_base_component_GetParameter (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_INDEXTYPE nParamIndex, OMX_INOUT OMX_PTR ComponentParameterStructure)
 Part of the standard OpenMAX function.
OMX_ERRORTYPE omx_base_component_SetParameter (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_INDEXTYPE nParamIndex, OMX_IN OMX_PTR ComponentParameterStructure)
 Part of the standard OpenMAX function.
OMX_ERRORTYPE omx_base_component_GetConfig (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_INDEXTYPE nIndex, OMX_INOUT OMX_PTR pComponentConfigStructure)
 base GetConfig function
OMX_ERRORTYPE omx_base_component_SetConfig (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_INDEXTYPE nIndex, OMX_IN OMX_PTR pComponentConfigStructure)
 base SetConfig function
OMX_ERRORTYPE omx_base_component_GetExtensionIndex (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_STRING cParameterName, OMX_OUT OMX_INDEXTYPE *pIndexType)
 base function not implemented
OMX_ERRORTYPE omx_base_component_GetState (OMX_IN OMX_HANDLETYPE hComponent, OMX_OUT OMX_STATETYPE *pState)
OMX_ERRORTYPE omx_base_component_SendCommand (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_COMMANDTYPE Cmd, OMX_IN OMX_U32 nParam, OMX_IN OMX_PTR pCmdData)
 standard SendCommand function
void * compMessageHandlerFunction (void *param)
 Component's message handler thread function.
OMX_ERRORTYPE omx_base_component_MessageHandler (OMX_COMPONENTTYPE *openmaxStandComp, internalRequestMessageType *message)
OMX_ERRORTYPE omx_base_component_AllocateBuffer (OMX_IN OMX_HANDLETYPE hComponent, OMX_INOUT OMX_BUFFERHEADERTYPE **ppBuffer, OMX_IN OMX_U32 nPortIndex, OMX_IN OMX_PTR pAppPrivate, OMX_IN OMX_U32 nSizeBytes)
OMX_ERRORTYPE omx_base_component_UseBuffer (OMX_IN OMX_HANDLETYPE hComponent, OMX_INOUT OMX_BUFFERHEADERTYPE **ppBufferHdr, OMX_IN OMX_U32 nPortIndex, OMX_IN OMX_PTR pAppPrivate, OMX_IN OMX_U32 nSizeBytes, OMX_IN OMX_U8 *pBuffer)
OMX_ERRORTYPE omx_base_component_UseEGLImage (OMX_HANDLETYPE hComponent, OMX_BUFFERHEADERTYPE **ppBufferHdr, OMX_U32 nPortIndex, OMX_PTR pAppPrivate, void *eglImage)
OMX_ERRORTYPE omx_base_component_FreeBuffer (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_U32 nPortIndex, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer)
OMX_ERRORTYPE omx_base_component_EmptyThisBuffer (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer)
OMX_ERRORTYPE omx_base_component_FillThisBuffer (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer)
OMX_ERRORTYPE omx_base_component_ComponentTunnelRequest (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_U32 nPort, OMX_IN OMX_HANDLETYPE hTunneledComp, OMX_IN OMX_U32 nTunneledPort, OMX_INOUT OMX_TUNNELSETUPTYPE *pTunnelSetup)


Detailed Description

OpenMAX base_component component. This component does not perform any multimedia processing. It is used as a base_component for new components development.

Copyright (C) 2007 STMicroelectronics Copyright (C) 2007-2008 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

$Date$ Revision $Rev$ Author $Author$

Definition in file omx_base_component.c.


Function Documentation

OMX_ERRORTYPE checkHeader ( OMX_PTR  header,
OMX_U32  size 
)

Checks the header of a structure for consistency with size and spec version.

Parameters:
header Pointer to the structure to be checked
size Size of the structure. it is in general obtained with a sizeof call applied to the structure
Returns:
OMX error code. If the header has failed the check, OMX_ErrorVersionMismatch is returned. If the header fails the size check OMX_ErrorBadParameter is returned

Definition at line 515 of file omx_base_component.c.

References DEB_LEV_ERR, DEBUG, OMX_VERSIONTYPE::nVersionMajor, OMX_VERSIONTYPE::nVersionMinor, OMX_ErrorBadParameter, OMX_ErrorNone, OMX_ErrorVersionMismatch, OMX_VERSIONTYPE::s, SPECVERSIONMAJOR, and SPECVERSIONMINOR.

Referenced by base_port_SendBufferFunction(), omx_alsasink_component_GetParameter(), omx_alsasrc_component_GetParameter(), omx_audio_mixer_component_GetParameter(), omx_audiodec_component_GetParameter(), omx_base_component_GetParameter(), omx_base_component_ParameterSanityCheck(), omx_base_component_SetParameter(), omx_fbdev_sink_component_GetParameter(), omx_fbdev_sink_component_SetConfig(), omx_ffmpeg_colorconv_component_GetConfig(), omx_ffmpeg_colorconv_component_GetParameter(), omx_ffmpeg_colorconv_component_SetConfig(), omx_filereader_component_GetParameter(), omx_filereader_component_SetConfig(), omx_maddec_component_GetParameter(), omx_parser3gp_component_GetParameter(), omx_parser3gp_component_SetConfig(), omx_symbianoutputstreamsink_component_SetParameter(), omx_videodec_component_GetParameter(), omx_videoenc_component_GetParameter(), omx_videosrc_component_GetParameter(), omx_volume_component_GetParameter(), and omx_vorbisdec_component_GetParameter().

void* compMessageHandlerFunction ( void *  param  ) 

Component's message handler thread function.

Handles all messages coming from components and processes them by dispatching them back to the triggering component.

Definition at line 1115 of file omx_base_component.c.

References DEB_LEV_ERR, DEB_LEV_FUNCTION_NAME, DEBUG, dequeue(), omx_base_component_PrivateType::messageHandler, omx_base_component_PrivateType::messageQueue, omx_base_component_PrivateType::messageSem, OMX_StateInvalid, OMX_COMPONENTTYPE::pComponentPrivate, omx_base_component_PrivateType::state, and tsem_down().

Referenced by omx_base_component_Constructor().

OMX_ERRORTYPE omx_base_component_AllocateBuffer ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_INOUT OMX_BUFFERHEADERTYPE **  ppBuffer,
OMX_IN OMX_U32  nPortIndex,
OMX_IN OMX_PTR  pAppPrivate,
OMX_IN OMX_U32  nSizeBytes 
)

OMX_ERRORTYPE omx_base_component_ComponentDeInit ( OMX_IN OMX_HANDLETYPE  hComponent  ) 

This standard functionality is called when the component is destroyed in the FreeHandle standard call.

In this way the implementation of the FreeHandle is standard, and it does not need a support by a specific component loader. The implementaiton of the ComponentDeInit contains the implementation specific part of the destroying phase.

Definition at line 229 of file omx_base_component.c.

References DEB_LEV_FUNCTION_NAME, DEBUG, omx_base_component_PrivateType::destructor, OMX_ErrorNone, and OMX_COMPONENTTYPE::pComponentPrivate.

Referenced by omx_base_component_Constructor().

OMX_ERRORTYPE omx_base_component_ComponentRoleEnum ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_OUT OMX_U8 cRole,
OMX_IN OMX_U32  nIndex 
)

Enumerates all the roles of the component.

Enumerates all the role of the component.

This function is intended to be used only by a core. The ST static core in any case does not use this function, because it can not be used before the creation of the component, but uses a static list. It is implemented only for API completion,and it will be not overriden by a derived component

Definition at line 625 of file omx_base_component.c.

References OMX_ErrorNoMore.

Referenced by omx_base_component_Constructor().

OMX_ERRORTYPE omx_base_component_ComponentTunnelRequest ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_IN OMX_U32  nPort,
OMX_IN OMX_HANDLETYPE  hTunneledComp,
OMX_IN OMX_U32  nTunneledPort,
OMX_INOUT OMX_TUNNELSETUPTYPE pTunnelSetup 
)

OMX_ERRORTYPE omx_base_component_Constructor ( OMX_COMPONENTTYPE openmaxStandComp,
OMX_STRING  cComponentName 
)

The base contructor for the OpenMAX st components.

The base contructor for the OpenMAX ST components.

This function is executed by the ST static component loader. It takes care of constructing the instance of the component. For the base_component component, the following is done:

1) Fills the basic OpenMAX structure. The fields can be overwritten by derived components. 3) Allocates (if needed) the omx_base_component_PrivateType private structure

Parameters:
openmaxStandComp the ST component to be initialized
Returns:
OMX_ErrorInsufficientResources if a memory allocation fails

Definition at line 65 of file omx_base_component.c.

References OMX_COMPONENTTYPE::AllocateBuffer, omx_base_component_PrivateType::bMgmtSem, omx_base_component_PrivateType::bStateSem, omx_base_component_PrivateType::callbackData, omx_base_component_PrivateType::callbacks, compMessageHandlerFunction(), OMX_COMPONENTTYPE::ComponentDeInit, OMX_COMPONENTTYPE::ComponentRoleEnum, OMX_COMPONENTTYPE::ComponentTunnelRequest, DEB_LEV_FUNCTION_NAME, DEBUG, omx_base_component_PrivateType::destructor, omx_base_component_PrivateType::DoStateSet, OMX_COMPONENTTYPE::EmptyThisBuffer, OMX_COMPONENTTYPE::FillThisBuffer, omx_base_component_PrivateType::flush_all_condition, omx_base_component_PrivateType::flush_condition, omx_base_component_PrivateType::flush_mutex, OMX_COMPONENTTYPE::FreeBuffer, OMX_COMPONENTTYPE::GetComponentVersion, OMX_COMPONENTTYPE::GetConfig, OMX_COMPONENTTYPE::GetExtensionIndex, OMX_COMPONENTTYPE::GetParameter, OMX_COMPONENTTYPE::GetState, omx_base_component_PrivateType::messageHandler, omx_base_component_PrivateType::messageHandlerThread, omx_base_component_PrivateType::messageHandlerThreadID, omx_base_component_PrivateType::messageQueue, omx_base_component_PrivateType::messageSem, omx_base_component_PrivateType::name, omx_base_component_PrivateType::nGroupID, omx_base_component_PrivateType::nGroupPriority, OMX_VERSIONTYPE::nRevision, OMX_COMPONENTTYPE::nSize, OMX_VERSIONTYPE::nStep, OMX_COMPONENTTYPE::nVersion, OMX_VERSIONTYPE::nVersionMajor, OMX_VERSIONTYPE::nVersionMinor, omx_base_component_AllocateBuffer(), omx_base_component_ComponentDeInit(), omx_base_component_ComponentRoleEnum(), omx_base_component_ComponentTunnelRequest(), omx_base_component_Destructor(), omx_base_component_DoStateSet(), omx_base_component_EmptyThisBuffer(), omx_base_component_FillThisBuffer(), omx_base_component_FreeBuffer(), omx_base_component_GetComponentVersion(), omx_base_component_GetConfig(), omx_base_component_GetExtensionIndex(), omx_base_component_GetParameter(), omx_base_component_GetState(), omx_base_component_MessageHandler(), omx_base_component_SendCommand(), omx_base_component_SetCallbacks(), omx_base_component_SetConfig(), omx_base_component_SetParameter(), omx_base_component_UseBuffer(), omx_base_component_UseEGLImage(), OMX_ErrorInsufficientResources, OMX_ErrorNone, OMX_MAX_STRINGNAME_SIZE, OMX_StateLoaded, OMX_TransStateInvalid, omx_base_component_PrivateType::openmaxStandComp, OMX_COMPONENTTYPE::pApplicationPrivate, OMX_COMPONENTTYPE::pComponentPrivate, omx_base_component_PrivateType::pMark, queue_init(), OMX_VERSIONTYPE::s, OMX_COMPONENTTYPE::SendCommand, OMX_COMPONENTTYPE::SetCallbacks, OMX_COMPONENTTYPE::SetConfig, setHeader(), OMX_COMPONENTTYPE::SetParameter, SPECREVISION, SPECSTEP, SPECVERSIONMAJOR, SPECVERSIONMINOR, omx_base_component_PrivateType::sPortTypesParam, omx_base_component_PrivateType::state, omx_base_component_PrivateType::transientState, tsem_init(), OMX_COMPONENTTYPE::UseBuffer, and OMX_COMPONENTTYPE::UseEGLImage.

Referenced by omx_base_filter_Constructor(), omx_base_sink_Constructor(), and omx_base_source_Constructor().

OMX_ERRORTYPE omx_base_component_Destructor ( OMX_COMPONENTTYPE openmaxStandComp  ) 

OMX_ERRORTYPE omx_base_component_DoStateSet ( OMX_COMPONENTTYPE openmaxStandComp,
OMX_U32  destinationState 
)

Changes the state of a component taking proper actions depending on the transiotion requested. This base function cover only the state changes that do not involve any port

Parameters:
openmaxStandComp the OpenMAX component which state is to be changed
destinationState the requested target state
Returns:
OMX_ErrorNotImplemented if the state change is noty handled in this base class, but needs a specific handling

Allocate here the buffers needed for the tunneling

starting buffer management thread

Definition at line 252 of file omx_base_component.c.

References omx_base_component_PrivateType::bMgmtSem, omx_base_component_PrivateType::bStateSem, omx_base_component_PrivateType::BufferMgmtFunction, omx_base_component_PrivateType::bufferMgmtThread, omx_base_component_PrivateType::bufferMgmtThreadID, DEB_LEV_ERR, DEB_LEV_FULL_SEQ, DEB_LEV_FUNCTION_NAME, DEB_LEV_PARAMS, DEB_LEV_SIMPLE_SEQ, DEBUG, dequeue(), err, omx_base_PortType::FlushProcessingBuffers, omx_base_component_PrivateType::name, OMX_PARAM_PORTDEFINITIONTYPE::nBufferSize, omx_base_PortType::nNumTunnelBuffer, OMX_PORT_PARAM_TYPE::nPorts, OMX_ErrorIncorrectStateTransition, OMX_ErrorInvalidState, OMX_ErrorNone, OMX_ErrorSameState, OMX_ErrorUndefined, OMX_FALSE, OMX_StateExecuting, OMX_StateIdle, OMX_StateInvalid, OMX_StateLoaded, OMX_StatePause, OMX_StateWaitForResources, OMX_TransStateInvalid, OMX_TRUE, omx_base_PortType::pBufferSem, OMX_COMPONENTTYPE::pComponentPrivate, PORT_IS_BUFFER_SUPPLIER, PORT_IS_ENABLED, PORT_IS_TUNNELED, PORT_IS_TUNNELED_N_BUFFER_SUPPLIER, omx_base_component_PrivateType::ports, omx_base_PortType::sPortParam, omx_base_component_PrivateType::sPortTypesParam, omx_base_component_PrivateType::state, omx_base_component_PrivateType::transientState, tsem_down(), tsem_signal(), and tsem_up().

Referenced by omx_base_component_Constructor().

OMX_ERRORTYPE omx_base_component_EmptyThisBuffer ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_IN OMX_BUFFERHEADERTYPE pBuffer 
)

OMX_ERRORTYPE omx_base_component_FillThisBuffer ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_IN OMX_BUFFERHEADERTYPE pBuffer 
)

OMX_ERRORTYPE omx_base_component_FreeBuffer ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_IN OMX_U32  nPortIndex,
OMX_IN OMX_BUFFERHEADERTYPE pBuffer 
)

OMX_ERRORTYPE omx_base_component_GetComponentVersion ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_OUT OMX_STRING  pComponentName,
OMX_OUT OMX_VERSIONTYPE pComponentVersion,
OMX_OUT OMX_VERSIONTYPE pSpecVersion,
OMX_OUT OMX_UUIDTYPE pComponentUUID 
)

Standard OpenMAX function.

standard openmax function

it returns the version of the component. See OMX_Core.h

Definition at line 582 of file omx_base_component.c.

References DEB_LEV_FUNCTION_NAME, DEBUG, omx_base_component_PrivateType::name, OMX_COMPONENTTYPE::nVersion, OMX_ErrorNone, OMX_COMPONENTTYPE::pComponentPrivate, SPECREVISION, SPECSTEP, SPECVERSIONMAJOR, and SPECVERSIONMINOR.

Referenced by omx_base_component_Constructor().

OMX_ERRORTYPE omx_base_component_GetConfig ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_IN OMX_INDEXTYPE  nIndex,
OMX_INOUT OMX_PTR  pComponentConfigStructure 
)

base GetConfig function

This base function is not implemented. If a derived component needs to support any config, it must implement a derived version of this function and assign it to the correct pointer in the private component descriptor

Definition at line 955 of file omx_base_component.c.

References OMX_ErrorNone.

Referenced by omx_audio_mixer_component_GetConfig(), omx_base_component_Constructor(), omx_fbdev_sink_component_GetConfig(), omx_ffmpeg_colorconv_component_GetConfig(), omx_filereader_component_GetConfig(), omx_parser3gp_component_GetConfig(), omx_symbianoutputstreamsink_component_GetConfig(), and omx_volume_component_GetConfig().

OMX_ERRORTYPE omx_base_component_GetExtensionIndex ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_IN OMX_STRING  cParameterName,
OMX_OUT OMX_INDEXTYPE pIndexType 
)

base function not implemented

This function can be eventually implemented by a derived component if needed

Definition at line 981 of file omx_base_component.c.

References DEB_LEV_FUNCTION_NAME, DEBUG, and OMX_ErrorBadParameter.

Referenced by omx_base_component_Constructor().

OMX_ERRORTYPE omx_base_component_GetParameter ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_IN OMX_INDEXTYPE  nParamIndex,
OMX_INOUT OMX_PTR  ComponentParameterStructure 
)

Part of the standard OpenMAX function.

This function return the parameters not related to any port. These parameters are handled in the derived components See OMX_Core.h for standard reference

Returns:
OMX_ErrorUnsupportedIndex if the index is not supported or not handled here

Definition at line 671 of file omx_base_component.c.

References checkHeader(), DEB_LEV_FUNCTION_NAME, DEB_LEV_PARAMS, DEBUG, omx_base_PortType::eBufferSupplier, err, omx_base_component_PrivateType::nGroupID, omx_base_component_PrivateType::nGroupPriority, OMX_PORT_PARAM_TYPE::nPorts, OMX_PORT_PARAM_TYPE::nStartPortNumber, OMX_BufferSupplyInput, OMX_BufferSupplyOutput, OMX_BufferSupplyUnspecified, OMX_DirInput, OMX_ErrorBadParameter, OMX_ErrorBadPortIndex, OMX_ErrorNone, OMX_ErrorUnsupportedIndex, OMX_IndexParamAudioInit, OMX_IndexParamCompBufferSupplier, OMX_IndexParamImageInit, OMX_IndexParamOtherInit, OMX_IndexParamPortDefinition, OMX_IndexParamPriorityMgmt, OMX_IndexParamVideoInit, OMX_COMPONENTTYPE::pComponentPrivate, PORT_IS_BUFFER_SUPPLIER, PORT_IS_TUNNELED, omx_base_component_PrivateType::ports, omx_base_PortType::sPortParam, and omx_base_component_PrivateType::sPortTypesParam.

Referenced by omx_alsasink_component_GetParameter(), omx_alsasrc_component_GetParameter(), omx_audio_mixer_component_GetParameter(), omx_audiodec_component_GetParameter(), omx_base_component_Constructor(), omx_fbdev_sink_component_GetParameter(), omx_ffmpeg_colorconv_component_GetParameter(), omx_filereader_component_GetParameter(), omx_maddec_component_GetParameter(), omx_parser3gp_component_GetParameter(), omx_symbianoutputstreamsink_component_GetParameter(), omx_videodec_component_GetParameter(), omx_videoenc_component_GetParameter(), omx_videosrc_component_GetParameter(), omx_volume_component_GetParameter(), and omx_vorbisdec_component_GetParameter().

OMX_ERRORTYPE omx_base_component_GetState ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_OUT OMX_STATETYPE pState 
)

Returns:
the state of the component
This function does not need any override by derived components

Definition at line 995 of file omx_base_component.c.

References OMX_ErrorNone, OMX_COMPONENTTYPE::pComponentPrivate, and omx_base_component_PrivateType::state.

Referenced by omx_base_component_Constructor().

OMX_ERRORTYPE omx_base_component_MessageHandler ( OMX_COMPONENTTYPE openmaxStandComp,
internalRequestMessageType message 
)

This is called by the component message entry point. In thea base version this function is named compMessageHandlerFunction

A request is made by the component when some asynchronous services are needed: 1) A SendCommand() is to be processed 2) An error needs to be notified 3) ...

Parameters:
openmaxStandComp the component itself
message the message that has been passed to core

This condition is added to pass the tests, it is not significant for the environment

Definition at line 1160 of file omx_base_component.c.

References omx_base_PortType::bIsPortFlushed, omx_base_component_PrivateType::bMgmtSem, omx_base_component_PrivateType::callbackData, omx_base_component_PrivateType::callbacks, DEB_LEV_ERR, DEB_LEV_FULL_SEQ, DEB_LEV_FUNCTION_NAME, DEB_LEV_SIMPLE_SEQ, DEBUG, omx_base_component_PrivateType::DoStateSet, err, OMX_CALLBACKTYPE::EventHandler, omx_base_PortType::FlushProcessingBuffers, internalRequestMessageType::messageParam, internalRequestMessageType::messageType, omx_base_component_PrivateType::name, OMX_PARAM_PORTDEFINITIONTYPE::nBufferCountActual, omx_base_PortType::nNumTunnelBuffer, OMX_PORT_PARAM_TYPE::nPorts, OMX_ALL, OMX_CommandFlush, OMX_CommandMarkBuffer, OMX_CommandPortDisable, OMX_CommandPortEnable, OMX_CommandStateSet, OMX_ErrorNone, OMX_EventCmdComplete, OMX_EventError, OMX_StateExecuting, OMX_StateLoaded, OMX_TRUE, omx_base_PortType::pBufferSem, internalRequestMessageType::pCmdData, OMX_COMPONENTTYPE::pComponentPrivate, omx_base_component_PrivateType::pMark, omx_base_PortType::Port_DisablePort, omx_base_PortType::Port_EnablePort, PORT_IS_BUFFER_SUPPLIER, PORT_IS_TUNNELED, omx_base_component_PrivateType::ports, omx_base_PortType::sPortParam, omx_base_component_PrivateType::sPortTypesParam, omx_base_component_PrivateType::state, and tsem_up().

Referenced by omx_audiodec_component_MessageHandler(), omx_base_component_Constructor(), omx_fbdev_sink_component_MessageHandler(), omx_filereader_component_MessageHandler(), omx_mad_decoder_MessageHandler(), omx_parser3gp_component_MessageHandler(), omx_video_colorconv_MessageHandler(), omx_videodec_component_MessageHandler(), omx_videoenc_component_MessageHandler(), omx_videosrc_component_MessageHandler(), and omx_vorbis_decoder_MessageHandler().

OMX_ERRORTYPE omx_base_component_ParameterSanityCheck ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_IN OMX_U32  nPortIndex,
OMX_IN OMX_PTR  pStructure,
OMX_IN size_t  size 
)

OMX_ERRORTYPE omx_base_component_SendCommand ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_IN OMX_COMMANDTYPE  Cmd,
OMX_IN OMX_U32  nParam,
OMX_IN OMX_PTR  pCmdData 
)

OMX_ERRORTYPE omx_base_component_SetCallbacks ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_IN OMX_CALLBACKTYPE pCallbacks,
OMX_IN OMX_PTR  pAppData 
)

OMX_ERRORTYPE omx_base_component_SetConfig ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_IN OMX_INDEXTYPE  nIndex,
OMX_IN OMX_PTR  pComponentConfigStructure 
)

base SetConfig function

This base function is not implemented. If a derived component needs to support any config, it must implement a derived version of this function and assign it to the correct pointer in the private component descriptor

Definition at line 969 of file omx_base_component.c.

References OMX_ErrorNone.

Referenced by omx_audio_mixer_component_SetConfig(), omx_audiodec_component_SetConfig(), omx_base_component_Constructor(), omx_fbdev_sink_component_SetConfig(), omx_ffmpeg_colorconv_component_SetConfig(), omx_filereader_component_SetConfig(), omx_parser3gp_component_SetConfig(), omx_symbianoutputstreamsink_component_SetConfig(), omx_videodec_component_SetConfig(), and omx_volume_component_SetConfig().

OMX_ERRORTYPE omx_base_component_SetParameter ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_IN OMX_INDEXTYPE  nParamIndex,
OMX_IN OMX_PTR  ComponentParameterStructure 
)

Part of the standard OpenMAX function.

part of the standard openmax function

This function sets the parameters not related to any port. These parameters are handled in the derived components See OMX_Core.h for standard reference

Returns:
OMX_ErrorUnsupportedIndex if the index is not supported or not handled here

These two cases regard the first stage of client override

these two cases regard the second stage of client override

Definition at line 764 of file omx_base_component.c.

References OMX_PARAM_PORTDEFINITIONTYPE::audio, omx_base_PortType::bBufferStateAllocated, OMX_IMAGE_PORTDEFINITIONTYPE::bFlagErrorConcealment, OMX_VIDEO_PORTDEFINITIONTYPE::bFlagErrorConcealment, BUFFER_FREE, checkHeader(), DEB_LEV_ERR, DEB_LEV_FUNCTION_NAME, DEB_LEV_PARAMS, DEB_LEV_SIMPLE_SEQ, DEBUG, OMX_IMAGE_PORTDEFINITIONTYPE::eColorFormat, OMX_VIDEO_PORTDEFINITIONTYPE::eColorFormat, OMX_IMAGE_PORTDEFINITIONTYPE::eCompressionFormat, OMX_VIDEO_PORTDEFINITIONTYPE::eCompressionFormat, OMX_PARAM_PORTDEFINITIONTYPE::eDomain, err, OMX_PARAM_PORTDEFINITIONTYPE::format, OMX_PARAM_PORTDEFINITIONTYPE::image, OMX_PARAM_PORTDEFINITIONTYPE::nBufferCountActual, OMX_PARAM_PORTDEFINITIONTYPE::nBufferCountMin, OMX_IMAGE_PORTDEFINITIONTYPE::nFrameHeight, OMX_VIDEO_PORTDEFINITIONTYPE::nFrameHeight, OMX_IMAGE_PORTDEFINITIONTYPE::nFrameWidth, OMX_VIDEO_PORTDEFINITIONTYPE::nFrameWidth, OMX_PRIORITYMGMTTYPE::nGroupID, omx_base_component_PrivateType::nGroupID, OMX_PRIORITYMGMTTYPE::nGroupPriority, omx_base_component_PrivateType::nGroupPriority, OMX_PARAM_PORTDEFINITIONTYPE::nPortIndex, OMX_PORT_PARAM_TYPE::nPorts, OMX_IMAGE_PORTDEFINITIONTYPE::nStride, OMX_VIDEO_PORTDEFINITIONTYPE::nStride, omx_base_component_ParameterSanityCheck(), OMX_BufferSupplyInput, OMX_BufferSupplyOutput, OMX_BufferSupplyUnspecified, OMX_DirInput, OMX_DirOutput, OMX_ErrorBadParameter, OMX_ErrorBadPortIndex, OMX_ErrorIncorrectStateOperation, OMX_ErrorNone, OMX_ErrorUndefined, OMX_ErrorUnsupportedIndex, OMX_IndexParamAudioInit, OMX_IndexParamCompBufferSupplier, OMX_IndexParamImageInit, OMX_IndexParamOtherInit, OMX_IndexParamPortDefinition, OMX_IndexParamPriorityMgmt, OMX_IndexParamVideoInit, OMX_PortDomainAudio, OMX_PortDomainImage, OMX_PortDomainOther, OMX_PortDomainVideo, OMX_SetParameter, OMX_StateExecuting, OMX_StateIdle, OMX_StateLoaded, OMX_StatePause, OMX_StateWaitForResources, OMX_PARAM_PORTDEFINITIONTYPE::other, OMX_COMPONENTTYPE::pComponentPrivate, OMX_VIDEO_PORTDEFINITIONTYPE::pNativeRender, OMX_IMAGE_PORTDEFINITIONTYPE::pNativeWindow, OMX_VIDEO_PORTDEFINITIONTYPE::pNativeWindow, PORT_IS_BUFFER_SUPPLIER, PORT_IS_ENABLED, PORT_IS_TUNNELED, omx_base_component_PrivateType::ports, omx_base_PortType::sPortParam, omx_base_component_PrivateType::sPortTypesParam, omx_base_component_PrivateType::state, TUNNEL_IS_SUPPLIER, OMX_PARAM_PORTDEFINITIONTYPE::video, and OMX_VIDEO_PORTDEFINITIONTYPE::xFramerate.

Referenced by omx_alsasink_component_SetParameter(), omx_alsasrc_component_SetParameter(), omx_audio_mixer_component_SetParameter(), omx_audiodec_component_SetParameter(), omx_base_component_Constructor(), omx_fbdev_sink_component_SetParameter(), omx_ffmpeg_colorconv_component_SetParameter(), omx_filereader_component_SetParameter(), omx_maddec_component_SetParameter(), omx_parser3gp_component_SetParameter(), omx_symbianoutputstreamsink_component_SetParameter(), omx_videodec_component_SetParameter(), omx_videoenc_component_SetParameter(), omx_videosrc_component_SetParameter(), omx_volume_component_SetParameter(), and omx_vorbisdec_component_SetParameter().

OMX_ERRORTYPE omx_base_component_UseBuffer ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_INOUT OMX_BUFFERHEADERTYPE **  ppBufferHdr,
OMX_IN OMX_U32  nPortIndex,
OMX_IN OMX_PTR  pAppPrivate,
OMX_IN OMX_U32  nSizeBytes,
OMX_IN OMX_U8 pBuffer 
)

OMX_ERRORTYPE omx_base_component_UseEGLImage ( OMX_HANDLETYPE  hComponent,
OMX_BUFFERHEADERTYPE **  ppBufferHdr,
OMX_U32  nPortIndex,
OMX_PTR  pAppPrivate,
void *  eglImage 
)

Definition at line 1441 of file omx_base_component.c.

References OMX_ErrorNotImplemented.

Referenced by omx_base_component_Constructor().

void setHeader ( OMX_PTR  header,
OMX_U32  size 
)

Simply fills the first two fields in any OMX structure with the size and the version.

Parameters:
header pointer to the structure to be filled
size size of the structure. It can be obtained with a call to sizeof of the structure type

Definition at line 541 of file omx_base_component.c.

Referenced by audiodecEventHandler(), base_audio_port_Constructor(), base_port_AllocateBuffer(), base_port_ComponentTunnelRequest(), base_port_Constructor(), base_port_UseBuffer(), base_video_port_Constructor(), main(), omx_alsasink_component_Constructor(), omx_alsasrc_component_Constructor(), omx_audio_mixer_component_Constructor(), omx_audiodec_component_Constructor(), omx_audiodec_component_SetInternalParameters(), omx_base_component_Constructor(), omx_camera_source_component_Constructor(), omx_fbdev_sink_component_Constructor(), omx_fbdev_sink_component_GetConfig(), omx_ffmpeg_colorconv_component_Constructor(), omx_filereader_component_Constructor(), omx_maddec_component_Constructor(), omx_maddec_component_SetInternalParameters(), omx_parser3gp_component_Constructor(), omx_symbianoutputstreamsink_component_Constructor(), omx_symbianoutputstreamsink_component_GetParameter(), omx_volume_component_GetConfig(), omx_vorbisdec_component_Constructor(), omx_vorbisdec_component_SetInternalParameters(), setCameraParameters(), setColorConvParameters(), setFbsinkParameters(), SetInternalVideoEncParameters(), SetInternalVideoParameters(), setPortParameters(), SetPortParametersAudio(), SetPortParametersVideo(), videodecEventHandler(), and videosrc_port_AllocateBuffer().


Generated for OpenMAX Bellagio rel. 0.3.5-svn by  doxygen 1.5.1
SourceForge.net Logo