• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 /*! \file   pvmp3_decoder.h
19  *  \brief  Header file for the MP3 decoder library
20  *
21  */
22 
23 #ifndef PVMP3_DECODER_H
24 #define PVMP3_DECODER_H
25 
26 
27 #ifndef OSCL_MEM_H_INCLUDED
28 #include "oscl_mem.h"
29 #endif
30 
31 #include "pvmp3decoder_api.h"
32 #include "oscl_base.h"
33 
34 
35 /*!
36  *  \brief  number of samples per frame (decoded frames)
37  */
38 
39 
40 #define KMP3_MAX_OUTPUT_SIZE    4608
41 
42 /*!
43  *  \class  CPvMP3_Decoder "include/pvmp3_decoder.h"
44  *  \brief  MP3 Decoder class
45  */
46 
47 
48 // CPvMP3_Decoder
49 
50 /*!
51  *  \class  CPvMP3_Decoder
52  *  \brief  MP3 Decoder class
53  */
54 
55 
56 // CPvMP3_Decoder
57 class CPvMP3_Decoder
58 {
59     public:
60         OSCL_IMPORT_REF void ConstructL();
61         OSCL_IMPORT_REF static CPvMP3_Decoder *NewL();
62         OSCL_IMPORT_REF ~CPvMP3_Decoder();
63 
64         OSCL_IMPORT_REF int32 StartL(tPVMP3DecoderExternal * pExt,
65                                      bool aAllocateInputBuffer = false,
66                                      bool aAllocateOutputBuffer = false,
67                                      bool crcEnabler = false,
68                                      e_equalization equalizType = flat
69                                     );
70         OSCL_IMPORT_REF int32 ExecuteL(tPVMP3DecoderExternal * pExt);
71         OSCL_IMPORT_REF void ResetDecoderL();
72         OSCL_IMPORT_REF void StopL();
73 
74         OSCL_IMPORT_REF void TerminateDecoderL();
75         OSCL_IMPORT_REF int32 SeekMp3Synchronization(tPVMP3DecoderExternal * pExt);
76 
77 
78 
79     private:
80         bool iAllocateInputBuffer;
81         bool iAllocateOutputBuffer;
82 
83         uint8 *pMem;
84 
85         uint8* iInputBuf;
86         int16* iOutputBuf;
87 };
88 
89 
90 
91 #endif
92 
93