- Main Page
- Namespaces
- Classes
- Files
- Directories

- File List
- File Members

# decoder.h

    00001 /*
    00002 ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
    00003 ** Copyright (C) 2003-2005 M. Bakker, Ahead Software AG, http://www.nero.com
    00004 **
    00005 ** This program is free software; you can redistribute it and/or modify
    00006 ** it under the terms of the GNU General Public License as published by
    00007 ** the Free Software Foundation; either version 2 of the License, or
    00008 ** (at your option) any later version.
    00009 **
    00010 ** This program is distributed in the hope that it will be useful,
    00011 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00013 ** GNU General Public License for more details.
    00014 **
    00015 ** You should have received a copy of the GNU General Public License
    00016 ** along with this program; if not, write to the Free Software
    00017 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    00018 **
    00019 ** Any non-GPL usage of this software or parts of this software is strictly
    00020 ** forbidden.
    00021 **
    00022 ** Software using this code must display the following message visibly in the
    00023 ** software:
    00024 ** "FAAD2 AAC/HE-AAC/HE-AACv2/DRM decoder (c) Ahead Software, www.nero.com"
    00025 ** in, for example, the about-box or help/startup screen.
    00026 **
    00027 ** Commercial non-GPL licensing of this software is possible.
    00028 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
    00029 **
    00030 ** $Id: decoder.h,v 1.2 2005/11/01 21:41:43 gabest Exp $
    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 /* library output formats */
    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 /* Init the library based on info from the AAC file (ADTS/ADIF) */
    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 /* Init the library using a DecoderSpecificInfo */
    00097 int8_t NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, uint8_t *pBuffer,
    00098                                  uint32_t SizeOfDecoderSpecificInfo,
    00099                                  uint32_t *samplerate, uint8_t *channels);
    00100
    00101 /* Init the library for DRM */
    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