diff options
author | Olivier Crête <tester@gentoo.org> | 2005-05-12 23:43:26 +0000 |
---|---|---|
committer | Olivier Crête <tester@gentoo.org> | 2005-05-12 23:43:26 +0000 |
commit | 03d09a3cf1aec25fd8a5831f7d31e36bbab3284e (patch) | |
tree | 5d83dcff6a06d4eb01cd0caaa5a406a5e8dea7bf /media-libs/faad2 | |
parent | version bump (diff) | |
download | gentoo-2-03d09a3cf1aec25fd8a5831f7d31e36bbab3284e.tar.gz gentoo-2-03d09a3cf1aec25fd8a5831f7d31e36bbab3284e.tar.bz2 gentoo-2-03d09a3cf1aec25fd8a5831f7d31e36bbab3284e.zip |
put back in patch to fix faad2 on amd64
(Portage version: 2.0.51.19)
Diffstat (limited to 'media-libs/faad2')
-rw-r--r-- | media-libs/faad2/ChangeLog | 6 | ||||
-rw-r--r-- | media-libs/faad2/faad2-2.0-r6.ebuild | 5 | ||||
-rw-r--r-- | media-libs/faad2/files/faad2-2.0-amd64.patch | 285 |
3 files changed, 294 insertions, 2 deletions
diff --git a/media-libs/faad2/ChangeLog b/media-libs/faad2/ChangeLog index 7bb257e54265..61a9ef4b1829 100644 --- a/media-libs/faad2/ChangeLog +++ b/media-libs/faad2/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-libs/faad2 # Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/faad2/ChangeLog,v 1.45 2005/05/05 11:49:26 luckyduck Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/faad2/ChangeLog,v 1.46 2005/05/12 23:43:26 tester Exp $ + + 12 May 2005; Olivier Crête <tester@gentoo.org> + +files/faad2-2.0-amd64.patch, faad2-2.0-r6.ebuild: + Put fixed patch back in, thanks to Tyler Montbriand <tsm@accesscomm.ca> *faad2-2.0-r6 (05 May 2005) diff --git a/media-libs/faad2/faad2-2.0-r6.ebuild b/media-libs/faad2/faad2-2.0-r6.ebuild index 494cefa42da9..434e66a20331 100644 --- a/media-libs/faad2/faad2-2.0-r6.ebuild +++ b/media-libs/faad2/faad2-2.0-r6.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/faad2/faad2-2.0-r6.ebuild,v 1.1 2005/05/05 11:49:26 luckyduck Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/faad2/faad2-2.0-r6.ebuild,v 1.2 2005/05/12 23:43:26 tester Exp $ inherit eutils libtool flag-o-matic @@ -40,6 +40,9 @@ src_unpack() { cd ${S}/plugins/xmms/src epatch ${FILESDIR}/${P}-noext.patch + cd ${S} + epatch ${FILESDIR}/${P}-amd64.patch + # Get the xmms plugin to behave cd ${S} elibtoolize diff --git a/media-libs/faad2/files/faad2-2.0-amd64.patch b/media-libs/faad2/files/faad2-2.0-amd64.patch new file mode 100644 index 000000000000..e80c865ad57b --- /dev/null +++ b/media-libs/faad2/files/faad2-2.0-amd64.patch @@ -0,0 +1,285 @@ +diff -ur faad2/include/faad.h faad2-patch/include/faad.h +--- faad2/include/faad.h 2004-02-06 04:23:28.000000000 -0600 ++++ faad2-patch/include/faad.h 2005-05-10 10:58:39.000000000 -0600 +@@ -43,6 +43,10 @@ + #endif + #endif + ++/* needed for standard integer types */ ++#define __STDC_LIMIT_MACROS ++#include <stdint.h> ++ + #define FAAD2_VERSION "2.0 " + + /* object types for AAC */ +@@ -112,86 +116,86 @@ + typedef struct mp4AudioSpecificConfig + { + /* Audio Specific Info */ +- unsigned char objectTypeIndex; +- unsigned char samplingFrequencyIndex; +- unsigned long samplingFrequency; +- unsigned char channelsConfiguration; ++ uint8_t objectTypeIndex; ++ uint8_t samplingFrequencyIndex; ++ uint32_t samplingFrequency; ++ uint8_t channelsConfiguration; + + /* GA Specific Info */ +- unsigned char frameLengthFlag; +- unsigned char dependsOnCoreCoder; +- unsigned short coreCoderDelay; +- unsigned char extensionFlag; +- unsigned char aacSectionDataResilienceFlag; +- unsigned char aacScalefactorDataResilienceFlag; +- unsigned char aacSpectralDataResilienceFlag; +- unsigned char epConfig; ++ uint8_t frameLengthFlag; ++ uint8_t dependsOnCoreCoder; ++ uint16_t coreCoderDelay; ++ uint8_t extensionFlag; ++ uint8_t aacSectionDataResilienceFlag; ++ uint8_t aacScalefactorDataResilienceFlag; ++ uint8_t aacSpectralDataResilienceFlag; ++ uint8_t epConfig; + +- char sbr_present_flag; +- char forceUpSampling; ++ int8_t sbr_present_flag; ++ int8_t forceUpSampling; + } mp4AudioSpecificConfig; + + typedef struct faacDecConfiguration + { +- unsigned char defObjectType; +- unsigned long defSampleRate; +- unsigned char outputFormat; +- unsigned char downMatrix; +- unsigned char useOldADTSFormat; +- unsigned char dontUpSampleImplicitSBR; ++ uint8_t defObjectType; ++ uint8_t defSampleRate; ++ uint8_t outputFormat; ++ uint8_t downMatrix; ++ uint8_t useOldADTSFormat; ++ uint8_t dontUpSampleImplicitSBR; + } faacDecConfiguration, *faacDecConfigurationPtr; + + typedef struct faacDecFrameInfo + { +- unsigned long bytesconsumed; +- unsigned long samples; +- unsigned char channels; +- unsigned char error; +- unsigned long samplerate; ++ uint32_t bytesconsumed; ++ uint32_t samples; ++ uint8_t channels; ++ uint8_t error; ++ uint32_t samplerate; + + /* SBR: 0: off, 1: on; upsample, 2: on; downsampled, 3: off; upsampled */ +- unsigned char sbr; ++ uint8_t sbr; + + /* MPEG-4 ObjectType */ +- unsigned char object_type; ++ uint8_t object_type; + + /* AAC header type; MP4 will be signalled as RAW also */ +- unsigned char header_type; ++ uint8_t header_type; + + /* multichannel configuration */ +- unsigned char num_front_channels; +- unsigned char num_side_channels; +- unsigned char num_back_channels; +- unsigned char num_lfe_channels; +- unsigned char channel_position[64]; ++ uint8_t num_front_channels; ++ uint8_t num_side_channels; ++ uint8_t num_back_channels; ++ uint8_t num_lfe_channels; ++ uint8_t channel_position[64]; + } faacDecFrameInfo; + +-char* FAADAPI faacDecGetErrorMessage(unsigned char errcode); ++int8_t* FAADAPI faacDecGetErrorMessage(uint8_t errcode); + +-unsigned long FAADAPI faacDecGetCapabilities(void); ++uint32_t FAADAPI faacDecGetCapabilities(void); + + faacDecHandle FAADAPI faacDecOpen(void); + + faacDecConfigurationPtr FAADAPI faacDecGetCurrentConfiguration(faacDecHandle hDecoder); + +-unsigned char FAADAPI faacDecSetConfiguration(faacDecHandle hDecoder, ++uint8_t 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 buffer_size, +- unsigned long *samplerate, +- unsigned char *channels); ++ uint8_t *buffer, ++ uint32_t buffer_size, ++ uint32_t *samplerate, ++ uint8_t *channels); + + /* Init the library using a DecoderSpecificInfo */ +-char FAADAPI faacDecInit2(faacDecHandle hDecoder, unsigned char *pBuffer, +- unsigned long SizeOfDecoderSpecificInfo, +- unsigned long *samplerate, unsigned char *channels); ++int8_t FAADAPI faacDecInit2(faacDecHandle hDecoder, uint8_t *pBuffer, ++ uint32_t SizeOfDecoderSpecificInfo, ++ uint32_t *samplerate, uint8_t *channels); + + /* Init the library for DRM */ +-char FAADAPI faacDecInitDRM(faacDecHandle hDecoder, unsigned long samplerate, +- unsigned char channels); ++int8_t FAADAPI faacDecInitDRM(faacDecHandle hDecoder, uint32_t samplerate, ++ uint8_t channels); + + void FAADAPI faacDecPostSeekReset(faacDecHandle hDecoder, long frame); + +@@ -199,12 +203,12 @@ + + void* FAADAPI faacDecDecode(faacDecHandle hDecoder, + faacDecFrameInfo *hInfo, +- unsigned char *buffer, +- unsigned long buffer_size); ++ uint8_t *buffer, ++ uint32_t buffer_size); + +-char FAADAPI AudioSpecificConfig(unsigned char *pBuffer, +- unsigned long buffer_size, +- mp4AudioSpecificConfig *mp4ASC); ++int8_t FAADAPI AudioSpecificConfig(uint8_t *pBuffer, ++ uint32_t buffer_size, ++ mp4AudioSpecificConfig *mp4ASC); + + #ifdef _WIN32 + #pragma pack(pop) +diff -ur faad2/libfaad/common.h faad2-patch/libfaad/common.h +--- faad2/libfaad/common.h 2004-02-06 06:55:24.000000000 -0600 ++++ faad2-patch/libfaad/common.h 2005-05-10 10:45:41.000000000 -0600 +@@ -197,8 +197,16 @@ + #else + # if HAVE_STDINT_H + # include <stdint.h> +-# else +-/* we need these... */ ++# elif defined(__x86_64__) ++typedef unsigned long uint64_t; ++typedef unsigned int uint32_t; ++typedef unsigned short uint16_t; ++typedef unsigned char uint8_t; ++typedef long int64_t; ++typedef int int32_t; ++typedef short int16_t; ++typedef char int8_t; ++#else + typedef unsigned long long uint64_t; + typedef unsigned long uint32_t; + typedef unsigned short uint16_t; +diff -ur faad2/plugins/mpeg4ip/aa_file.cpp faad2-patch/plugins/mpeg4ip/aa_file.cpp +--- faad2/plugins/mpeg4ip/aa_file.cpp 2004-01-05 08:05:12.000000000 -0600 ++++ faad2-patch/plugins/mpeg4ip/aa_file.cpp 2005-05-10 10:58:04.000000000 -0600 +@@ -56,8 +56,8 @@ + aac->m_buffer_size_max, + aac->m_ifile); + +- unsigned long freq; +- unsigned char chans; ++ uint32_t freq; ++ uint8_t chans; + + faacDecInit(aac->m_info, (unsigned char *)aac->m_buffer, + aac->m_buffer_size, &freq, &chans); +diff -ur faad2/plugins/mpeg4ip/faad2.cpp faad2-patch/plugins/mpeg4ip/faad2.cpp +--- faad2/plugins/mpeg4ip/faad2.cpp 2004-01-05 08:05:12.000000000 -0600 ++++ faad2-patch/plugins/mpeg4ip/faad2.cpp 2005-05-10 10:54:29.000000000 -0600 +@@ -76,8 +76,8 @@ + } + + aac->m_info = faacDecOpen(); +- unsigned long srate; +- unsigned char chan; ++ uint32_t srate; ++ uint8_t chan; + if ((userdata == NULL && fmtp == NULL) || + (faacDecInit2(aac->m_info, + (uint8_t *)userdata, +@@ -156,7 +156,7 @@ + void *userdata) + { + aac_codec_t *aac = (aac_codec_t *)ptr; +- unsigned long bytes_consummed; ++ uint32_t bytes_consummed; + int bits = -1; + // struct timezone tz; + +@@ -188,8 +188,8 @@ + * If not initialized, do so. + */ + abort(); +- unsigned long freq; +- unsigned char chans; ++ uint32_t freq; ++ uint8_t chans; + + faacDecInit(aac->m_info, + (unsigned char *)buffer, +@@ -202,7 +202,7 @@ + } + + uint8_t *buff; +- unsigned long samples; ++ uint32_t samples; + bytes_consummed = buflen; + //aa_message(LOG_DEBUG, aaclib, "decoding %d bits", buflen * 8); + faacDecFrameInfo frame_info; +@@ -237,7 +237,7 @@ + aac->m_vft->audio_configure(aac->m_ifptr, + aac->m_freq, + aac->m_chans, +- AUDIO_S16SYS, ++ AUDIO_FMT_S16, + aac->m_output_frame_size); + uint8_t *now = aac->m_vft->audio_get_buffer(aac->m_ifptr); + aac->m_audio_inited = 1; +diff -ur faad2/plugins/xmms/src/libmp4.c faad2-patch/plugins/xmms/src/libmp4.c +--- faad2/plugins/xmms/src/libmp4.c 2005-05-10 11:02:04.000000000 -0600 ++++ faad2-patch/plugins/xmms/src/libmp4.c 2005-05-10 10:57:36.000000000 -0600 +@@ -22,6 +22,9 @@ + #define MP4_ABOUT "Written by ciberfred" + #define BUFFER_SIZE FAAD_MIN_STREAMSIZE*64 + ++extern void getMP4info(char* file); ++extern int getAACTrack(MP4FileHandle file); ++ + static void mp4_init(void); + static void mp4_about(void); + static void mp4_play(char *); +@@ -116,14 +119,12 @@ + + extention = strrchr(filename, '.'); + +- if (extention && +- (!strcasecmp(extention, ".mp4") || // official extention +- !strcasecmp(extention, ".m4a") || // Apple mp4 extention +- !strcasecmp(extention, ".aac") // old MPEG2/4-AAC extention ++ if (extention) ++ if( (!strcasecmp(extention, ".mp4") || // official extention ++ !strcasecmp(extention, ".m4a") || // Apple mp4 extention ++ !strcasecmp(extention, ".aac") // old MPEG2/4-AAC extention + )) +- { +- return (1); +- } ++ return (1); + } + return(0); + } |