OpenMAX Bellagio 0.9.3
omx_base_component.h File Reference
#include <stdlib.h>
#include <pthread.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <asm/unistd.h>
#include "omxcore.h"
#include "OMXComponentRMExt.h"
#include "tsemaphore.h"
#include "queue.h"
#include "omx_classmagic.h"
#include "omx_base_port.h"
#include "extension_struct.h"
#include "omx_reference_resource_manager.h"

Go to the source code of this file.

Data Structures

struct  OMX_VENDOR_EXTRADATATYPE
 
struct  OMX_VENDOR_PROP_TUNNELSETUPTYPE
 
struct  internalRequestMessageType
 The container of an internal message. More...
 
struct  omx_base_component_PrivateType
 

Macros

#define OSCL_IMPORT_REF
 
#define OSCL_EXPORT_REF
 
#define DEFAULT_IN_BUFFER_SIZE   4 * 1024
 
#define DEFAULT_OUT_BUFFER_SIZE   32 * 1024 /*16 * 1024 */
 
#define DEFAULT_MIME_STRING_LENGTH   128
 
#define NUM_DOMAINS   4
 
#define OMX_BUFFERFLAG_KEY_FRAME   0x11000000
 
#define omx_base_component_PrivateType_FIELDS
 

Typedefs

typedef struct OMX_VENDOR_EXTRADATATYPE OMX_VENDOR_EXTRADATATYPE
 
typedef struct OMX_VENDOR_PROP_TUNNELSETUPTYPE OMX_VENDOR_PROP_TUNNELSETUPTYPE
 
typedef enum OMX_INDEXVENDORTYPE OMX_INDEXVENDORTYPE
 
typedef enum OMX_TRANS_STATETYPE OMX_TRANS_STATETYPE
 
typedef enum INTERNAL_MESSAGE_TYPE INTERNAL_MESSAGE_TYPE
 Enumerates all the possible types of messages handled internally by the component.
 
typedef struct internalRequestMessageType internalRequestMessageType
 The container of an internal message.
 
typedef struct omx_base_component_PrivateType omx_base_component_PrivateType
 the base descriptor for a ST component
 

Enumerations

enum  OMX_INDEXVENDORTYPE {
  OMX_IndexVendorInputFilename = OMX_IndexVendorStartUnused+1 , OMX_IndexVendorOutputFilename , OMX_IndexVendorCompPropTunnelFlags , OMX_IndexParameterThreadsID ,
  OMX_VIDEO_CodingTheora
}
 
enum  OMX_TRANS_STATETYPE {
  OMX_TransStateInvalid , OMX_TransStateLoadedToIdle , OMX_TransStateIdleToPause , OMX_TransStatePauseToExecuting ,
  OMX_TransStateIdleToExecuting , OMX_TransStateExecutingToIdle , OMX_TransStateExecutingToPause , OMX_TransStatePauseToIdle ,
  OMX_TransStateIdleToLoaded , OMX_TransStateMax = 0X7FFFFFFF
}
 
enum  INTERNAL_MESSAGE_TYPE { SENDCOMMAND_MSG_TYPE = 1 , ERROR_MSG_TYPE , WARNING_MSG_TYPE }
 Enumerates all the possible types of messages handled internally by the component. More...
 

Functions

void base_constructor_remove_garbage_collected (omx_base_component_PrivateType *omx_base_component_Private)
 
OMX_ERRORTYPE omx_base_component_Constructor (OMX_COMPONENTTYPE *openmaxStandComp, OMX_STRING cComponentName)
 The base constructor 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_getQualityLevel (OMX_COMPONENTTYPE *openmaxStandComp, OMX_U32 *pQualityLevel)
 
OMX_ERRORTYPE omx_base_setQualityLevel (OMX_COMPONENTTYPE *openmaxStandComp, OMX_U32 nQualityLevel)
 
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_GetComponentVersion (OMX_HANDLETYPE hComponent, OMX_STRING pComponentName, OMX_VERSIONTYPE *pComponentVersion, OMX_VERSIONTYPE *pSpecVersion, OMX_UUIDTYPE *pComponentUUID)
 standard openmax function
 
OMX_ERRORTYPE omx_base_component_ComponentRoleEnum (OMX_HANDLETYPE hComponent, OMX_U8 *cRole, OMX_U32 nIndex)
 Enumerates all the role of the component.
 
OMX_ERRORTYPE omx_base_component_SetCallbacks (OMX_HANDLETYPE hComponent, OMX_CALLBACKTYPE *pCallbacks, OMX_PTR pAppData)
 standard OpenMAX function
 
OMX_ERRORTYPE omx_base_component_GetParameter (OMX_HANDLETYPE hComponent, OMX_INDEXTYPE nParamIndex, OMX_PTR ComponentParameterStructure)
 Part of the standard OpenMAX function.
 
OMX_ERRORTYPE omx_base_component_SetParameter (OMX_HANDLETYPE hComponent, OMX_INDEXTYPE nParamIndex, OMX_PTR ComponentParameterStructure)
 part of the standard openmax function
 
OMX_ERRORTYPE omx_base_component_GetConfig (OMX_HANDLETYPE hComponent, OMX_INDEXTYPE nIndex, OMX_PTR pComponentConfigStructure)
 base GetConfig function
 
OMX_ERRORTYPE omx_base_component_SetConfig (OMX_HANDLETYPE hComponent, OMX_INDEXTYPE nIndex, OMX_PTR pComponentConfigStructure)
 base SetConfig function
 
OMX_ERRORTYPE omx_base_component_GetExtensionIndex (OMX_HANDLETYPE hComponent, OMX_STRING cParameterName, OMX_INDEXTYPE *pIndexType)
 base function not implemented
 
OMX_ERRORTYPE omx_base_component_GetState (OMX_HANDLETYPE hComponent, OMX_STATETYPE *pState)
 
OMX_ERRORTYPE omx_base_component_SendCommand (OMX_HANDLETYPE hComponent, OMX_COMMANDTYPE Cmd, OMX_U32 nParam, OMX_PTR pCmdData)
 standard SendCommand function
 
OMX_ERRORTYPE omx_base_component_ComponentDeInit (OMX_HANDLETYPE hComponent)
 This standard functionality is called when the component is destroyed in the FreeHandle standard call.
 
void * compMessageHandlerFunction (void *)
 Component's message handler thread function.
 
OMX_ERRORTYPE omx_base_component_MessageHandler (OMX_COMPONENTTYPE *openmaxStandComp, internalRequestMessageType *message)
 
OMX_ERRORTYPE omx_base_component_ParameterSanityCheck (OMX_HANDLETYPE hComponent, OMX_U32 nPortIndex, OMX_PTR pStructure, size_t size)
 
OMX_ERRORTYPE omx_base_component_AllocateBuffer (OMX_HANDLETYPE hComponent, OMX_BUFFERHEADERTYPE **ppBuffer, OMX_U32 nPortIndex, OMX_PTR pAppPrivate, OMX_U32 nSizeBytes)
 
OMX_ERRORTYPE omx_base_component_UseBuffer (OMX_HANDLETYPE hComponent, OMX_BUFFERHEADERTYPE **ppBufferHdr, OMX_U32 nPortIndex, OMX_PTR pAppPrivate, OMX_U32 nSizeBytes, 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_HANDLETYPE hComponent, OMX_U32 nPortIndex, OMX_BUFFERHEADERTYPE *pBuffer)
 
OMX_ERRORTYPE omx_base_component_EmptyThisBuffer (OMX_HANDLETYPE hComponent, OMX_BUFFERHEADERTYPE *pBuffer)
 
OMX_ERRORTYPE omx_base_component_FillThisBuffer (OMX_HANDLETYPE hComponent, OMX_BUFFERHEADERTYPE *pBuffer)
 
OMX_ERRORTYPE omx_base_component_ComponentTunnelRequest (OMX_HANDLETYPE hComp, OMX_U32 nPort, OMX_HANDLETYPE hTunneledComp, OMX_U32 nTunneledPort, OMX_TUNNELSETUPTYPE *pTunnelSetup)
 

Macro Definition Documentation

◆ DEFAULT_IN_BUFFER_SIZE

#define DEFAULT_IN_BUFFER_SIZE   4 * 1024

Default size of the internal input buffer

Definition at line 54 of file omx_base_component.h.

Referenced by base_audio_port_Constructor(), base_image_port_Constructor(), and base_video_port_Constructor().

◆ DEFAULT_MIME_STRING_LENGTH

#define DEFAULT_MIME_STRING_LENGTH   128

Default MIME string length

Definition at line 58 of file omx_base_component.h.

Referenced by base_audio_port_Constructor(), base_image_port_Constructor(), and base_video_port_Constructor().

◆ DEFAULT_OUT_BUFFER_SIZE

#define DEFAULT_OUT_BUFFER_SIZE   32 * 1024 /*16 * 1024 */

◆ NUM_DOMAINS

◆ omx_base_component_PrivateType_FIELDS

#define omx_base_component_PrivateType_FIELDS

Definition at line 123 of file omx_base_component.h.

◆ OMX_BUFFERFLAG_KEY_FRAME

#define OMX_BUFFERFLAG_KEY_FRAME   0x11000000

Definition at line 62 of file omx_base_component.h.

◆ OSCL_EXPORT_REF

#define OSCL_EXPORT_REF

Definition at line 41 of file omx_base_component.h.

◆ OSCL_IMPORT_REF

#define OSCL_IMPORT_REF

src/base/omx_base_component.h

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

Copyright (C) 2007-2009 STMicroelectronics Copyright (C) 2007-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 40 of file omx_base_component.h.

Typedef Documentation

◆ INTERNAL_MESSAGE_TYPE

Enumerates all the possible types of messages handled internally by the component.

◆ internalRequestMessageType

typedef struct internalRequestMessageType internalRequestMessageType

The container of an internal message.

This structure contains a generic OpenMAX request (from send command). It is processed by the internal message handler thread

◆ omx_base_component_PrivateType

typedef struct omx_base_component_PrivateType omx_base_component_PrivateType

the base descriptor for a ST component

Definition at line 122 of file omx_base_component.h.

◆ OMX_INDEXVENDORTYPE

this is the list of custom vendor index

◆ OMX_TRANS_STATETYPE

This enum defines the transition states of the Component

◆ OMX_VENDOR_EXTRADATATYPE

typedef struct OMX_VENDOR_EXTRADATATYPE OMX_VENDOR_EXTRADATATYPE

◆ OMX_VENDOR_PROP_TUNNELSETUPTYPE

typedef struct OMX_VENDOR_PROP_TUNNELSETUPTYPE OMX_VENDOR_PROP_TUNNELSETUPTYPE

Enumeration Type Documentation

◆ INTERNAL_MESSAGE_TYPE

Enumerates all the possible types of messages handled internally by the component.

Enumerator
SENDCOMMAND_MSG_TYPE 

this flag specifies that the message send is a command

ERROR_MSG_TYPE 

this flag specifies that the message send is an error message

WARNING_MSG_TYPE 

this flag specifies that the message send is a warning message

Definition at line 102 of file omx_base_component.h.

◆ OMX_INDEXVENDORTYPE

this is the list of custom vendor index

Enumerator
OMX_IndexVendorInputFilename 

only one index for file reader component input file

OMX_IndexVendorOutputFilename 
OMX_IndexVendorCompPropTunnelFlags 
OMX_IndexParameterThreadsID 
OMX_VIDEO_CodingTheora 

Definition at line 76 of file omx_base_component.h.

◆ OMX_TRANS_STATETYPE

This enum defines the transition states of the Component

Enumerator
OMX_TransStateInvalid 
OMX_TransStateLoadedToIdle 
OMX_TransStateIdleToPause 
OMX_TransStatePauseToExecuting 
OMX_TransStateIdleToExecuting 
OMX_TransStateExecutingToIdle 
OMX_TransStateExecutingToPause 
OMX_TransStatePauseToIdle 
OMX_TransStateIdleToLoaded 
OMX_TransStateMax 

Definition at line 86 of file omx_base_component.h.

Function Documentation

◆ base_constructor_remove_garbage_collected()

void base_constructor_remove_garbage_collected ( omx_base_component_PrivateType * omx_base_component_Private)

src/base/omx_base_component.c

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-2009 STMicroelectronics Copyright (C) 2007-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 This function releases all the resources allocated by the base constructor if something fails. It checks if any item has been already allocated/configured

Definition at line 44 of file omx_base_component.c.

References omx_base_component_PrivateType::bellagioThreads, omx_base_component_PrivateType::bMgmtSem, omx_base_component_PrivateType::bStateSem, omx_base_component_PrivateType::flush_all_condition, omx_base_component_PrivateType::flush_condition, omx_base_component_PrivateType::messageQueue, omx_base_component_PrivateType::messageSem, omx_base_component_PrivateType::name, queue_deinit(), and tsem_deinit().

Referenced by omx_base_component_Constructor().

◆ checkHeader()

OMX_ERRORTYPE checkHeader ( OMX_PTR header,
OMX_U32 size )

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

Parameters
headerPointer to the structure to be checked
sizeSize 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 720 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_clock_port_SendBufferFunction(), base_port_SendBufferFunction(), omx_audio_mixer_component_GetParameter(), omx_audio_mixer_component_SetParameter(), omx_base_component_GetParameter(), omx_base_component_ParameterSanityCheck(), omx_base_component_SetParameter(), omx_clocksrc_component_GetParameter(), omx_clocksrc_component_SetParameter(), omx_video_scheduler_component_GetParameter(), omx_video_scheduler_component_port_SendBufferFunction(), omx_video_scheduler_component_SetParameter(), omx_volume_component_GetParameter(), and omx_volume_component_SetParameter().

◆ compMessageHandlerFunction()

void * compMessageHandlerFunction ( void * param)

◆ omx_base_component_AllocateBuffer()

◆ omx_base_component_ComponentDeInit()

OMX_ERRORTYPE omx_base_component_ComponentDeInit ( 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 implementation of the ComponentDeInit contains the implementation specific part of the destroying phase.

Definition at line 346 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_base_component_ComponentRoleEnum()

OMX_ERRORTYPE omx_base_component_ComponentRoleEnum ( OMX_HANDLETYPE hComponent,
OMX_U8 * cRole,
OMX_U32 nIndex )

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.

Parameters
hComponenthandle of the component
cRolethe output string containing the n-role of the component
nIndexthe index of the role requested

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 844 of file omx_base_component.c.

References OMX_ErrorNoMore.

Referenced by omx_base_component_Constructor().

◆ omx_base_component_ComponentTunnelRequest()

◆ omx_base_component_Constructor()

OMX_ERRORTYPE omx_base_component_Constructor ( OMX_COMPONENTTYPE * openmaxStandComp,
OMX_STRING cComponentName )

The base constructor 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. 2) Allocates (if needed) the omx_base_component_PrivateType private structure

Parameters
openmaxStandCompthe ST component to be initialized
cComponentNamethe OpenMAX string that describes the component
Returns
OMX_ErrorInsufficientResources if a memory allocation fails

Definition at line 95 of file omx_base_component.c.

References OMX_COMPONENTTYPE::AllocateBuffer, base_constructor_remove_garbage_collected(), omx_base_component_PrivateType::bellagioThreads, omx_base_component_PrivateType::bIsEOSReached, omx_base_component_PrivateType::bMgmtSem, omx_base_component_PrivateType::bStateSem, omx_base_component_PrivateType::bufferMgmtThreadID, omx_base_component_PrivateType::callbackData, omx_base_component_PrivateType::callbacks, compMessageHandlerFunction(), OMX_COMPONENTTYPE::ComponentDeInit, OMX_COMPONENTTYPE::ComponentRoleEnum, OMX_COMPONENTTYPE::ComponentTunnelRequest, omx_base_component_PrivateType::currentQualityLevel, DEB_LEV_FUNCTION_NAME, DEBUG, omx_base_component_PrivateType::destructor, omx_base_component_PrivateType::DoStateSet, OMX_COMPONENTTYPE::EmptyThisBuffer, err, 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_base_component_PrivateType::getQualityLevel, OMX_COMPONENTTYPE::GetState, OMX_MARKTYPE::hMarkTargetComponent, omx_base_component_PrivateType::messageHandler, omx_base_component_PrivateType::messageHandlerThread, 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_base_component_PrivateType::nqualitylevels, OMX_VERSIONTYPE::nRevision, OMX_COMPONENTTYPE::nSize, OMX_VERSIONTYPE::nStep, OMX_PARAM_BELLAGIOTHREADS_ID::nThreadBufferMngtID, OMX_PARAM_BELLAGIOTHREADS_ID::nThreadMessageID, NUM_DOMAINS, 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_base_getQualityLevel(), omx_base_setQualityLevel(), OMX_ErrorInsufficientResources, OMX_ErrorNone, OMX_FALSE, OMX_MAX_STRINGNAME_SIZE, OMX_StateLoaded, OMX_TransStateMax, omx_base_component_PrivateType::openmaxStandComp, OMX_COMPONENTTYPE::pApplicationPrivate, OMX_COMPONENTTYPE::pComponentPrivate, omx_base_component_PrivateType::pMark, OMX_MARKTYPE::pMarkData, queue_init(), OMX_VERSIONTYPE::s, OMX_COMPONENTTYPE::SendCommand, OMX_COMPONENTTYPE::SetCallbacks, OMX_COMPONENTTYPE::SetConfig, setHeader(), OMX_COMPONENTTYPE::SetParameter, omx_base_component_PrivateType::setQualityLevel, 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_base_component_Destructor()

OMX_ERRORTYPE omx_base_component_Destructor ( OMX_COMPONENTTYPE * openmaxStandComp)

the base destructor for ST OpenMAX components

This function is called by the standard function ComponentDeInit() that is called by the IL core during the execution of the FreeHandle()

Parameters
openmaxStandCompthe ST OpenMAX component to be disposed

the base destructor for ST OpenMAX components

This function is called by the standard function ComponentDeInit() that is called by the IL core during the execution of the FreeHandle()

Parameters
openmaxStandCompthe ST OpenMAX component to be disposed

Definition at line 271 of file omx_base_component.c.

References omx_base_component_PrivateType::bMgmtSem, omx_base_component_PrivateType::bStateSem, omx_base_component_PrivateType::callbacks, DEB_LEV_FUNCTION_NAME, DEBUG, err, omx_base_component_PrivateType::flush_all_condition, omx_base_component_PrivateType::flush_condition, omx_base_component_PrivateType::flush_mutex, omx_base_component_PrivateType::messageHandlerThread, omx_base_component_PrivateType::messageQueue, omx_base_component_PrivateType::messageSem, omx_base_component_PrivateType::name, OMX_ErrorNone, OMX_StateInvalid, OMX_COMPONENTTYPE::pComponentPrivate, queue_deinit(), omx_base_component_PrivateType::state, tsem_deinit(), and tsem_up().

Referenced by omx_base_component_Constructor(), omx_base_filter_Destructor(), omx_base_sink_Destructor(), and omx_base_source_Destructor().

◆ omx_base_component_DoStateSet()

OMX_ERRORTYPE omx_base_component_DoStateSet ( OMX_COMPONENTTYPE * openmaxStandComp,
OMX_U32 destinationState )

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

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

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

Parameters
openmaxStandCompthe OpenMAX component which state is to be changed
destinationStatethe requested target state
Returns
OMX_ErrorNotImplemented if the state change is not 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 370 of file omx_base_component.c.

References omx_base_PortType::bBufferStateAllocated, OMX_PARAM_PORTDEFINITIONTYPE::bEnabled, omx_base_PortType::bIsDestroying, omx_base_component_PrivateType::bIsEOSReached, omx_base_component_PrivateType::bMgmtSem, OMX_PARAM_PORTDEFINITIONTYPE::bPopulated, 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::exitMutex, omx_base_PortType::FlushProcessingBuffers, omx_base_component_PrivateType::name, OMX_PARAM_PORTDEFINITIONTYPE::nBufferCountActual, queue_t::nelem, omx_base_PortType::nNumTunnelBuffer, OMX_PORT_PARAM_TYPE::nPorts, OMX_PORT_PARAM_TYPE::nStartPortNumber, omx_base_PortType::nTunnelFlags, NUM_DOMAINS, OMX_ErrorIncorrectStateTransition, OMX_ErrorInsufficientResources, OMX_ErrorInvalidState, OMX_ErrorNone, OMX_ErrorSameState, OMX_ErrorUndefined, OMX_FALSE, OMX_StateExecuting, OMX_StateIdle, OMX_StateInvalid, OMX_StateLoaded, OMX_StatePause, OMX_StateWaitForResources, OMX_TransStateMax, OMX_TRUE, omx_base_PortType::pAllocSem, omx_base_PortType::pBufferQueue, omx_base_PortType::pBufferSem, OMX_COMPONENTTYPE::pComponentPrivate, omx_base_PortType::pInternalBufferStorage, omx_base_PortType::Port_AllocateTunnelBuffer, omx_base_PortType::Port_FreeTunnelBuffer, PORT_IS_BUFFER_SUPPLIER, PORT_IS_ENABLED, PORT_IS_TUNNELED, PORT_IS_TUNNELED_N_BUFFER_SUPPLIER, omx_base_component_PrivateType::ports, RM_getResource(), RM_releaseResource(), RM_removeFromWaitForResource(), RM_waitForResource(), tsem_t::semval, 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_base_component_EmptyThisBuffer()

◆ omx_base_component_FillThisBuffer()

◆ omx_base_component_FreeBuffer()

◆ omx_base_component_GetComponentVersion()

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

◆ omx_base_component_GetConfig()

OMX_ERRORTYPE omx_base_component_GetConfig ( OMX_HANDLETYPE hComponent,
OMX_INDEXTYPE nIndex,
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.

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 1232 of file omx_base_component.c.

References OMX_ErrorNone.

Referenced by omx_audio_mixer_component_GetConfig(), omx_base_component_Constructor(), and omx_volume_component_GetConfig().

◆ omx_base_component_GetExtensionIndex()

OMX_ERRORTYPE omx_base_component_GetExtensionIndex ( OMX_HANDLETYPE hComponent,
OMX_STRING cParameterName,
OMX_INDEXTYPE * pIndexType )

base function not implemented

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

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

Definition at line 1258 of file omx_base_component.c.

References DEB_LEV_FUNCTION_NAME, DEBUG, OMX_ErrorBadParameter, OMX_ErrorNone, and OMX_IndexParameterThreadsID.

Referenced by omx_base_component_Constructor().

◆ omx_base_component_GetParameter()

OMX_ERRORTYPE omx_base_component_GetParameter ( OMX_HANDLETYPE hComponent,
OMX_INDEXTYPE nParamIndex,
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.

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 896 of file omx_base_component.c.

References omx_base_component_PrivateType::bellagioThreads, checkHeader(), DEB_LEV_ERR, DEB_LEV_FUNCTION_NAME, DEB_LEV_PARAMS, DEBUG, OMX_PARAM_BUFFERSUPPLIERTYPE::eBufferSupplier, omx_base_PortType::eBufferSupplier, OMX_PARAM_PORTDEFINITIONTYPE::eDir, err, OMX_TUNNELSETUPTYPE::eSupplier, OMX_PRIORITYMGMTTYPE::nGroupID, omx_base_component_PrivateType::nGroupID, OMX_PRIORITYMGMTTYPE::nGroupPriority, omx_base_component_PrivateType::nGroupPriority, OMX_PARAM_PORTDEFINITIONTYPE::nPortIndex, OMX_PARAM_BUFFERSUPPLIERTYPE::nPortIndex, OMX_VENDOR_PROP_TUNNELSETUPTYPE::nPortIndex, OMX_PORT_PARAM_TYPE::nPorts, OMX_PORT_PARAM_TYPE::nStartPortNumber, OMX_PARAM_BELLAGIOTHREADS_ID::nThreadBufferMngtID, OMX_PARAM_BELLAGIOTHREADS_ID::nThreadMessageID, OMX_TUNNELSETUPTYPE::nTunnelFlags, omx_base_PortType::nTunnelFlags, OMX_VENDOR_PROP_TUNNELSETUPTYPE::nTunnelSetup, OMX_BufferSupplyInput, OMX_BufferSupplyOutput, OMX_BufferSupplyUnspecified, OMX_DirInput, OMX_ErrorBadParameter, OMX_ErrorBadPortIndex, OMX_ErrorNone, OMX_ErrorUnsupportedIndex, OMX_IndexParamAudioInit, OMX_IndexParamCompBufferSupplier, OMX_IndexParameterThreadsID, OMX_IndexParamImageInit, OMX_IndexParamOtherInit, OMX_IndexParamPortDefinition, OMX_IndexParamPriorityMgmt, OMX_IndexParamVideoInit, OMX_IndexVendorCompPropTunnelFlags, OMX_PortDomainAudio, OMX_PortDomainImage, OMX_PortDomainOther, OMX_PortDomainVideo, 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_audio_mixer_component_GetParameter(), omx_base_component_Constructor(), omx_clocksrc_component_GetParameter(), omx_video_scheduler_component_GetParameter(), and omx_volume_component_GetParameter().

◆ omx_base_component_GetState()

OMX_ERRORTYPE omx_base_component_GetState ( OMX_HANDLETYPE hComponent,
OMX_STATETYPE * pState )
Returns
the state of the component

This function does not need any override by derived components.

Returns
the state of the component

This function does not need any override by derived components

Definition at line 1277 of file omx_base_component.c.

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

Referenced by omx_base_component_Constructor().

◆ omx_base_component_MessageHandler()

OMX_ERRORTYPE omx_base_component_MessageHandler ( OMX_COMPONENTTYPE * openmaxStandComp,
internalRequestMessageType * message )

This is called by the component message entry point. In the 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
openmaxStandCompthe component itself
messagethe message that has been passed to core

This is called by the component message entry point. In this 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
openmaxStandCompthe component itself
messagethe 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 1492 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, OMX_MARKTYPE::hMarkTargetComponent, internalRequestMessageType::messageParam, internalRequestMessageType::messageType, omx_base_component_PrivateType::name, OMX_PARAM_PORTDEFINITIONTYPE::nBufferCountActual, omx_base_PortType::nNumTunnelBuffer, OMX_PORT_PARAM_TYPE::nPorts, OMX_PORT_PARAM_TYPE::nStartPortNumber, NUM_DOMAINS, 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_MARKTYPE::pMarkData, 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_base_component_Constructor().

◆ omx_base_component_ParameterSanityCheck()

◆ omx_base_component_SendCommand()

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

standard SendCommand function

In general this function does not need a overwrite, but a special derived component could do it.

Fill in the message

Definition at line 1293 of file omx_base_component.c.

References omx_base_PortType::bBufferStateAllocated, omx_base_PortType::bIsTransientToDisabled, omx_base_PortType::bIsTransientToEnabled, BUFFER_FREE, DEB_LEV_FUNCTION_NAME, DEBUG, err, internalRequestMessageType::messageParam, omx_base_component_PrivateType::messageQueue, omx_base_component_PrivateType::messageSem, internalRequestMessageType::messageType, OMX_PARAM_PORTDEFINITIONTYPE::nBufferCountActual, OMX_PORT_PARAM_TYPE::nPorts, OMX_PORT_PARAM_TYPE::nStartPortNumber, NUM_DOMAINS, OMX_ALL, OMX_CommandFlush, OMX_CommandMarkBuffer, OMX_CommandPortDisable, OMX_CommandPortEnable, OMX_CommandStateSet, OMX_ErrorBadPortIndex, OMX_ErrorInsufficientResources, OMX_ErrorInvalidState, OMX_ErrorNone, OMX_ErrorUnsupportedIndex, OMX_PortDomainAudio, OMX_PortDomainImage, OMX_PortDomainOther, OMX_PortDomainVideo, OMX_StateExecuting, OMX_StateIdle, OMX_StateInvalid, OMX_StateLoaded, OMX_StatePause, OMX_TransStateExecutingToIdle, OMX_TransStateIdleToLoaded, OMX_TransStateLoadedToIdle, OMX_TransStatePauseToIdle, OMX_TRUE, internalRequestMessageType::pCmdData, OMX_COMPONENTTYPE::pComponentPrivate, omx_base_PortType::pInternalBufferStorage, omx_base_component_PrivateType::ports, queue(), omx_base_PortType::sPortParam, omx_base_component_PrivateType::sPortTypesParam, omx_base_component_PrivateType::state, omx_base_component_PrivateType::transientState, and tsem_up().

Referenced by omx_base_component_Constructor(), and omx_clocksrc_component_SendCommand().

◆ omx_base_component_SetCallbacks()

◆ omx_base_component_SetConfig()

OMX_ERRORTYPE omx_base_component_SetConfig ( OMX_HANDLETYPE hComponent,
OMX_INDEXTYPE nIndex,
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.

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 1246 of file omx_base_component.c.

References OMX_ErrorNone.

Referenced by omx_audio_mixer_component_SetConfig(), omx_base_component_Constructor(), and omx_volume_component_SetConfig().

◆ omx_base_component_SetParameter()

OMX_ERRORTYPE omx_base_component_SetParameter ( OMX_HANDLETYPE hComponent,
OMX_INDEXTYPE nParamIndex,
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

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 1030 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, DEBUG, OMX_PARAM_BUFFERSUPPLIERTYPE::eBufferSupplier, OMX_IMAGE_PORTDEFINITIONTYPE::eColorFormat, OMX_VIDEO_PORTDEFINITIONTYPE::eColorFormat, OMX_IMAGE_PORTDEFINITIONTYPE::eCompressionFormat, OMX_VIDEO_PORTDEFINITIONTYPE::eCompressionFormat, OMX_PARAM_PORTDEFINITIONTYPE::eDir, OMX_PARAM_PORTDEFINITIONTYPE::eDomain, err, OMX_PARAM_PORTDEFINITIONTYPE::format, omx_base_PortType::hTunneledComponent, 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_PARAM_BUFFERSUPPLIERTYPE::nPortIndex, OMX_PORT_PARAM_TYPE::nPorts, OMX_IMAGE_PORTDEFINITIONTYPE::nStride, OMX_VIDEO_PORTDEFINITIONTYPE::nStride, omx_base_PortType::nTunneledPort, omx_base_PortType::nTunnelFlags, 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_base_PortType::pInternalBufferStorage, 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_audio_mixer_component_SetParameter(), omx_base_component_Constructor(), omx_clocksrc_component_SetParameter(), omx_video_scheduler_component_SetParameter(), and omx_volume_component_SetParameter().

◆ omx_base_component_UseBuffer()

◆ omx_base_component_UseEGLImage()

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

Definition at line 1833 of file omx_base_component.c.

References OMX_ErrorNotImplemented.

Referenced by omx_base_component_Constructor().

◆ omx_base_getQualityLevel()

◆ omx_base_setQualityLevel()

◆ setHeader()


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