10725
|
1 /*
|
|
2 ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
|
12527
|
3 ** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
|
10725
|
4 **
|
|
5 ** This program is free software; you can redistribute it and/or modify
|
|
6 ** it under the terms of the GNU General Public License as published by
|
|
7 ** the Free Software Foundation; either version 2 of the License, or
|
|
8 ** (at your option) any later version.
|
|
9 **
|
|
10 ** This program is distributed in the hope that it will be useful,
|
|
11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13 ** GNU General Public License for more details.
|
|
14 **
|
|
15 ** You should have received a copy of the GNU General Public License
|
|
16 ** along with this program; if not, write to the Free Software
|
|
17 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
18 **
|
|
19 ** Any non-GPL usage of this software or parts of this software is strictly
|
|
20 ** forbidden.
|
|
21 **
|
|
22 ** Commercial non-GPL licensing of this software is possible.
|
|
23 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
|
|
24 **
|
12527
|
25 ** $Id: decoder.h,v 1.2 2003/10/03 22:22:27 alex Exp $
|
10725
|
26 **/
|
|
27
|
|
28 #ifndef __DECODER_H__
|
|
29 #define __DECODER_H__
|
|
30
|
|
31 #ifdef __cplusplus
|
|
32 extern "C" {
|
|
33 #endif
|
|
34
|
|
35 #ifdef _WIN32
|
|
36 #pragma pack(push, 8)
|
|
37 #ifndef FAADAPI
|
|
38 #define FAADAPI __cdecl
|
|
39 #endif
|
|
40 #else
|
|
41 #ifndef FAADAPI
|
|
42 #define FAADAPI
|
|
43 #endif
|
|
44 #endif
|
|
45
|
|
46 #include "bits.h"
|
|
47 #include "syntax.h"
|
|
48 #include "drc.h"
|
|
49 #include "specrec.h"
|
|
50 #include "filtbank.h"
|
|
51 #include "ic_predict.h"
|
|
52
|
|
53
|
|
54 /* library output formats */
|
|
55 #define FAAD_FMT_16BIT 1
|
|
56 #define FAAD_FMT_24BIT 2
|
|
57 #define FAAD_FMT_32BIT 3
|
|
58 #define FAAD_FMT_FLOAT 4
|
|
59 #define FAAD_FMT_DOUBLE 5
|
|
60
|
|
61 #define LC_DEC_CAP (1<<0)
|
|
62 #define MAIN_DEC_CAP (1<<1)
|
|
63 #define LTP_DEC_CAP (1<<2)
|
|
64 #define LD_DEC_CAP (1<<3)
|
|
65 #define ERROR_RESILIENCE_CAP (1<<4)
|
|
66 #define FIXED_POINT_CAP (1<<5)
|
|
67
|
|
68 #define FRONT_CHANNEL_CENTER (1)
|
|
69 #define FRONT_CHANNEL_LEFT (2)
|
|
70 #define FRONT_CHANNEL_RIGHT (3)
|
|
71 #define SIDE_CHANNEL_LEFT (4)
|
|
72 #define SIDE_CHANNEL_RIGHT (5)
|
|
73 #define BACK_CHANNEL_LEFT (6)
|
|
74 #define BACK_CHANNEL_RIGHT (7)
|
|
75 #define BACK_CHANNEL_CENTER (8)
|
|
76 #define LFE_CHANNEL (9)
|
|
77 #define UNKNOWN_CHANNEL (0)
|
|
78
|
|
79 int8_t* FAADAPI faacDecGetErrorMessage(uint8_t errcode);
|
|
80
|
12527
|
81 uint32_t FAADAPI faacDecGetCapabilities(void);
|
10725
|
82
|
12527
|
83 faacDecHandle FAADAPI faacDecOpen(void);
|
10725
|
84
|
|
85 faacDecConfigurationPtr FAADAPI faacDecGetCurrentConfiguration(faacDecHandle hDecoder);
|
|
86
|
|
87 uint8_t FAADAPI faacDecSetConfiguration(faacDecHandle hDecoder,
|
|
88 faacDecConfigurationPtr config);
|
|
89
|
|
90 /* Init the library based on info from the AAC file (ADTS/ADIF) */
|
|
91 int32_t FAADAPI faacDecInit(faacDecHandle hDecoder,
|
|
92 uint8_t *buffer,
|
|
93 uint32_t buffer_size,
|
|
94 uint32_t *samplerate,
|
|
95 uint8_t *channels);
|
|
96
|
|
97 /* Init the library using a DecoderSpecificInfo */
|
|
98 int8_t FAADAPI faacDecInit2(faacDecHandle hDecoder, uint8_t *pBuffer,
|
|
99 uint32_t SizeOfDecoderSpecificInfo,
|
|
100 uint32_t *samplerate, uint8_t *channels);
|
|
101
|
|
102 /* Init the library for DRM */
|
|
103 int8_t FAADAPI faacDecInitDRM(faacDecHandle hDecoder, uint32_t samplerate,
|
|
104 uint8_t channels);
|
|
105
|
|
106 void FAADAPI faacDecClose(faacDecHandle hDecoder);
|
|
107
|
10989
|
108 void FAADAPI faacDecPostSeekReset(faacDecHandle hDecoder, int32_t frame);
|
|
109
|
10725
|
110 void* FAADAPI faacDecDecode(faacDecHandle hDecoder,
|
|
111 faacDecFrameInfo *hInfo,
|
|
112 uint8_t *buffer,
|
|
113 uint32_t buffer_size);
|
|
114
|
|
115 #ifdef _WIN32
|
|
116 #pragma pack(pop)
|
|
117 #endif
|
|
118
|
|
119 #ifdef __cplusplus
|
|
120 }
|
|
121 #endif
|
|
122 #endif
|