annotate libfaad2/decoder.h @ 13941:00d6903e0c56

My e-mail address has changed
author gpoirier
date Sun, 14 Nov 2004 14:55:07 +0000
parents 6d50ef45a058
children 2ae5ab4331ca
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
1 /*
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
2 ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
12527
4a370c80fe5c update to the 2.0 release of faad, patch by adland
diego
parents: 10989
diff changeset
3 ** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
4 **
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
5 ** This program is free software; you can redistribute it and/or modify
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
6 ** it under the terms of the GNU General Public License as published by
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
7 ** the Free Software Foundation; either version 2 of the License, or
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
8 ** (at your option) any later version.
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
9 **
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
10 ** This program is distributed in the hope that it will be useful,
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
13 ** GNU General Public License for more details.
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
14 **
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
15 ** You should have received a copy of the GNU General Public License
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
16 ** along with this program; if not, write to the Free Software
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
17 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
18 **
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
19 ** Any non-GPL usage of this software or parts of this software is strictly
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
20 ** forbidden.
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
21 **
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
22 ** Commercial non-GPL licensing of this software is possible.
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
23 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
24 **
12625
d81145997036 More information about modifications to comply more closely with GPL 2a.
diego
parents: 12527
diff changeset
25 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
13453
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
26 ** $Id: decoder.h,v 1.4 2004/06/23 13:50:49 diego Exp $
12625
d81145997036 More information about modifications to comply more closely with GPL 2a.
diego
parents: 12527
diff changeset
27 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
28 **/
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
29
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
30 #ifndef __DECODER_H__
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
31 #define __DECODER_H__
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
32
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
33 #ifdef __cplusplus
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
34 extern "C" {
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
35 #endif
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
36
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
37 #ifdef _WIN32
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
38 #pragma pack(push, 8)
13453
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
39 #ifndef NEAACDECAPI
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
40 #define NEAACDECAPI __cdecl
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
41 #endif
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
42 #else
13453
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
43 #ifndef NEAACDECAPI
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
44 #define NEAACDECAPI
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
45 #endif
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
46 #endif
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
47
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
48
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
49 /* library output formats */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
50 #define FAAD_FMT_16BIT 1
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
51 #define FAAD_FMT_24BIT 2
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
52 #define FAAD_FMT_32BIT 3
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
53 #define FAAD_FMT_FLOAT 4
13453
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
54 #define FAAD_FMT_FIXED FAAD_FMT_FLOAT
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
55 #define FAAD_FMT_DOUBLE 5
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
56
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
57 #define LC_DEC_CAP (1<<0)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
58 #define MAIN_DEC_CAP (1<<1)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
59 #define LTP_DEC_CAP (1<<2)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
60 #define LD_DEC_CAP (1<<3)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
61 #define ERROR_RESILIENCE_CAP (1<<4)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
62 #define FIXED_POINT_CAP (1<<5)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
63
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
64 #define FRONT_CHANNEL_CENTER (1)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
65 #define FRONT_CHANNEL_LEFT (2)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
66 #define FRONT_CHANNEL_RIGHT (3)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
67 #define SIDE_CHANNEL_LEFT (4)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
68 #define SIDE_CHANNEL_RIGHT (5)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
69 #define BACK_CHANNEL_LEFT (6)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
70 #define BACK_CHANNEL_RIGHT (7)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
71 #define BACK_CHANNEL_CENTER (8)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
72 #define LFE_CHANNEL (9)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
73 #define UNKNOWN_CHANNEL (0)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
74
13453
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
75 char* NEAACDECAPI NeAACDecGetErrorMessage(uint8_t errcode);
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
76
13453
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
77 uint32_t NEAACDECAPI NeAACDecGetCapabilities(void);
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
78
13453
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
79 NeAACDecHandle NEAACDECAPI NeAACDecOpen(void);
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
80
13453
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
81 NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHandle hDecoder);
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
82
13453
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
83 uint8_t NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hDecoder,
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
84 NeAACDecConfigurationPtr config);
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
85
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
86 /* Init the library based on info from the AAC file (ADTS/ADIF) */
13453
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
87 int32_t NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder,
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
88 uint8_t *buffer,
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
89 uint32_t buffer_size,
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
90 uint32_t *samplerate,
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
91 uint8_t *channels);
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
92
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
93 /* Init the library using a DecoderSpecificInfo */
13453
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
94 int8_t NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, uint8_t *pBuffer,
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
95 uint32_t SizeOfDecoderSpecificInfo,
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
96 uint32_t *samplerate, uint8_t *channels);
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
97
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
98 /* Init the library for DRM */
13453
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
99 int8_t NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, uint32_t samplerate,
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
100 uint8_t channels);
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
101
13453
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
102 void NEAACDECAPI NeAACDecClose(NeAACDecHandle hDecoder);
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
103
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
104 void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hDecoder, int32_t frame);
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
105
13453
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
106 void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hDecoder,
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
107 NeAACDecFrameInfo *hInfo,
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
108 uint8_t *buffer,
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
109 uint32_t buffer_size);
10989
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
110
13453
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
111 void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hDecoder,
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
112 NeAACDecFrameInfo *hInfo,
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
113 uint8_t *buffer, uint32_t buffer_size,
6d50ef45a058 Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
diego
parents: 12625
diff changeset
114 void **sample_buffer, uint32_t sample_buffer_size);
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
115
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
116 #ifdef _WIN32
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
117 #pragma pack(pop)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
118 #endif
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
119
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
120 #ifdef __cplusplus
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
121 }
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
122 #endif
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
123 #endif