00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef __DECODER_H__
00034 #define __DECODER_H__
00035
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039
00040 #ifdef _WIN32
00041 #pragma pack(push, 8)
00042 #ifndef NEAACDECAPI
00043 #define NEAACDECAPI __cdecl
00044 #endif
00045 #else
00046 #ifndef NEAACDECAPI
00047 #define NEAACDECAPI
00048 #endif
00049 #endif
00050
00051
00052
00053 #define FAAD_FMT_16BIT 1
00054 #define FAAD_FMT_24BIT 2
00055 #define FAAD_FMT_32BIT 3
00056 #define FAAD_FMT_FLOAT 4
00057 #define FAAD_FMT_FIXED FAAD_FMT_FLOAT
00058 #define FAAD_FMT_DOUBLE 5
00059
00060 #define LC_DEC_CAP (1<<0)
00061 #define MAIN_DEC_CAP (1<<1)
00062 #define LTP_DEC_CAP (1<<2)
00063 #define LD_DEC_CAP (1<<3)
00064 #define ERROR_RESILIENCE_CAP (1<<4)
00065 #define FIXED_POINT_CAP (1<<5)
00066
00067 #define FRONT_CHANNEL_CENTER (1)
00068 #define FRONT_CHANNEL_LEFT (2)
00069 #define FRONT_CHANNEL_RIGHT (3)
00070 #define SIDE_CHANNEL_LEFT (4)
00071 #define SIDE_CHANNEL_RIGHT (5)
00072 #define BACK_CHANNEL_LEFT (6)
00073 #define BACK_CHANNEL_RIGHT (7)
00074 #define BACK_CHANNEL_CENTER (8)
00075 #define LFE_CHANNEL (9)
00076 #define UNKNOWN_CHANNEL (0)
00077
00078 char* NEAACDECAPI NeAACDecGetErrorMessage(uint8_t errcode);
00079
00080 uint32_t NEAACDECAPI NeAACDecGetCapabilities(void);
00081
00082 NeAACDecHandle NEAACDECAPI NeAACDecOpen(void);
00083
00084 NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHandle hDecoder);
00085
00086 uint8_t NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hDecoder,
00087 NeAACDecConfigurationPtr config);
00088
00089
00090 int32_t NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder,
00091 uint8_t *buffer,
00092 uint32_t buffer_size,
00093 uint32_t *samplerate,
00094 uint8_t *channels);
00095
00096
00097 int8_t NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, uint8_t *pBuffer,
00098 uint32_t SizeOfDecoderSpecificInfo,
00099 uint32_t *samplerate, uint8_t *channels);
00100
00101
00102 int8_t NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, uint32_t samplerate,
00103 uint8_t channels);
00104
00105 void NEAACDECAPI NeAACDecClose(NeAACDecHandle hDecoder);
00106
00107 void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hDecoder, int32_t frame);
00108
00109 void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hDecoder,
00110 NeAACDecFrameInfo *hInfo,
00111 uint8_t *buffer,
00112 uint32_t buffer_size);
00113
00114 void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hDecoder,
00115 NeAACDecFrameInfo *hInfo,
00116 uint8_t *buffer, uint32_t buffer_size,
00117 void **sample_buffer, uint32_t sample_buffer_size);
00118
00119 #ifdef _WIN32
00120 #pragma pack(pop)
00121 #endif
00122
00123 #ifdef __cplusplus
00124 }
00125 #endif
00126 #endif