aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2015-12-28 15:34:04 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2015-12-28 15:34:04 +0000
commitc2642efc13ede8debbf6993e8edc588a1ebbf984 (patch)
tree3358b0cb055ecfa89ffdebe4d507120acaebdb75 /src
parentfdaaa5578955cdbe10d1f3f41feac4a9c05d24ce (diff)
downloadusdx-c2642efc13ede8debbf6993e8edc588a1ebbf984.tar.gz
usdx-c2642efc13ede8debbf6993e8edc588a1ebbf984.tar.xz
usdx-c2642efc13ede8debbf6993e8edc588a1ebbf984.zip
add configure for swresample
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3154 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src')
-rw-r--r--src/base/UConfig.pas3
-rw-r--r--src/config-darwin.inc33
-rw-r--r--src/config.inc.in8
-rw-r--r--src/lib/ffmpeg-2.7/swresample.pas58
-rw-r--r--src/lib/ffmpeg-2.8/swresample.pas60
-rw-r--r--src/ultrastardx.dpr3
6 files changed, 96 insertions, 69 deletions
diff --git a/src/base/UConfig.pas b/src/base/UConfig.pas
index 2e1c59f0..79964451 100644
--- a/src/base/UConfig.pas
+++ b/src/base/UConfig.pas
@@ -181,6 +181,9 @@ const
LIBSWSCALE_VERSION = (LIBSWSCALE_VERSION_MAJOR * VERSION_MAJOR) +
(LIBSWSCALE_VERSION_MINOR * VERSION_MINOR) +
(LIBSWSCALE_VERSION_RELEASE * VERSION_RELEASE);
+ LIBSWRESAMPLE_VERSION = (LIBSWRESAMPLE_VERSION_MAJOR * VERSION_MAJOR) +
+ (LIBSWRESAMPLE_VERSION_MINOR * VERSION_MINOR) +
+ (LIBSWRESAMPLE_VERSION_RELEASE * VERSION_RELEASE);
{$ENDIF}
{$ENDIF}
diff --git a/src/config-darwin.inc b/src/config-darwin.inc
index 8bde009d..37ce2334 100644
--- a/src/config-darwin.inc
+++ b/src/config-darwin.inc
@@ -7,19 +7,19 @@
{$IF Defined(IncludeConstants)}
LUA_LIB_NAME = 'lua';
- LUA_VERSION_INT = 5001005;
- LUA_VERSION_RELEASE = '5';
- LUA_VERSION_MINOR = '1';
+ LUA_VERSION_INT = 5002004;
+ LUA_VERSION_RELEASE = '4';
+ LUA_VERSION_MINOR = '2';
LUA_VERSION_MAJOR = '5';
- LUA_VERSION = '5.1.5';
+ LUA_VERSION = '5.2.4';
{$IFEND}
{$DEFINE HaveFFmpeg}
{$IF Defined(HaveFFmpeg)}
{$MACRO ON}
{$IFNDEF FFMPEG_DIR}
- {$IF (4 > 0) or (2 > 0)}
- {$DEFINE FFMPEG_DIR := 'ffmpeg-2.4'}
+ {$IF (8 > 0) or (2 > 0)}
+ {$DEFINE FFMPEG_DIR := 'ffmpeg-2.8'}
{$DEFINE FF_API_OLD_DECODE_AUDIO}
{$ELSE}
{$DEFINE FFMPEG_DIR := 'ffmpeg'}
@@ -27,21 +27,21 @@
{$IFEND}
{$ENDIF}
{$IF Defined(IncludeConstants)}
- FFMPEG_VERSION_INT = 2004000;
+ FFMPEG_VERSION_INT = 2008000;
av__codec = 'libavcodec';
LIBAVCODEC_VERSION_MAJOR = 56;
- LIBAVCODEC_VERSION_MINOR = 1;
+ LIBAVCODEC_VERSION_MINOR = 60;
LIBAVCODEC_VERSION_RELEASE = 100;
av__format = 'libavformat';
LIBAVFORMAT_VERSION_MAJOR = 56;
- LIBAVFORMAT_VERSION_MINOR = 4;
+ LIBAVFORMAT_VERSION_MINOR = 40;
LIBAVFORMAT_VERSION_RELEASE = 101;
av__util = 'libavutil';
LIBAVUTIL_VERSION_MAJOR = 54;
- LIBAVUTIL_VERSION_MINOR = 7;
+ LIBAVUTIL_VERSION_MINOR = 31;
LIBAVUTIL_VERSION_RELEASE = 100;
{$IFEND}
{$IFEND}
@@ -50,8 +50,16 @@
{$IF Defined(HaveSWScale) and Defined(IncludeConstants)}
sw__scale = 'libswscale';
LIBSWSCALE_VERSION_MAJOR = 3;
- LIBSWSCALE_VERSION_MINOR = 0;
- LIBSWSCALE_VERSION_RELEASE = 100;
+ LIBSWSCALE_VERSION_MINOR = 1;
+ LIBSWSCALE_VERSION_RELEASE = 101;
+{$IFEND}
+
+{$DEFINE HaveSWResample}
+{$IF Defined(HaveSWScale) and Defined(IncludeConstants)}
+ sw__resample = 'libswresample';
+ LIBSWRESAMPLE_VERSION_MAJOR = 1;
+ LIBSWRESAMPLE_VERSION_MINOR = 2;
+ LIBSWRESAMPLE_VERSION_RELEASE = 101;
{$IFEND}
{$UNDEF HaveProjectM}
@@ -71,6 +79,7 @@
{$DEFINE HaveLibPcre}
{$IF Defined(HaveLibPcre) and Defined(IncludeConstants)}
+ LIBPCRE_LIBNAME = '';
LIBPCRE_LIBDIR = '/sw/lib/libpcre1';
{$IFEND}
diff --git a/src/config.inc.in b/src/config.inc.in
index 232ba615..94dc5a2c 100644
--- a/src/config.inc.in
+++ b/src/config.inc.in
@@ -54,6 +54,14 @@
LIBSWSCALE_VERSION_RELEASE = @libswscale_VERSION_RELEASE@;
{$IFEND}
+{$@DEFINE_HAVE_SWRESAMPLE@ HaveSWResample}
+{$IF Defined(HaveSWScale) and Defined(IncludeConstants)}
+ sw__resample = 'libswresample';
+ LIBSWRESAMPLE_VERSION_MAJOR = @libswresample_VERSION_MAJOR@;
+ LIBSWRESAMPLE_VERSION_MINOR = @libswresample_VERSION_MINOR@;
+ LIBSWRESAMPLE_VERSION_RELEASE = @libswresample_VERSION_RELEASE@;
+{$IFEND}
+
{$@DEFINE_HAVE_PROJECTM@ HaveProjectM}
{$IF Defined(HaveProjectM) and Defined(IncludeConstants)}
ProjectM_DataDir = '@libprojectM_DATADIR@';
diff --git a/src/lib/ffmpeg-2.7/swresample.pas b/src/lib/ffmpeg-2.7/swresample.pas
index 9bb4568c..f4a4e468 100644
--- a/src/lib/ffmpeg-2.7/swresample.pas
+++ b/src/lib/ffmpeg-2.7/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;
@@ -106,7 +108,7 @@ const
{$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
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
diff --git a/src/ultrastardx.dpr b/src/ultrastardx.dpr
index d5cf85e6..0e02bdc4 100644
--- a/src/ultrastardx.dpr
+++ b/src/ultrastardx.dpr
@@ -99,6 +99,7 @@ uses
{$ENDIF}
{$IFDEF UseSWScale}
swscale in 'lib\' + FFMPEG_DIR + '\swscale.pas',
+ swresample in 'lib\' + FFMPEG_DIR + '\swresample.pas',
{$ENDIF}
{$ELSE} // speak: This is for Delphi. Change version as needed!
avcodec in 'lib\ffmpeg-0.10\avcodec.pas',
@@ -108,6 +109,7 @@ uses
avio in 'lib\ffmpeg-0.10\avio.pas',
{$IFDEF UseSWScale}
swscale in 'lib\ffmpeg-0.10\swscale.pas',
+ swresample in 'lib\ffmpeg-0.10\swresample.pas',
{$ENDIF}
{$ENDIF}
UMediaCore_FFmpeg in 'media\UMediaCore_FFmpeg.pas',
@@ -353,6 +355,7 @@ uses
const
sLineBreak = {$IFDEF LINUX} AnsiChar(#10) {$ENDIF}
+ {$IFDEF DARWIN} AnsiChar(#10) {$ENDIF}
{$IFDEF MSWINDOWS} AnsiString(#13#10) {$ENDIF};
var
I: Integer;