ad8a707fdf
libfaad uses data types with machine dependent bit width in prototypes in its public headers, but in the corresponding library code, machine independent exact width data types are used. solution: change libfaad headers to use the same machine independent exact width data types in the prototypes as in the library. since the prototypes in the library headers are changed, users of libfaad likely need to be modified to use exact width data types as well. also: - bump libfaad major version number - update plugin code to use exact width data types for libfaad interaction, as per new prototypes - bump package version - sync patches with update-patches problem discovered by, solution discussed with, reviewed, tested and OK naddy@
167 lines
5.8 KiB
Plaintext
167 lines
5.8 KiB
Plaintext
$OpenBSD: patch-include_faad_h,v 1.1 2007/06/29 06:01:42 jakemsr Exp $
|
|
--- include/faad.h.orig Fri Feb 6 02:23:28 2004
|
|
+++ include/faad.h Thu May 31 15:17:35 2007
|
|
@@ -43,6 +43,10 @@ extern "C" {
|
|
#endif
|
|
#endif
|
|
|
|
+/* needed for standard integer types */
|
|
+#define __STDC_LIMIT_MACROS
|
|
+#include <stdint.h>
|
|
+
|
|
#define FAAD2_VERSION "2.0 "
|
|
|
|
/* object types for AAC */
|
|
@@ -112,99 +116,99 @@ typedef void *faacDecHandle;
|
|
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;
|
|
+ uint32_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);
|
|
+int32_t FAADAPI faacDecInit(faacDecHandle hDecoder,
|
|
+ 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);
|
|
+void FAADAPI faacDecPostSeekReset(faacDecHandle hDecoder, int32_t frame);
|
|
|
|
void FAADAPI faacDecClose(faacDecHandle hDecoder);
|
|
|
|
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)
|