OSDN Git Service

original
[gb-231r1-is01/Gingerbread_2.3.3_r1_IS01.git] / frameworks / base / media / libstagefright / codecs / common / include / voAAC.h
1 /*\r
2  ** Copyright 2003-2010, VisualOn, Inc.\r
3  **\r
4  ** Licensed under the Apache License, Version 2.0 (the "License");\r
5  ** you may not use this file except in compliance with the License.\r
6  ** You may obtain a copy of the License at\r
7  **\r
8  **     http://www.apache.org/licenses/LICENSE-2.0\r
9  **\r
10  ** Unless required by applicable law or agreed to in writing, software\r
11  ** distributed under the License is distributed on an "AS IS" BASIS,\r
12  ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13  ** See the License for the specific language governing permissions and\r
14  ** limitations under the License.\r
15  */\r
16 /*******************************************************************************\r
17         File:           voAAC.h\r
18 \r
19         Content:        AAC codec APIs & data types\r
20 \r
21 *******************************************************************************/\r
22 \r
23 #ifndef __voAAC_H__\r
24 #define __voAAC_H__\r
25 \r
26 #ifdef __cplusplus\r
27 extern "C" {\r
28 #endif /* __cplusplus */\r
29 \r
30 #include "voAudio.h"\r
31 \r
32 /*!\r
33  * the frame type that the decoder supports\r
34  */\r
35 typedef enum {\r
36         VOAAC_RAWDATA                   = 0,    /*!<contains only raw aac data in a frame*/\r
37         VOAAC_ADTS                              = 1,    /*!<contains ADTS header + raw AAC data in a frame*/\r
38         VOAAC_FT_MAX                    = VO_MAX_ENUM_VALUE\r
39 } VOAACFRAMETYPE;\r
40 \r
41 /*!\r
42  * the structure for AAC encoder input parameter\r
43  */\r
44 typedef  struct {\r
45   int     sampleRate;          /*! audio file sample rate */\r
46   int     bitRate;             /*! encoder bit rate in bits/sec */\r
47   short   nChannels;               /*! number of channels on input (1,2) */\r
48   short   adtsUsed;                        /*! whether write adts header */\r
49 } AACENC_PARAM;\r
50 \r
51 /* AAC Param ID */\r
52 #define VO_PID_AAC_Mdoule                               0x42211000\r
53 #define VO_PID_AAC_ENCPARAM                             VO_PID_AAC_Mdoule | 0x0040  /*!< get/set AAC encoder parameter, the parameter is a pointer to AACENC_PARAM */\r
54 \r
55 /* AAC decoder error ID */\r
56 #define VO_ERR_AAC_Mdoule                               0x82210000\r
57 #define VO_ERR_AAC_UNSFILEFORMAT                (VO_ERR_AAC_Mdoule | 0xF001)\r
58 #define VO_ERR_AAC_UNSPROFILE                   (VO_ERR_AAC_Mdoule | 0xF002)\r
59 \r
60 /**\r
61  * Get audio encoder API interface\r
62  * \param pEncHandle [out] Return the AAC Encoder handle.\r
63  * \retval VO_ERR_OK Succeeded.\r
64  */\r
65 VO_S32 VO_API voGetAACEncAPI (VO_AUDIO_CODECAPI * pEncHandle);\r
66 \r
67 #ifdef __cplusplus\r
68 }\r
69 #endif /* __cplusplus */\r
70 \r
71 #endif // __voAAC_H__\r
72 \r
73 \r
74 \r