OpenMAXBellagio
0.9.3
|
#include <omxcore.h>
#include <omx_base_audio_port.h>
#include <omx_volume_component.h>
#include <OMX_Audio.h>
Go to the source code of this file.
Macros | |
#define | GAIN_VALUE 100.0f |
Functions | |
OMX_ERRORTYPE | omx_volume_component_Constructor (OMX_COMPONENTTYPE *openmaxStandComp, OMX_STRING cComponentName) |
OMX_ERRORTYPE | omx_volume_component_Destructor (OMX_COMPONENTTYPE *openmaxStandComp) |
void | omx_volume_component_BufferMgmtCallback (OMX_COMPONENTTYPE *openmaxStandComp, OMX_BUFFERHEADERTYPE *pInputBuffer, OMX_BUFFERHEADERTYPE *pOutputBuffer) |
OMX_ERRORTYPE | omx_volume_component_SetConfig (OMX_HANDLETYPE hComponent, OMX_INDEXTYPE nIndex, OMX_PTR pComponentConfigStructure) |
OMX_ERRORTYPE | omx_volume_component_GetConfig (OMX_HANDLETYPE hComponent, OMX_INDEXTYPE nIndex, OMX_PTR pComponentConfigStructure) |
OMX_ERRORTYPE | omx_volume_component_SetParameter (OMX_HANDLETYPE hComponent, OMX_INDEXTYPE nParamIndex, OMX_PTR ComponentParameterStructure) |
OMX_ERRORTYPE | omx_volume_component_GetParameter (OMX_HANDLETYPE hComponent, OMX_INDEXTYPE nParamIndex, OMX_PTR ComponentParameterStructure) |
#define GAIN_VALUE 100.0f |
src/components/audio_effects/omx_volume_component.c
OpenMAX volume control component. This component implements a filter that controls the volume level of the audio PCM stream.
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 33 of file omx_volume_component.c.
Referenced by omx_volume_component_BufferMgmtCallback(), and omx_volume_component_Constructor().
void omx_volume_component_BufferMgmtCallback | ( | OMX_COMPONENTTYPE * | openmaxStandComp, |
OMX_BUFFERHEADERTYPE * | pInputBuffer, | ||
OMX_BUFFERHEADERTYPE * | pOutputBuffer | ||
) |
This function is used to process the input buffer and provide one output buffer
Definition at line 145 of file omx_volume_component.c.
References GAIN_VALUE, OMX_BUFFERHEADERTYPE::nFilledLen, OMX_BUFFERHEADERTYPE::pBuffer, and OMX_COMPONENTTYPE::pComponentPrivate.
Referenced by omx_volume_component_Constructor().
OMX_ERRORTYPE omx_volume_component_Constructor | ( | OMX_COMPONENTTYPE * | openmaxStandComp, |
OMX_STRING | cComponentName | ||
) |
Calling base filter constructor
Allocate Ports and call port constructor.
Domain specific section for the ports.
Definition at line 35 of file omx_volume_component.c.
References base_audio_port_Constructor(), DEB_LEV_ERR, DEB_LEV_FUNCTION_NAME, DEBUG, DEFAULT_OUT_BUFFER_SIZE, err, GAIN_VALUE, OMX_COMPONENTTYPE::GetConfig, OMX_COMPONENTTYPE::GetParameter, MAX_VOLUME_COMPONENTS, omx_base_filter_Constructor(), OMX_BASE_FILTER_INPUTPORT_INDEX, OMX_BASE_FILTER_OUTPUTPORT_INDEX, OMX_ErrorInsufficientResources, OMX_ErrorNone, OMX_ErrorUndefined, OMX_FALSE, OMX_PortDomainAudio, OMX_TRUE, omx_volume_component_BufferMgmtCallback(), omx_volume_component_Destructor(), omx_volume_component_GetConfig(), omx_volume_component_GetParameter(), omx_volume_component_SetConfig(), omx_volume_component_SetParameter(), OMX_COMPONENTTYPE::pComponentPrivate, RM_RegisterComponent(), OMX_COMPONENTTYPE::SetConfig, OMX_COMPONENTTYPE::SetParameter, VOLUME_COMP_NAME, and VOLUME_QUALITY_LEVELS.
Referenced by omx_component_library_Setup().
OMX_ERRORTYPE omx_volume_component_Destructor | ( | OMX_COMPONENTTYPE * | openmaxStandComp) |
The destructor
Definition at line 120 of file omx_volume_component.c.
References DEB_LEV_FUNCTION_NAME, DEBUG, omx_base_filter_Destructor(), OMX_ErrorNone, OMX_PortDomainAudio, and OMX_COMPONENTTYPE::pComponentPrivate.
Referenced by omx_volume_component_Constructor().
OMX_ERRORTYPE omx_volume_component_GetConfig | ( | OMX_HANDLETYPE | hComponent, |
OMX_INDEXTYPE | nIndex, | ||
OMX_PTR | pComponentConfigStructure | ||
) |
Definition at line 190 of file omx_volume_component.c.
References OMX_AUDIO_CONFIG_VOLUMETYPE::bLinear, err, OMX_BS32::nMax, OMX_BS32::nMin, OMX_BS32::nValue, omx_base_component_GetConfig(), OMX_ErrorNone, OMX_IndexConfigAudioVolume, OMX_TRUE, OMX_COMPONENTTYPE::pComponentPrivate, setHeader(), and OMX_AUDIO_CONFIG_VOLUMETYPE::sVolume.
Referenced by omx_volume_component_Constructor().
OMX_ERRORTYPE omx_volume_component_GetParameter | ( | OMX_HANDLETYPE | hComponent, |
OMX_INDEXTYPE | nParamIndex, | ||
OMX_PTR | ComponentParameterStructure | ||
) |
Definition at line 272 of file omx_volume_component.c.
References OMX_AUDIO_PARAM_PCMMODETYPE::bInterleaved, checkHeader(), OMX_PARAM_COMPONENTROLETYPE::cRole, DEB_LEV_SIMPLE_SEQ, DEBUG, OMX_AUDIO_PARAM_PCMMODETYPE::eEndian, OMX_AUDIO_PARAM_PCMMODETYPE::eNumData, OMX_AUDIO_PARAM_PCMMODETYPE::ePCMMode, err, OMX_AUDIO_PARAM_PCMMODETYPE::nBitPerSample, OMX_AUDIO_PARAM_PCMMODETYPE::nChannels, OMX_AUDIO_PARAM_PORTFORMATTYPE::nPortIndex, OMX_AUDIO_PARAM_PCMMODETYPE::nPortIndex, OMX_AUDIO_PARAM_PCMMODETYPE::nSamplingRate, OMX_AUDIO_PCMModeLinear, omx_base_component_GetParameter(), OMX_EndianBig, OMX_ErrorBadParameter, OMX_ErrorBadPortIndex, OMX_ErrorNone, OMX_IndexParamAudioInit, OMX_IndexParamAudioPcm, OMX_IndexParamAudioPortFormat, OMX_IndexParamStandardComponentRole, OMX_NumericalDataSigned, OMX_PortDomainAudio, OMX_TRUE, OMX_COMPONENTTYPE::pComponentPrivate, omx_base_audio_PortType::sAudioParam, and VOLUME_COMP_ROLE.
Referenced by omx_volume_component_Constructor().
OMX_ERRORTYPE omx_volume_component_SetConfig | ( | OMX_HANDLETYPE | hComponent, |
OMX_INDEXTYPE | nIndex, | ||
OMX_PTR | pComponentConfigStructure | ||
) |
setting configurations
Definition at line 163 of file omx_volume_component.c.
References err, OMX_BS32::nValue, omx_base_component_SetConfig(), OMX_ErrorBadParameter, OMX_ErrorNone, OMX_IndexConfigAudioVolume, OMX_COMPONENTTYPE::pComponentPrivate, and OMX_AUDIO_CONFIG_VOLUMETYPE::sVolume.
Referenced by omx_volume_component_Constructor().
OMX_ERRORTYPE omx_volume_component_SetParameter | ( | OMX_HANDLETYPE | hComponent, |
OMX_INDEXTYPE | nParamIndex, | ||
OMX_PTR | ComponentParameterStructure | ||
) |
Definition at line 215 of file omx_volume_component.c.
References checkHeader(), OMX_PARAM_COMPONENTROLETYPE::cRole, DEB_LEV_ERR, DEB_LEV_SIMPLE_SEQ, DEBUG, err, OMX_AUDIO_PARAM_PORTFORMATTYPE::nPortIndex, omx_base_component_ParameterSanityCheck(), omx_base_component_SetParameter(), OMX_ErrorBadParameter, OMX_ErrorBadPortIndex, OMX_ErrorIncorrectStateOperation, OMX_ErrorNone, OMX_IndexParamAudioPortFormat, OMX_IndexParamStandardComponentRole, OMX_StateLoaded, OMX_StateWaitForResources, OMX_COMPONENTTYPE::pComponentPrivate, omx_base_audio_PortType::sAudioParam, and VOLUME_COMP_ROLE.
Referenced by omx_volume_component_Constructor().