omx_audiodec_component.c File Reference

#include <omxcore.h>
#include <omx_base_audio_port.h>
#include <omx_audiodec_component.h>
#include <OMX_Audio.h>
#include <config.h>

Go to the source code of this file.

Defines

#define MAX_COMPONENT_AUDIODEC   4
#define OUTPUT_LEN_STANDARD_FFMPEG   192000

Functions

OMX_ERRORTYPE omx_audiodec_component_Constructor (OMX_COMPONENTTYPE *openmaxStandComp, OMX_STRING cComponentName)
OMX_ERRORTYPE omx_audiodec_component_Destructor (OMX_COMPONENTTYPE *openmaxStandComp)
OMX_ERRORTYPE omx_audiodec_component_ffmpegLibInit (omx_audiodec_component_PrivateType *omx_audiodec_component_Private)
void omx_audiodec_component_ffmpegLibDeInit (omx_audiodec_component_PrivateType *omx_audiodec_component_Private)
void omx_audiodec_component_SetInternalParameters (OMX_COMPONENTTYPE *openmaxStandComp)
OMX_ERRORTYPE omx_audiodec_component_Init (OMX_COMPONENTTYPE *openmaxStandComp)
OMX_ERRORTYPE omx_audiodec_component_Deinit (OMX_COMPONENTTYPE *openmaxStandComp)
void omx_audiodec_component_BufferMgmtCallback (OMX_COMPONENTTYPE *openmaxStandComp, OMX_BUFFERHEADERTYPE *pInputBuffer, OMX_BUFFERHEADERTYPE *pOutputBuffer)
OMX_ERRORTYPE omx_audiodec_component_SetParameter (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_INDEXTYPE nParamIndex, OMX_IN OMX_PTR ComponentParameterStructure)
OMX_ERRORTYPE omx_audiodec_component_GetParameter (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_INDEXTYPE nParamIndex, OMX_INOUT OMX_PTR ComponentParameterStructure)
OMX_ERRORTYPE omx_audiodec_component_MessageHandler (OMX_COMPONENTTYPE *openmaxStandComp, internalRequestMessageType *message)
OMX_ERRORTYPE omx_audiodec_component_ComponentRoleEnum (OMX_IN OMX_HANDLETYPE hComponent, OMX_OUT OMX_U8 *cRole, OMX_IN OMX_U32 nIndex)
OMX_ERRORTYPE omx_audiodec_component_SetConfig (OMX_HANDLETYPE hComponent, OMX_INDEXTYPE nIndex, OMX_PTR pComponentConfigStructure)
OMX_ERRORTYPE omx_audiodec_component_GetExtensionIndex (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_STRING cParameterName, OMX_OUT OMX_INDEXTYPE *pIndexType)


Detailed Description

This component implements an MP3 decoder. The MP3 decoder is based on FFmpeg software library.

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_audiodec_component.c.


Define Documentation

#define MAX_COMPONENT_AUDIODEC   4

modification to include audio formats

Definition at line 39 of file omx_audiodec_component.c.

Referenced by omx_audiodec_component_Constructor().

#define OUTPUT_LEN_STANDARD_FFMPEG   192000

output length arguement passed along decoding function

Definition at line 42 of file omx_audiodec_component.c.

Referenced by omx_audiodec_component_BufferMgmtCallback().


Function Documentation

void omx_audiodec_component_BufferMgmtCallback ( OMX_COMPONENTTYPE openmaxStandComp,
OMX_BUFFERHEADERTYPE pInputBuffer,
OMX_BUFFERHEADERTYPE pOutputBuffer 
)

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

OMX_ERRORTYPE omx_audiodec_component_Constructor ( OMX_COMPONENTTYPE openmaxStandComp,
OMX_STRING  cComponentName 
)

The Constructor

Calling base filter constructor

Allocate Ports and call port constructor.

Domain specific section for the ports.

first initializing the codec context etc that was done earlier by ffmpeglibinit function

Definition at line 49 of file omx_audiodec_component.c.

References AUDIO_DEC_AAC_NAME, AUDIO_DEC_BASE_NAME, AUDIO_DEC_MP3_NAME, AUDIO_DEC_VORBIS_NAME, base_audio_port_Constructor(), OMX_COMPONENTTYPE::ComponentRoleEnum, DEB_LEV_FUNCTION_NAME, DEBUG, DEFAULT_IN_BUFFER_SIZE, DEFAULT_OUT_BUFFER_SIZE, err, OMX_COMPONENTTYPE::GetExtensionIndex, OMX_COMPONENTTYPE::GetParameter, MAX_COMPONENT_AUDIODEC, OMX_AUDIO_ChannelLF, OMX_AUDIO_ChannelRF, OMX_AUDIO_CodingAAC, OMX_AUDIO_CodingMP3, OMX_AUDIO_CodingPCM, OMX_AUDIO_CodingUnused, OMX_AUDIO_CodingVORBIS, OMX_AUDIO_PCMModeLinear, omx_audiodec_component_BufferMgmtCallback(), omx_audiodec_component_ComponentRoleEnum(), omx_audiodec_component_Destructor(), omx_audiodec_component_GetExtensionIndex(), omx_audiodec_component_GetParameter(), omx_audiodec_component_MessageHandler(), omx_audiodec_component_SetConfig(), omx_audiodec_component_SetInternalParameters(), omx_audiodec_component_SetParameter(), omx_base_filter_Constructor(), OMX_BASE_FILTER_INPUTPORT_INDEX, OMX_BASE_FILTER_OUTPUTPORT_INDEX, OMX_EndianLittle, OMX_ErrorInsufficientResources, OMX_ErrorInvalidComponentName, OMX_ErrorNone, OMX_FALSE, OMX_NumericalDataSigned, OMX_TRUE, OMX_COMPONENTTYPE::pComponentPrivate, OMX_COMPONENTTYPE::SetConfig, setHeader(), OMX_COMPONENTTYPE::SetParameter, and tsem_init().

Referenced by omx_component_library_Setup().

OMX_ERRORTYPE omx_audiodec_component_Deinit ( OMX_COMPONENTTYPE openmaxStandComp  ) 

OMX_ERRORTYPE omx_audiodec_component_Destructor ( OMX_COMPONENTTYPE openmaxStandComp  ) 

void omx_audiodec_component_ffmpegLibDeInit ( omx_audiodec_component_PrivateType *  omx_audiodec_component_Private  ) 

It Deinitializates the FFmpeg framework, and close the FFmpeg MP3 decoder

Definition at line 255 of file omx_audiodec_component.c.

Referenced by omx_audiodec_component_Deinit(), and omx_audiodec_component_MessageHandler().

OMX_ERRORTYPE omx_audiodec_component_ffmpegLibInit ( omx_audiodec_component_PrivateType *  omx_audiodec_component_Private  ) 

It initializates the FFmpeg framework, and opens an FFmpeg audiodecoder of type specified by IL client - currently only used for MP3 decoding

Definition at line 206 of file omx_audiodec_component.c.

References DEB_LEV_ERR, DEB_LEV_SIMPLE_SEQ, DEBUG, OMX_AUDIO_CodingAAC, OMX_AUDIO_CodingMP3, OMX_AUDIO_CodingVORBIS, OMX_ErrorComponentNotFound, OMX_ErrorInsufficientResources, OMX_ErrorNone, and tsem_up().

Referenced by omx_audiodec_component_MessageHandler().

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

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

OMX_ERRORTYPE omx_audiodec_component_Init ( OMX_COMPONENTTYPE openmaxStandComp  ) 

OMX_ERRORTYPE omx_audiodec_component_MessageHandler ( OMX_COMPONENTTYPE openmaxStandComp,
internalRequestMessageType message 
)

OMX_ERRORTYPE omx_audiodec_component_SetConfig ( OMX_HANDLETYPE  hComponent,
OMX_INDEXTYPE  nIndex,
OMX_PTR  pComponentConfigStructure 
)

void omx_audiodec_component_SetInternalParameters ( OMX_COMPONENTTYPE openmaxStandComp  ) 

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


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