[MPlayer-dev-eng] [PATCH] make configure use the right faad.h

jb13 jb13 at gomerbud.com
Mon Oct 6 10:54:29 CEST 2003


anybody?

i have done some further checking, and the sed cmd only dosn't work on freebsd, so i'll complane to them about it. but the problem with configure using the wrong faad.h is still there.

On Fri, Sep 26, 2003 at 09:50:34AM -0700, jb13 wrote:
> On Fri, Sep 26, 2003 at 06:31:22PM +0200, Diego Biurrun wrote:
> > On Fri, Sep 26, 2003 at 09:26:48AM -0700, jb13 wrote:
> > > On Fri, Sep 26, 2003 at 06:02:19PM +0200, Diego Biurrun wrote:
> > > > jb13 schrieb:
> > > > >>this patch make's configure use the internal faad.h if their, else the 
> > > > >>system
> > > > >>one
> > > > 
> > > > What do you mean?  It works fine for me...
> > > 
> > > say if you have faad 1.1 installed in /usr/local/ but want to use mplayer's
> > > internal 2.0 RC1 for mplayer
> > 
> > Well, then you just type
> > 
> > ./configure
> > make
> 
> witch dosn't work, the problem is in the cc_check function call witch looks likethis
> 
> cc_check $_inc_extra ... $_inc_faad ...
> 
> witch expands to 
> 
> gcc   -I/usr/local/include   -L/usr/local/lib /tmp/mplayer-conf--93341.c -o /tmp
> /mplayer-conf--93341.o -I/home/jb13/src/mplayer/libfaad2 -lm
> 
> gcc uses a first match wins rule for header files. the version returned for the
> *internal* faad is
> 
> 1.1
> Result is: 1.1
> 
> put this faad.h in your /usr/local/include and try it your self
> > 
> > To use an external faad you have to compile with --enable-externalfaad.  By
> > default the internal version is used.
> > 
> > Diego
> > 
> > _______________________________________________
> > MPlayer-dev-eng mailing list
> > MPlayer-dev-eng at mplayerhq.hu
> > http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
> > 

> /*
> ** FAAD - Freeware Advanced Audio Decoder
> ** Copyright (C) 2002 M. Bakker
> **
> ** 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.
> **
> ** $Id: faad.h,v 1.9 2002/08/07 08:37:15 menno Exp $
> **/
> 
> #ifndef __AACDEC_H__
> #define __AACDEC_H__
> 
> #ifdef __cplusplus
> extern "C" {
> #endif /* __cplusplus */
> 
> #ifdef _WIN32
>   #pragma pack(push, 8)
>   #ifndef FAADAPI
>     #define FAADAPI __cdecl
>   #endif
> #else
>   #ifndef FAADAPI
>     #define FAADAPI
>   #endif
> #endif
> 
> #define FAAD2_VERSION "1.1"
> 
> #define MAIN 0
> #define LC   1
> #define SSR  2
> #define LTP  3
> #define ER_LC  17
> #define LD   23
> #define DRM_ER_LC   27 /* special object type for DRM */
> 
> #define FAAD_FMT_16BIT 1
> #define FAAD_FMT_24BIT 2
> #define FAAD_FMT_32BIT 3
> #define FAAD_FMT_FLOAT 4
> 
> /* A decode call can eat up to FAAD_MIN_STREAMSIZE octets per decoded channel,
>    so at least so much octets per channel should be available in this stream */
> #define FAAD_MIN_STREAMSIZE 768 /* 6144 bits/channel */
> 
> 
> typedef void *faacDecHandle;
> 
> 
> typedef struct faacDecConfiguration
> {
>     unsigned char defObjectType;
>     unsigned long defSampleRate;
>     unsigned char outputFormat;
> } faacDecConfiguration, *faacDecConfigurationPtr;
> 
> typedef struct faacDecFrameInfo
> {
>     unsigned long bytesconsumed;
>     unsigned long samples;
>     unsigned char channels;
>     unsigned char error;
> } faacDecFrameInfo;
> 
> unsigned char* FAADAPI faacDecGetErrorMessage(unsigned char errcode);
> 
> faacDecHandle FAADAPI faacDecOpen();
> 
> faacDecConfigurationPtr FAADAPI faacDecGetCurrentConfiguration(faacDecHandle hDecoder);
> 
> unsigned char FAADAPI faacDecSetConfiguration(faacDecHandle hDecoder,
>                                     faacDecConfigurationPtr config);
> 
> /* Init the library based on info from the AAC file (ADTS/ADIF) */
> long FAADAPI faacDecInit(faacDecHandle hDecoder,
>                         unsigned char *buffer,
>                         unsigned long *samplerate,
>                         unsigned char *channels);
> 
> /* Init the library using a DecoderSpecificInfo */
> char FAADAPI faacDecInit2(faacDecHandle hDecoder, unsigned char *pBuffer,
>                          unsigned long SizeOfDecoderSpecificInfo,
>                          unsigned long *samplerate, unsigned char *channels);
> 
> void FAADAPI faacDecClose(faacDecHandle hDecoder);
> 
> void* FAADAPI faacDecDecode(faacDecHandle hDecoder,
>                             faacDecFrameInfo *hInfo,
>                             unsigned char *buffer);
> 
> char FAADAPI AudioSpecificConfig(unsigned char *pBuffer,
>                                  unsigned long *samplerate,
>                                  unsigned char *channels,
>                                  unsigned char *sf_index,
>                                  unsigned char *object_type,
>                                  unsigned char *aacSectionDataResilienceFlag,
>                                  unsigned char *aacScalefactorDataResilienceFlag,
>                                  unsigned char *aacSpectralDataResilienceFlag,
>                                  unsigned char *frameLengthFlag);
> 
> #ifdef _WIN32
>   #pragma pack(pop)
> #endif
> 
> #ifdef __cplusplus
> }
> #endif /* __cplusplus */
> 
> #endif

> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng



More information about the MPlayer-dev-eng mailing list