OpenMAXBellagio
0.9.3
|
#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... | |
#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().
#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().
#define DEFAULT_OUT_BUFFER_SIZE 32 * 1024 /*16 * 1024 */ |
Default size of the internal output buffer
Definition at line 56 of file omx_base_component.h.
Referenced by base_audio_port_Constructor(), base_image_port_Constructor(), omx_audio_mixer_component_Constructor(), and omx_volume_component_Constructor().
#define NUM_DOMAINS 4 |
Definition at line 60 of file omx_base_component.h.
Referenced by omx_base_component_Constructor(), omx_base_component_DoStateSet(), omx_base_component_MessageHandler(), omx_base_component_SendCommand(), and omx_base_component_SetCallbacks().
#define omx_base_component_PrivateType_FIELDS |
Definition at line 123 of file omx_base_component.h.
#define OMX_BUFFERFLAG_KEY_FRAME 0x11000000 |
Definition at line 62 of file omx_base_component.h.
#define OSCL_EXPORT_REF |
Definition at line 41 of file omx_base_component.h.
#define OSCL_IMPORT_REF |
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 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.
This structure contains a generic OpenMAX request (from send command). It is processed by the internal message handler thread
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.
typedef enum OMX_INDEXVENDORTYPE OMX_INDEXVENDORTYPE |
this is the list of custom vendor index
typedef enum OMX_TRANS_STATETYPE OMX_TRANS_STATETYPE |
This enum defines the transition states of the Component
typedef struct OMX_VENDOR_EXTRADATATYPE OMX_VENDOR_EXTRADATATYPE |
typedef struct OMX_VENDOR_PROP_TUNNELSETUPTYPE OMX_VENDOR_PROP_TUNNELSETUPTYPE |
Enumerates all the possible types of messages handled internally by the component.
Definition at line 102 of file omx_base_component.h.
enum OMX_INDEXVENDORTYPE |
this is the list of custom vendor index
Definition at line 76 of file omx_base_component.h.
enum OMX_TRANS_STATETYPE |
This enum defines the transition states of the Component
Definition at line 86 of file omx_base_component.h.
void base_constructor_remove_garbage_collected | ( | omx_base_component_PrivateType * | omx_base_component_Private | ) |
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().
OMX_ERRORTYPE checkHeader | ( | OMX_PTR | header, |
OMX_U32 | size | ||
) |
Checks the header of a structure for consistency with size and spec version.
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 |
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().
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 1438 of file omx_base_component.c.
References omx_base_component_PrivateType::bellagioThreads, DEB_LEV_ERR, DEB_LEV_FUNCTION_NAME, DEB_LEV_SIMPLE_SEQ, DEBUG, dequeue(), omx_base_component_PrivateType::messageHandler, omx_base_component_PrivateType::messageQueue, omx_base_component_PrivateType::messageSem, OMX_PARAM_BELLAGIOTHREADS_ID::nThreadMessageID, 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_HANDLETYPE | hComponent, |
OMX_BUFFERHEADERTYPE ** | ppBuffer, | ||
OMX_U32 | nPortIndex, | ||
OMX_PTR | pAppPrivate, | ||
OMX_U32 | nSizeBytes | ||
) |
Definition at line 1771 of file omx_base_component.c.
References DEB_LEV_ERR, DEB_LEV_FUNCTION_NAME, DEBUG, err, OMX_PORT_PARAM_TYPE::nPorts, OMX_ErrorBadPortIndex, OMX_ErrorNone, OMX_PortDomainAudio, OMX_PortDomainImage, OMX_PortDomainOther, OMX_PortDomainVideo, omx_base_PortType::Port_AllocateBuffer, omx_base_component_PrivateType::ports, and omx_base_component_PrivateType::sPortTypesParam.
Referenced by omx_base_component_Constructor().
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_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.
hComponent | handle of the component |
cRole | the output string containing the n-role of the component |
nIndex | the 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_ERRORTYPE omx_base_component_ComponentTunnelRequest | ( | OMX_HANDLETYPE | hComp, |
OMX_U32 | nPort, | ||
OMX_HANDLETYPE | hTunneledComp, | ||
OMX_U32 | nTunneledPort, | ||
OMX_TUNNELSETUPTYPE * | pTunnelSetup | ||
) |
Definition at line 1926 of file omx_base_component.c.
References omx_base_PortType::ComponentTunnelRequest, DEB_LEV_ERR, DEB_LEV_FUNCTION_NAME, DEBUG, err, OMX_PORT_PARAM_TYPE::nPorts, OMX_ErrorBadPortIndex, OMX_ErrorNone, OMX_PortDomainAudio, OMX_PortDomainImage, OMX_PortDomainOther, OMX_PortDomainVideo, omx_base_component_PrivateType::ports, and omx_base_component_PrivateType::sPortTypesParam.
Referenced by 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
openmaxStandComp | the ST component to be initialized |
cComponentName | the OpenMAX string that describes the component |
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_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()
openmaxStandComp | the 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()
openmaxStandComp | the 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_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
openmaxStandComp | the OpenMAX component which state is to be changed |
destinationState | the requested target state |
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
openmaxStandComp | the OpenMAX component which state is to be changed |
destinationState | the requested target state |
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_component_PrivateType::bIsEOSReached, 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_PORT_PARAM_TYPE::nPorts, OMX_PORT_PARAM_TYPE::nStartPortNumber, 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_COMPONENTTYPE::pComponentPrivate, 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(), 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_HANDLETYPE | hComponent, |
OMX_BUFFERHEADERTYPE * | pBuffer | ||
) |
Definition at line 1865 of file omx_base_component.c.
References DEB_LEV_ERR, DEB_LEV_FUNCTION_NAME, DEBUG, OMX_PARAM_PORTDEFINITIONTYPE::eDir, err, errorName(), omx_base_component_PrivateType::name, OMX_BUFFERHEADERTYPE::nInputPortIndex, OMX_PORT_PARAM_TYPE::nPorts, OMX_DirInput, OMX_ErrorBadPortIndex, OMX_ErrorNone, OMX_PortDomainAudio, OMX_PortDomainImage, OMX_PortDomainOther, OMX_PortDomainVideo, omx_base_PortType::Port_SendBufferFunction, omx_base_component_PrivateType::ports, omx_base_PortType::sPortParam, and omx_base_component_PrivateType::sPortTypesParam.
Referenced by omx_base_component_Constructor().
OMX_ERRORTYPE omx_base_component_FillThisBuffer | ( | OMX_HANDLETYPE | hComponent, |
OMX_BUFFERHEADERTYPE * | pBuffer | ||
) |
Definition at line 1895 of file omx_base_component.c.
References DEB_LEV_ERR, DEB_LEV_FUNCTION_NAME, DEBUG, OMX_PARAM_PORTDEFINITIONTYPE::eDir, err, errorName(), omx_base_component_PrivateType::name, OMX_BUFFERHEADERTYPE::nOutputPortIndex, OMX_PORT_PARAM_TYPE::nPorts, OMX_DirOutput, OMX_ErrorBadPortIndex, OMX_ErrorNone, OMX_PortDomainAudio, OMX_PortDomainImage, OMX_PortDomainOther, OMX_PortDomainVideo, omx_base_PortType::Port_SendBufferFunction, omx_base_component_PrivateType::ports, omx_base_PortType::sPortParam, and omx_base_component_PrivateType::sPortTypesParam.
Referenced by omx_base_component_Constructor().
OMX_ERRORTYPE omx_base_component_FreeBuffer | ( | OMX_HANDLETYPE | hComponent, |
OMX_U32 | nPortIndex, | ||
OMX_BUFFERHEADERTYPE * | pBuffer | ||
) |
Definition at line 1838 of file omx_base_component.c.
References DEB_LEV_ERR, DEB_LEV_FUNCTION_NAME, DEBUG, err, OMX_PORT_PARAM_TYPE::nPorts, OMX_ErrorBadPortIndex, OMX_ErrorNone, OMX_PortDomainAudio, OMX_PortDomainImage, OMX_PortDomainOther, OMX_PortDomainVideo, omx_base_PortType::Port_FreeBuffer, omx_base_component_PrivateType::ports, and omx_base_component_PrivateType::sPortTypesParam.
Referenced by omx_base_component_Constructor().
OMX_ERRORTYPE omx_base_component_GetComponentVersion | ( | OMX_HANDLETYPE | hComponent, |
OMX_STRING | pComponentName, | ||
OMX_VERSIONTYPE * | pComponentVersion, | ||
OMX_VERSIONTYPE * | pSpecVersion, | ||
OMX_UUIDTYPE * | pComponentUUID | ||
) |
standard openmax function
it returns the version of the component. See OMX_Core.h
standard openmax function
it returns the version of the component. See OMX_Core.h
Definition at line 801 of file omx_base_component.c.
References DEB_LEV_FUNCTION_NAME, DEBUG, omx_base_component_PrivateType::name, OMX_VERSIONTYPE::nRevision, OMX_VERSIONTYPE::nStep, OMX_COMPONENTTYPE::nVersion, OMX_VERSIONTYPE::nVersionMajor, OMX_VERSIONTYPE::nVersionMinor, OMX_ErrorNone, OMX_COMPONENTTYPE::pComponentPrivate, OMX_VERSIONTYPE::s, SPECREVISION, SPECSTEP, SPECVERSIONMAJOR, and SPECVERSIONMINOR.
Referenced by omx_base_component_Constructor().
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 1228 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_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 1254 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_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
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_base_PortType::eBufferSupplier, err, omx_base_component_PrivateType::nGroupID, omx_base_component_PrivateType::nGroupPriority, OMX_PORT_PARAM_TYPE::nPorts, OMX_PARAM_BELLAGIOTHREADS_ID::nThreadBufferMngtID, OMX_PARAM_BELLAGIOTHREADS_ID::nThreadMessageID, omx_base_PortType::nTunnelFlags, 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_ERRORTYPE omx_base_component_GetState | ( | OMX_HANDLETYPE | hComponent, |
OMX_STATETYPE * | pState | ||
) |
This function does not need any override by derived components.
This function does not need any override by derived components
Definition at line 1273 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_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) ...
openmaxStandComp | the component itself |
message | the 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) ...
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 1488 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_ERRORTYPE omx_base_component_ParameterSanityCheck | ( | OMX_HANDLETYPE | hComponent, |
OMX_U32 | nPortIndex, | ||
OMX_PTR | pStructure, | ||
size_t | size | ||
) |
This function verify Component State and Structure header
Definition at line 759 of file omx_base_component.c.
References omx_base_PortType::bIsTransientToEnabled, checkHeader(), DEB_LEV_ERR, DEB_LEV_FUNCTION_NAME, DEBUG, err, OMX_PORT_PARAM_TYPE::nPorts, OMX_ErrorBadPortIndex, OMX_ErrorIncorrectStateOperation, OMX_ErrorNone, OMX_PortDomainAudio, OMX_PortDomainImage, OMX_PortDomainOther, OMX_PortDomainVideo, OMX_StateLoaded, OMX_StateWaitForResources, PORT_IS_ENABLED, omx_base_component_PrivateType::ports, omx_base_component_PrivateType::sPortTypesParam, and omx_base_component_PrivateType::state.
Referenced by omx_audio_mixer_component_SetParameter(), omx_base_component_SetParameter(), omx_clocksrc_component_SetParameter(), omx_video_scheduler_component_SetParameter(), and omx_volume_component_SetParameter().
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 1289 of file omx_base_component.c.
References omx_base_PortType::bIsTransientToDisabled, omx_base_PortType::bIsTransientToEnabled, BUFFER_FREE, DEB_LEV_FUNCTION_NAME, DEBUG, err, omx_base_component_PrivateType::messageQueue, omx_base_component_PrivateType::messageSem, 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, OMX_COMPONENTTYPE::pComponentPrivate, omx_base_PortType::pInternalBufferStorage, omx_base_component_PrivateType::ports, queue(), 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_ERRORTYPE omx_base_component_SetCallbacks | ( | OMX_HANDLETYPE | hComponent, |
OMX_CALLBACKTYPE * | pCallbacks, | ||
OMX_PTR | pAppData | ||
) |
standard OpenMAX function
it sets the callback functions given by the IL client. See OMX_Component.h
Definition at line 857 of file omx_base_component.c.
References omx_base_PortType::BufferProcessedCallback, omx_base_component_PrivateType::callbackData, omx_base_component_PrivateType::callbacks, DEB_LEV_FUNCTION_NAME, DEBUG, OMX_CALLBACKTYPE::EmptyBufferDone, OMX_CALLBACKTYPE::FillBufferDone, OMX_PORT_PARAM_TYPE::nPorts, OMX_PORT_PARAM_TYPE::nStartPortNumber, NUM_DOMAINS, OMX_DirInput, OMX_ErrorNone, OMX_COMPONENTTYPE::pComponentPrivate, omx_base_component_PrivateType::ports, and omx_base_component_PrivateType::sPortTypesParam.
Referenced by omx_base_component_Constructor().
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 1242 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_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.
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
These two cases regard the first stage of client override
these two cases regard the second stage of client override
Definition at line 1026 of file omx_base_component.c.
References OMX_PARAM_PORTDEFINITIONTYPE::audio, OMX_IMAGE_PORTDEFINITIONTYPE::bFlagErrorConcealment, OMX_VIDEO_PORTDEFINITIONTYPE::bFlagErrorConcealment, BUFFER_FREE, checkHeader(), DEB_LEV_ERR, DEB_LEV_FUNCTION_NAME, DEB_LEV_PARAMS, 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_base_component_PrivateType::nGroupID, OMX_PRIORITYMGMTTYPE::nGroupID, omx_base_component_PrivateType::nGroupPriority, OMX_PRIORITYMGMTTYPE::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_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_ERRORTYPE omx_base_component_UseBuffer | ( | OMX_HANDLETYPE | hComponent, |
OMX_BUFFERHEADERTYPE ** | ppBufferHdr, | ||
OMX_U32 | nPortIndex, | ||
OMX_PTR | pAppPrivate, | ||
OMX_U32 | nSizeBytes, | ||
OMX_U8 * | pBuffer | ||
) |
Definition at line 1800 of file omx_base_component.c.
References DEB_LEV_ERR, DEB_LEV_FUNCTION_NAME, DEBUG, err, OMX_PORT_PARAM_TYPE::nPorts, OMX_ErrorBadPortIndex, OMX_ErrorNone, OMX_PortDomainAudio, OMX_PortDomainImage, OMX_PortDomainOther, OMX_PortDomainVideo, omx_base_PortType::Port_UseBuffer, omx_base_component_PrivateType::ports, and omx_base_component_PrivateType::sPortTypesParam.
Referenced by omx_base_component_Constructor().
OMX_ERRORTYPE omx_base_component_UseEGLImage | ( | OMX_HANDLETYPE | hComponent, |
OMX_BUFFERHEADERTYPE ** | ppBufferHdr, | ||
OMX_U32 | nPortIndex, | ||
OMX_PTR | pAppPrivate, | ||
void * | eglImage | ||
) |
Definition at line 1829 of file omx_base_component.c.
References OMX_ErrorNotImplemented.
Referenced by omx_base_component_Constructor().
OMX_ERRORTYPE omx_base_getQualityLevel | ( | OMX_COMPONENTTYPE * | openmaxStandComp, |
OMX_U32 * | pQualityLevel | ||
) |
Definition at line 1955 of file omx_base_component.c.
References omx_base_component_PrivateType::currentQualityLevel, DEB_LEV_FUNCTION_NAME, DEBUG, OMX_ErrorNone, and OMX_COMPONENTTYPE::pComponentPrivate.
Referenced by omx_base_component_Constructor().
OMX_ERRORTYPE omx_base_setQualityLevel | ( | OMX_COMPONENTTYPE * | openmaxStandComp, |
OMX_U32 | nQualityLevel | ||
) |
Definition at line 1962 of file omx_base_component.c.
References omx_base_component_PrivateType::currentQualityLevel, DEB_LEV_SIMPLE_SEQ, DEBUG, omx_base_component_PrivateType::nqualitylevels, OMX_ErrorBadParameter, OMX_ErrorNone, and OMX_COMPONENTTYPE::pComponentPrivate.
Referenced by omx_base_component_Constructor().
Simply fills the first two fields in any OMX structure with the size and the version.
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 746 of file omx_base_component.c.
References OMX_VERSIONTYPE::nRevision, OMX_VERSIONTYPE::nStep, OMX_VERSIONTYPE::nVersionMajor, OMX_VERSIONTYPE::nVersionMinor, OMX_VERSIONTYPE::s, SPECREVISION, SPECSTEP, SPECVERSIONMAJOR, and SPECVERSIONMINOR.
Referenced by base_audio_port_Constructor(), base_clock_port_Constructor(), base_image_port_Constructor(), base_port_AllocateBuffer(), base_port_AllocateTunnelBuffer(), base_port_ComponentTunnelRequest(), base_port_Constructor(), base_port_UseBuffer(), base_video_port_Constructor(), main(), omx_audio_mixer_component_Constructor(), omx_base_component_Constructor(), omx_clocksrc_component_Constructor(), omx_video_scheduler_component_ClockPortHandleFunction(), and omx_volume_component_GetConfig().