1 /* ------------------------------------------------------------------ 2 * Copyright (C) 1998-2009 PacketVideo 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 * express or implied. 14 * See the License for the specific language governing permissions 15 * and limitations under the License. 16 * ------------------------------------------------------------------- 17 */ 18 #ifndef MP3_DEC_H_INCLUDED 19 #define MP3_DEC_H_INCLUDED 20 21 #ifndef OMX_Component_h 22 #include "OMX_Component.h" 23 #endif 24 25 26 #ifndef PVMP3_DECODER_H 27 #include "pvmp3_decoder.h" 28 #endif 29 30 31 class Mp3Decoder 32 { 33 public: 34 35 Mp3Decoder(); 36 37 OMX_BOOL Mp3DecInit(OMX_AUDIO_CONFIG_EQUALIZERTYPE* aEqualizerType); 38 void Mp3DecDeinit(); 39 40 Int Mp3DecodeAudio(OMX_S16* aOutBuff, 41 OMX_U32* aOutputLength, OMX_U8** aInputBuf, 42 OMX_U32* aInBufSize, 43 OMX_S32* aFrameCount, 44 OMX_AUDIO_PARAM_PCMMODETYPE* aAudioPcmParam, 45 OMX_AUDIO_PARAM_MP3TYPE* aAudioMp3Param, 46 OMX_BOOL aMarkerFlag, 47 OMX_BOOL* aResizeFlag); 48 49 void ResetDecoder(); // for repositioning 50 51 OMX_S32 iInputUsedLength; 52 OMX_S32 iInitFlag; 53 54 private: 55 56 CPvMP3_Decoder* iAudioMp3Decoder; 57 tPVMP3DecoderExternal* iMP3DecExt; 58 59 }; 60 61 62 63 #endif //#ifndef MP3_DEC_H_INCLUDED 64 65