ref: 69cae32d20807f0cb1a994a53d42ecad17df8b04
parent: 3e138d4759da4df6e653263f5b9c2bdef929b279
author: stux <stux>
date: Sat Nov 15 03:13:42 EST 2003
added FaacEncGetVersion(), version 1.23.2, added myself to faacCopyright :-P, does vanity know no bound ;)
--- a/include/faac.h
+++ b/include/faac.h
@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: faac.h,v 1.30 2003/09/24 16:29:31 knik Exp $
+ * $Id: faac.h,v 1.31 2003/11/15 08:13:41 stux Exp $
*/
#ifndef _FAAC_H_
@@ -47,26 +47,48 @@
typedef void *faacEncHandle;
-faacEncConfigurationPtr FAACAPI faacEncGetCurrentConfiguration(faacEncHandle hEncoder);
-int FAACAPI faacEncSetConfiguration (faacEncHandle hEncoder, faacEncConfigurationPtr config);
+/*
+ Allows an application to get FAAC version info. This is intended
+ purely for informative purposes.
+
+ faac_version_string : if not NULL, will be "X.YY.Z"
+ faac_name_string : if not NULL, will be "X.YY.Z (DD/MM/YYYY)"
+ faac_copyright_string : if not NULL, will be the copyright string
-faacEncHandle FAACAPI faacEncOpen(unsigned long sampleRate,
- unsigned int numChannels,
- unsigned long *inputSamples,
- unsigned long *maxOutputBytes);
+ RETURNS : Current FAAC_CFG_VERSION (104)
+*/
+int FAACAPI faacEncGetVersion( char *faac_version_string,
+ char *faac_name_string,
+ char *faac_copyright_string );
-int FAACAPI faacEncGetDecoderSpecificInfo(faacEncHandle hEncoder,
- unsigned char** ppBuffer,
- unsigned long* pSizeOfDecoderSpecificInfo);
-int FAACAPI faacEncEncode(faacEncHandle hEncoder,
- int32_t *inputBuffer,
- unsigned int samplesInput,
- unsigned char *outputBuffer,
- unsigned int bufferSize
- );
+faacEncConfigurationPtr FAACAPI faacEncGetCurrentConfiguration( faacEncHandle hEncoder );
-int FAACAPI faacEncClose(faacEncHandle hEncoder);
+
+int FAACAPI faacEncSetConfiguration( faacEncHandle hEncoder,
+ faacEncConfigurationPtr config );
+
+
+faacEncHandle FAACAPI faacEncOpen( unsigned long sampleRate,
+ unsigned int numChannels,
+ unsigned long *inputSamples,
+ unsigned long *maxOutputBytes );
+
+
+int FAACAPI faacEncGetDecoderSpecificInfo( faacEncHandle hEncoder,
+ unsigned char** ppBuffer,
+ unsigned long* pSizeOfDecoderSpecificInfo );
+
+
+int FAACAPI faacEncEncode(faacEncHandle hEncoder,
+ int32_t *inputBuffer,
+ unsigned int samplesInput,
+ unsigned char *outputBuffer,
+ unsigned int bufferSize );
+
+
+int FAACAPI faacEncClose( faacEncHandle hEncoder );
+
#pragma pack(pop)
--- a/libfaac/frame.c
+++ b/libfaac/frame.c
@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: frame.c,v 1.51 2003/11/10 17:48:00 knik Exp $
+ * $Id: frame.c,v 1.52 2003/11/15 08:13:42 stux Exp $
*/
/*
@@ -53,6 +53,7 @@
"FAAC - Freeware Advanced Audio Coder (http://www.audiocoding.com/)\n"
" Portions Copyright (C) 2001 Menno Bakker\n"
" Portions Copyright (C) 2002,2003 Krzysztof Nikiel\n"
+ " Portions Copyright (C) 2003 Stuart Espey\n"
"This software is based on the ISO MPEG-4 reference source code.\n";
static const psymodellist_t psymodellist[] = {
@@ -64,6 +65,31 @@
static const int bwmax = 15000;
static const double bwfac = 0.45;
+/*
+ * Allows an application to get FAAC version info. This is intended
+ * purely for informative purposes.
+ *
+ * faac_version_string : if not NULL, will be "1.23.2"
+ * faac_name_string : if not NULL, will be "1.23.2 (Nov 15 2003)"
+ * faac_copyright_string : if not NULL, will be the copyright string
+ *
+ * RETURNS : FAAC_CFG_VERSION
+ */
+int FAACAPI faacEncGetVersion( char *faac_version_string, char *faac_name_string, char *faac_copyright_string )
+{
+ if( faac_version_string )
+ strcpy( faac_version_string, FAAC_VERSION );
+
+ if( faac_name_string )
+ strcpy( faac_name_string, libfaacName );
+
+ if( faac_copyright_string )
+ strcpy( faac_copyright_string, libCopyright );
+
+ return FAAC_CFG_VERSION;
+}
+
+
int FAACAPI faacEncGetDecoderSpecificInfo(faacEncHandle hEncoder,unsigned char** ppBuffer,unsigned long* pSizeOfDecoderSpecificInfo)
{
BitStream* pBitStream = NULL;
@@ -917,6 +943,9 @@
/*
$Log: frame.c,v $
+Revision 1.52 2003/11/15 08:13:42 stux
+added FaacEncGetVersion(), version 1.23.2, added myself to faacCopyright :-P, does vanity know no bound ;)
+
Revision 1.51 2003/11/10 17:48:00 knik
Allowed independent bitRate and bandWidth setting.
Small fixes.
--- a/libfaac/frame.h
+++ b/libfaac/frame.h
@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: frame.h,v 1.24 2003/10/12 14:29:54 knik Exp $
+ * $Id: frame.h,v 1.25 2003/11/15 08:13:42 stux Exp $
*/
#ifndef FRAME_H
@@ -121,6 +121,20 @@
/* output bits difference in average bitrate mode */
int bitDiff;
} faacEncStruct, *faacEncHandle;
+
+
+/*
+ Allows an application to get FAAC version info. This is intended
+ purely for informative purposes.
+
+ faac_version_string : if not NULL, will be "X.YY.Z"
+ faac_name_string : if not NULL, will be "X.YY.Z (DD/MM/YYYY)"
+ faac_copyright_string : if not NULL, will be the copyright string
+
+ RETURNS : Current FAAC_CFG_VERSION (104)
+*/
+
+int FAACAPI faacEncGetVersion( char *faac_version_string, char *faac_name_string, char *faac_copyright_string );
int FAACAPI faacEncGetDecoderSpecificInfo(faacEncHandle hEncoder,
unsigned char** ppBuffer,
--- a/libfaac/libfaac.def
+++ b/libfaac/libfaac.def
@@ -9,3 +9,4 @@
faacEncEncode @4
faacEncClose @5
faacEncGetDecoderSpecificInfo @6
+faacEncGetVersion @7
--- a/libfaac/version.h
+++ b/libfaac/version.h
@@ -1,6 +1,6 @@
#ifndef _VERSION_H_
#define _VERSION_H_
-#define FAAC_VERSION "1.23.1"
+#define FAAC_VERSION "1.23.2"
#endif