omx_audiodec_component.h

Go to the documentation of this file.
00001 
00030 #ifndef _OMX_MP3DEC_COMPONENT_H_
00031 #define _OMX_MP3DEC_COMPONENT_H_
00032 
00033 #ifdef HAVE_CONFIG_H
00034 #include "config.h"
00035 #endif
00036 
00037 #include <OMX_Types.h>
00038 #include <OMX_Component.h>
00039 #include <OMX_Core.h>
00040 #include <pthread.h>
00041 #include <stdlib.h>
00042 #include <string.h>
00043 #include <omx_base_filter.h>
00044  
00045 /* Specific include files for FFmpeg*/
00046 #if FFMPEG_LIBNAME_HEADERS
00047 #include <libavcodec/avcodec.h>
00048 #include <libavformat/avformat.h>
00049 #else
00050 #include <ffmpeg/avcodec.h>
00051 #include <ffmpeg/avformat.h>
00052 #endif
00053 
00054 #define AUDIO_DEC_BASE_NAME "OMX.st.audio_decoder"
00055 #define AUDIO_DEC_MP3_NAME "OMX.st.audio_decoder.mp3"
00056 #define AUDIO_DEC_VORBIS_NAME "OMX.st.audio_decoder.ogg"
00057 #define AUDIO_DEC_AAC_NAME "OMX.st.audio_decoder.aac" 
00058 #define AUDIO_DEC_G726_NAME "OMX.st.audio_decoder.g726"
00059 #define AUDIO_DEC_MP3_ROLE "audio_decoder.mp3"
00060 #define AUDIO_DEC_VORBIS_ROLE "audio_decoder.ogg"
00061 #define AUDIO_DEC_AAC_ROLE "audio_decoder.aac"   
00062 #define AUDIO_DEC_G726_ROLE "audio_decoder.g726"
00063 
00066 DERIVEDCLASS(omx_audiodec_component_PrivateType, omx_base_filter_PrivateType)
00067 #define omx_audiodec_component_PrivateType_FIELDS omx_base_filter_PrivateType_FIELDS \
00068  \
00069   AVCodec *avCodec;  \
00070  \
00071   AVCodecContext *avCodecContext;  \
00072 \
00073   tsem_t* avCodecSyncSem; \
00074   \
00075   OMX_AUDIO_PARAM_MP3TYPE pAudioMp3;  \
00076  \
00077   OMX_AUDIO_PARAM_VORBISTYPE pAudioVorbis;  \
00078  \
00079   OMX_AUDIO_PARAM_AACPROFILETYPE  pAudioAac;  \
00080  \
00081   OMX_AUDIO_PARAM_G726TYPE pAudioG726; \
00082   \
00083   OMX_AUDIO_PARAM_PCMMODETYPE pAudioPcmMode;  \
00084  \
00085   OMX_BOOL avcodecReady;  \
00086  \
00087   OMX_U16 minBufferLength; \
00088  \
00089   OMX_U8* inputCurrBuffer;\
00090  \
00091   OMX_U32 inputCurrLength;\
00092  \
00093   OMX_U8* internalOutputBuffer;\
00094  \
00095   OMX_S32 isFirstBuffer;\
00096  \
00097   OMX_S32 positionInOutBuf; \
00098  \
00099   OMX_S32 isNewBuffer;  \
00100  \
00101   OMX_U32 audio_coding_type;   \
00102  \
00103   OMX_U8* extradata; \
00104  \
00105   OMX_U32 extradata_size;
00106 ENDCLASS(omx_audiodec_component_PrivateType)
00107 
00108 /* Component private entry points declaration */
00109 OMX_ERRORTYPE omx_audiodec_component_Constructor(OMX_COMPONENTTYPE *openmaxStandComp,OMX_STRING cComponentName);
00110 OMX_ERRORTYPE omx_audiodec_component_Destructor(OMX_COMPONENTTYPE *openmaxStandComp);
00111 OMX_ERRORTYPE omx_audiodec_component_Init(OMX_COMPONENTTYPE *openmaxStandComp);
00112 OMX_ERRORTYPE omx_audiodec_component_Deinit(OMX_COMPONENTTYPE *openmaxStandComp);
00113 OMX_ERRORTYPE omx_audiodec_component_MessageHandler(OMX_COMPONENTTYPE*,internalRequestMessageType*);
00114 
00115 void omx_audiodec_component_BufferMgmtCallback(
00116   OMX_COMPONENTTYPE *openmaxStandComp,
00117   OMX_BUFFERHEADERTYPE* inputbuffer,
00118   OMX_BUFFERHEADERTYPE* outputbuffer);
00119   
00120 OMX_ERRORTYPE omx_audiodec_component_GetParameter(
00121   OMX_IN  OMX_HANDLETYPE hComponent,
00122   OMX_IN  OMX_INDEXTYPE nParamIndex,
00123   OMX_INOUT OMX_PTR ComponentParameterStructure);
00124 
00125 OMX_ERRORTYPE omx_audiodec_component_SetParameter(
00126   OMX_IN  OMX_HANDLETYPE hComponent,
00127   OMX_IN  OMX_INDEXTYPE nParamIndex,
00128   OMX_IN  OMX_PTR ComponentParameterStructure);
00129 
00130 OMX_ERRORTYPE omx_audiodec_component_ComponentRoleEnum(
00131   OMX_IN OMX_HANDLETYPE hComponent,
00132   OMX_OUT OMX_U8 *cRole,
00133   OMX_IN OMX_U32 nIndex);
00134 
00135 void omx_audiodec_component_SetInternalParameters(OMX_COMPONENTTYPE *openmaxStandComp);
00136 
00137 OMX_ERRORTYPE omx_audiodec_component_SetConfig(
00138   OMX_HANDLETYPE hComponent,
00139   OMX_INDEXTYPE nIndex,
00140   OMX_PTR pComponentConfigStructure);
00141 
00142 OMX_ERRORTYPE omx_audiodec_component_GetExtensionIndex(
00143   OMX_IN  OMX_HANDLETYPE hComponent,
00144   OMX_IN  OMX_STRING cParameterName,
00145   OMX_OUT OMX_INDEXTYPE* pIndexType);
00146 
00147 
00148 #endif

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