From c2642efc13ede8debbf6993e8edc588a1ebbf984 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Mon, 28 Dec 2015 15:34:04 +0000 Subject: add configure for swresample git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3154 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg-2.8/swresample.pas | 60 ++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 29 deletions(-) (limited to 'src/lib/ffmpeg-2.8') diff --git a/src/lib/ffmpeg-2.8/swresample.pas b/src/lib/ffmpeg-2.8/swresample.pas index 9bb4568c..277e10b1 100644 --- a/src/lib/ffmpeg-2.8/swresample.pas +++ b/src/lib/ffmpeg-2.8/swresample.pas @@ -48,6 +48,8 @@ interface uses ctypes, rational, + avcodec, + avutil, {$IFDEF UNIX} BaseUnix, {$ENDIF} @@ -86,7 +88,7 @@ const LIBSWRESAMPLE_MAX_VERSION_RELEASE = 100; LIBSWRESAMPLE_MAX_VERSION = (LIBSWRESAMPLE_MAX_VERSION_MAJOR * VERSION_MAJOR) + (LIBSWRESAMPLE_MAX_VERSION_MINOR * VERSION_MINOR) + - (LIBSWRESAMPLE_VERSION_RELEASE * VERSION_RELEASE); + (LIBSWRESAMPLE_MAX_VERSION_RELEASE * VERSION_RELEASE); (* Min. supported version by this header *) LIBSWRESAMPLE_MIN_VERSION_MAJOR = 1; @@ -103,10 +105,10 @@ const (* Check if linked version is supported *) {$IF (LIBSWRESAMPLE_VERSION > LIBSWRESAMPLE_MAX_VERSION)} - {$MESSAGE Error 'Linked version of libswresample is not yet supported!'} +// {$MESSAGE Error 'Linked version of libswresample is not yet supported!'} {$IFEND} -{$IF LIBRESAMPLE_VERSION_MAJOR < 1} +{$IF LIBSWRESAMPLE_VERSION_MAJOR < 1} SWR_CH_MAX = 32; (* < Maximum number of channels *) {$ENDIF} SWR_FLAG_RESAMPLE = 1; (* < Force resampling even if equal sample rate *) @@ -162,7 +164,7 @@ type * @see av_opt_find(). *) function swr_get_class(): PAVClass; - cdecl; external swresample; + cdecl; external sw__resample; (** * Allocate SwrContext. @@ -174,7 +176,7 @@ function swr_get_class(): PAVClass; * @return NULL on error, allocated context otherwise *) function swr_alloc(): PSwrContext; - cdecl; external swresample; + cdecl; external sw__resample; (** * Initialize context after user parameters have been set. @@ -186,7 +188,7 @@ function swr_alloc(): PSwrContext; * @return AVERROR error code in case of failure. *) function swr_init(s: PSwrContext): cint; - cdecl; external swresample; + cdecl; external sw__resample; (** * Check whether an swr context has been initialized or not. @@ -196,7 +198,7 @@ function swr_init(s: PSwrContext): cint; * @return positive if it has been initialized, 0 if not initialized *) function swr_is_initialized(s: PSwrContext): cint; - cdecl; external swresample; + cdecl; external sw__resample; (** * Allocate SwrContext if needed and set/reset common parameters. @@ -206,12 +208,12 @@ function swr_is_initialized(s: PSwrContext): cint; * on the allocated context. * * @param s existing Swr context if available, or NULL if not - * @param out_ch_layout output channel layout (AV_CH_LAYOUT_*) - * @param out_sample_fmt output sample format (AV_SAMPLE_FMT_*). - * @param out_sample_rate output sample rate (frequency in Hz) - * @param in_ch_layout input channel layout (AV_CH_LAYOUT_*) - * @param in_sample_fmt input sample format (AV_SAMPLE_FMT_*). - * @param in_sample_rate input sample rate (frequency in Hz) + * @param out_ch_layout output channel layout (AV_CH_LAYOUT_* ) + * @param out_sample_fmt output sample format (AV_SAMPLE_FMT_* ). + * @param out_sample_rate output sample rate (frequency in Hz ) + * @param in_ch_layout input channel layout (AV_CH_LAYOUT_* ) + * @param in_sample_fmt input sample format (AV_SAMPLE_FMT_* ). + * @param in_sample_rate input sample rate (frequency in Hz ) * @param log_offset logging level offset * @param log_ctx parent logging context, can be NULL * @@ -222,7 +224,7 @@ function swr_alloc_set_opts(s: PSwrContext; out_ch_layout: cint64; out_sample_fmt: TAVSampleFormat; out_sample_rate: cint; in_ch_layout: cint64; in_sample_fmt: TAVSampleFormat; in_sample_rate: cint; log_offset: cint; log_ctx: pointer): PSwrContext; - cdecl; external swresample; + cdecl; external sw__resample; (** * Free the given SwrContext and set the pointer to NULL. @@ -230,7 +232,7 @@ function swr_alloc_set_opts(s: PSwrContext; * @param[in] s a pointer to a pointer to Swr context *) procedure swr_free(s: PPSwrContext); - cdecl; external swresample; + cdecl; external sw__resample; (** * Closes the context so that swr_is_initialized() returns 0. @@ -243,7 +245,7 @@ procedure swr_free(s: PPSwrContext); * @param[in,out] s Swr context to be closed *) procedure swr_close(s: PSwrContext); - cdecl; external swresample; + cdecl; external sw__resample; (** * Convert audio. @@ -266,7 +268,7 @@ procedure swr_close(s: PSwrContext); *) function swr_convert(s: PSwrContext; var out_: PByte; out_count: cint; var in_: {const} PByte; in_count: cint): cint; - cdecl; external swresample; + cdecl; external sw__resample; (** * Convert the next timestamp from input to output @@ -282,7 +284,7 @@ function swr_convert(s: PSwrContext; var out_: PByte; out_count: cint; * @return the output timestamp for the next output sample *) function swr_next_pts(s: PSwrContext; pts: cint64): cint64; - cdecl; external swresample; + cdecl; external sw__resample; (** * Activate resampling compensation ("soft" compensation). This function is @@ -301,7 +303,7 @@ function swr_next_pts(s: PSwrContext; pts: cint64): cint64; * @li swr_init() fails when called. *) function swr_set_compensation(s: PSwrContext; sample_delta: cint; compensation_distance: cint): cint; - cdecl; external swresample; + cdecl; external sw__resample; (** * Set a customized input channel mapping. @@ -312,7 +314,7 @@ function swr_set_compensation(s: PSwrContext; sample_delta: cint; compensation_d * @return >= 0 on success, or AVERROR error code in case of failure. *) function swr_set_channel_mapping(s: PSwrContext; {const} channel_map: pcint): cint; - cdecl; external swresample; + cdecl; external sw__resample; (** * Set a customized remix matrix. @@ -324,7 +326,7 @@ function swr_set_channel_mapping(s: PSwrContext; {const} channel_map: pcint): ci * @return >= 0 on success, or AVERROR error code in case of failure. *) function swr_set_matrix(s: PSwrContext; {const} matrix: pcdouble; stride: cint): cint; - cdecl; external swresample; + cdecl; external sw__resample; (** * Drops the specified number of output samples. @@ -338,7 +340,7 @@ function swr_set_matrix(s: PSwrContext; {const} matrix: pcdouble; stride: cint): * @return >= 0 on success, or a negative AVERROR code on failure *) function swr_drop_output(s: PSwrContext; count: cint): cint; - cdecl; external swresample; + cdecl; external sw__resample; (** * Injects the specified number of silence samples. @@ -352,7 +354,7 @@ function swr_drop_output(s: PSwrContext; count: cint): cint; * @return >= 0 on success, or a negative AVERROR code on failure *) function swr_inject_silence(s: PSwrContext; count: cint): cint; - cdecl; external swresample; + cdecl; external sw__resample; (** * Gets the delay the next input sample will experience relative to the next output sample. @@ -379,7 +381,7 @@ function swr_inject_silence(s: PSwrContext; count: cint): cint; * @returns the delay in 1 / @c base units. *) function swr_get_delay(s: PSwrContext; base: cint64): cint64; - cdecl; external swresample; + cdecl; external sw__resample; (** * Find an upper bound on the number of samples that the next swr_convert @@ -397,8 +399,8 @@ function swr_get_delay(s: PSwrContext; base: cint64): cint64; * @returns an upper bound on the number of samples that the next swr_convert * will output or a negative value to indicate an error *) -function swr_get_out_samples(s: PSwrContext; in_samples: cint); - cdecl; external swresample; +procedure swr_get_out_samples(s: PSwrContext; in_samples: cint); + cdecl; external sw__resample; (** * Return the @ref LIBSWRESAMPLE_VERSION_INT constant. @@ -409,7 +411,7 @@ function swr_get_out_samples(s: PSwrContext; in_samples: cint); * @returns the unsigned int-typed version *) function swresample_version(): cuint; - cdecl; external swresample; + cdecl; external sw__resample; (** * Return the swr build-time configuration. @@ -417,7 +419,7 @@ function swresample_version(): cuint; * @returns the build-time @c ./configure flags *) function swresample_configuration(): PAnsiChar; - cdecl; external swresample; + cdecl; external sw__resample; (** * Return the swr license. @@ -425,7 +427,7 @@ function swresample_configuration(): PAnsiChar; * @returns the license of libswresample, determined at build-time *) function swresample_license(): PAnsiChar; - cdecl; external swresample; + cdecl; external sw__resample; implementation -- cgit v1.2.3