2003-08-30 22:30:28 +00:00
|
|
|
|
/*
|
|
|
|
|
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
|
2004-06-02 22:59:04 +00:00
|
|
|
|
** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
|
2003-08-30 22:30:28 +00:00
|
|
|
|
**
|
|
|
|
|
** This program is free software; you can redistribute it and/or modify
|
|
|
|
|
** it under the terms of the GNU General Public License as published by
|
|
|
|
|
** the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
** (at your option) any later version.
|
|
|
|
|
**
|
|
|
|
|
** This program is distributed in the hope that it will be useful,
|
|
|
|
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
** GNU General Public License for more details.
|
|
|
|
|
**
|
|
|
|
|
** You should have received a copy of the GNU General Public License
|
|
|
|
|
** along with this program; if not, write to the Free Software
|
|
|
|
|
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
**
|
|
|
|
|
** Any non-GPL usage of this software or parts of this software is strictly
|
|
|
|
|
** forbidden.
|
|
|
|
|
**
|
|
|
|
|
** Commercial non-GPL licensing of this software is possible.
|
|
|
|
|
** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
|
|
|
|
|
**
|
2004-06-23 13:50:53 +00:00
|
|
|
|
** Initially modified for use with MPlayer by Arpad Gere<EFBFBD>ffy on 2003/08/30
|
2004-09-24 17:31:36 +00:00
|
|
|
|
** $Id: decoder.h,v 1.4 2004/06/23 13:50:49 diego Exp $
|
2004-06-23 13:50:53 +00:00
|
|
|
|
** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
|
2003-08-30 22:30:28 +00:00
|
|
|
|
**/
|
|
|
|
|
|
|
|
|
|
#ifndef __DECODER_H__
|
|
|
|
|
#define __DECODER_H__
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
#pragma pack(push, 8)
|
2004-09-24 17:31:36 +00:00
|
|
|
|
#ifndef NEAACDECAPI
|
|
|
|
|
#define NEAACDECAPI __cdecl
|
2003-08-30 22:30:28 +00:00
|
|
|
|
#endif
|
|
|
|
|
#else
|
2004-09-24 17:31:36 +00:00
|
|
|
|
#ifndef NEAACDECAPI
|
|
|
|
|
#define NEAACDECAPI
|
2003-08-30 22:30:28 +00:00
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* library output formats */
|
|
|
|
|
#define FAAD_FMT_16BIT 1
|
|
|
|
|
#define FAAD_FMT_24BIT 2
|
|
|
|
|
#define FAAD_FMT_32BIT 3
|
|
|
|
|
#define FAAD_FMT_FLOAT 4
|
2004-09-24 17:31:36 +00:00
|
|
|
|
#define FAAD_FMT_FIXED FAAD_FMT_FLOAT
|
2003-08-30 22:30:28 +00:00
|
|
|
|
#define FAAD_FMT_DOUBLE 5
|
|
|
|
|
|
|
|
|
|
#define LC_DEC_CAP (1<<0)
|
|
|
|
|
#define MAIN_DEC_CAP (1<<1)
|
|
|
|
|
#define LTP_DEC_CAP (1<<2)
|
|
|
|
|
#define LD_DEC_CAP (1<<3)
|
|
|
|
|
#define ERROR_RESILIENCE_CAP (1<<4)
|
|
|
|
|
#define FIXED_POINT_CAP (1<<5)
|
|
|
|
|
|
|
|
|
|
#define FRONT_CHANNEL_CENTER (1)
|
|
|
|
|
#define FRONT_CHANNEL_LEFT (2)
|
|
|
|
|
#define FRONT_CHANNEL_RIGHT (3)
|
|
|
|
|
#define SIDE_CHANNEL_LEFT (4)
|
|
|
|
|
#define SIDE_CHANNEL_RIGHT (5)
|
|
|
|
|
#define BACK_CHANNEL_LEFT (6)
|
|
|
|
|
#define BACK_CHANNEL_RIGHT (7)
|
|
|
|
|
#define BACK_CHANNEL_CENTER (8)
|
|
|
|
|
#define LFE_CHANNEL (9)
|
|
|
|
|
#define UNKNOWN_CHANNEL (0)
|
|
|
|
|
|
2004-09-24 17:31:36 +00:00
|
|
|
|
char* NEAACDECAPI NeAACDecGetErrorMessage(uint8_t errcode);
|
2003-08-30 22:30:28 +00:00
|
|
|
|
|
2004-09-24 17:31:36 +00:00
|
|
|
|
uint32_t NEAACDECAPI NeAACDecGetCapabilities(void);
|
2003-08-30 22:30:28 +00:00
|
|
|
|
|
2004-09-24 17:31:36 +00:00
|
|
|
|
NeAACDecHandle NEAACDECAPI NeAACDecOpen(void);
|
2003-08-30 22:30:28 +00:00
|
|
|
|
|
2004-09-24 17:31:36 +00:00
|
|
|
|
NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHandle hDecoder);
|
2003-08-30 22:30:28 +00:00
|
|
|
|
|
2004-09-24 17:31:36 +00:00
|
|
|
|
uint8_t NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hDecoder,
|
|
|
|
|
NeAACDecConfigurationPtr config);
|
2003-08-30 22:30:28 +00:00
|
|
|
|
|
|
|
|
|
/* Init the library based on info from the AAC file (ADTS/ADIF) */
|
2004-09-24 17:31:36 +00:00
|
|
|
|
int32_t NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder,
|
|
|
|
|
uint8_t *buffer,
|
|
|
|
|
uint32_t buffer_size,
|
|
|
|
|
uint32_t *samplerate,
|
|
|
|
|
uint8_t *channels);
|
2003-08-30 22:30:28 +00:00
|
|
|
|
|
|
|
|
|
/* Init the library using a DecoderSpecificInfo */
|
2004-09-24 17:31:36 +00:00
|
|
|
|
int8_t NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, uint8_t *pBuffer,
|
|
|
|
|
uint32_t SizeOfDecoderSpecificInfo,
|
|
|
|
|
uint32_t *samplerate, uint8_t *channels);
|
2003-08-30 22:30:28 +00:00
|
|
|
|
|
|
|
|
|
/* Init the library for DRM */
|
2004-09-24 17:31:36 +00:00
|
|
|
|
int8_t NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, uint32_t samplerate,
|
|
|
|
|
uint8_t channels);
|
|
|
|
|
|
|
|
|
|
void NEAACDECAPI NeAACDecClose(NeAACDecHandle hDecoder);
|
2003-08-30 22:30:28 +00:00
|
|
|
|
|
2004-09-24 17:31:36 +00:00
|
|
|
|
void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hDecoder, int32_t frame);
|
2003-08-30 22:30:28 +00:00
|
|
|
|
|
2004-09-24 17:31:36 +00:00
|
|
|
|
void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hDecoder,
|
|
|
|
|
NeAACDecFrameInfo *hInfo,
|
|
|
|
|
uint8_t *buffer,
|
|
|
|
|
uint32_t buffer_size);
|
2003-10-03 22:23:26 +00:00
|
|
|
|
|
2004-09-24 17:31:36 +00:00
|
|
|
|
void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hDecoder,
|
|
|
|
|
NeAACDecFrameInfo *hInfo,
|
|
|
|
|
uint8_t *buffer, uint32_t buffer_size,
|
|
|
|
|
void **sample_buffer, uint32_t sample_buffer_size);
|
2003-08-30 22:30:28 +00:00
|
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
#pragma pack(pop)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|