aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbrian-ch <brian-ch@b956fd51-792f-4845-bead-9b4dfca2ff2c>2016-02-14 18:13:57 +0000
committerbrian-ch <brian-ch@b956fd51-792f-4845-bead-9b4dfca2ff2c>2016-02-14 18:13:57 +0000
commit4dea02ed19873fbd8ee454a1b1147ad10436ab91 (patch)
tree9c3fe3adb2e83cda6b41cba5fdf74ab8bc2dfafe /src
parent460102260b2d0dfb02e14d88646f6c669f20e898 (diff)
downloadusdx-4dea02ed19873fbd8ee454a1b1147ad10436ab91.tar.gz
usdx-4dea02ed19873fbd8ee454a1b1147ad10436ab91.tar.xz
usdx-4dea02ed19873fbd8ee454a1b1147ad10436ab91.zip
Only try to include libswresample if it is installed and we have pascal headers for that specific version
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3194 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src')
-rw-r--r--src/base/UConfig.pas7
-rw-r--r--src/config-win.inc8
-rw-r--r--src/switches.inc5
-rw-r--r--src/ultrastardx.dpr8
4 files changed, 23 insertions, 5 deletions
diff --git a/src/base/UConfig.pas b/src/base/UConfig.pas
index 79964451..d54ca439 100644
--- a/src/base/UConfig.pas
+++ b/src/base/UConfig.pas
@@ -181,9 +181,12 @@ const
LIBSWSCALE_VERSION = (LIBSWSCALE_VERSION_MAJOR * VERSION_MAJOR) +
(LIBSWSCALE_VERSION_MINOR * VERSION_MINOR) +
(LIBSWSCALE_VERSION_RELEASE * VERSION_RELEASE);
+ {$ENDIF}
+
+ {$IFDEF HaveSWResample}
LIBSWRESAMPLE_VERSION = (LIBSWRESAMPLE_VERSION_MAJOR * VERSION_MAJOR) +
- (LIBSWRESAMPLE_VERSION_MINOR * VERSION_MINOR) +
- (LIBSWRESAMPLE_VERSION_RELEASE * VERSION_RELEASE);
+ (LIBSWRESAMPLE_VERSION_MINOR * VERSION_MINOR) +
+ (LIBSWRESAMPLE_VERSION_RELEASE * VERSION_RELEASE);
{$ENDIF}
{$ENDIF}
diff --git a/src/config-win.inc b/src/config-win.inc
index 6d32043b..8e0bf5cd 100644
--- a/src/config-win.inc
+++ b/src/config-win.inc
@@ -53,6 +53,14 @@
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}
+
{$DEFINE HaveProjectM}
{$IF Defined(HaveProjectM) and Defined(IncludeConstants)}
ProjectM_DataDir = 'Visuals\projectM';
diff --git a/src/switches.inc b/src/switches.inc
index e54bbcfa..59f72049 100644
--- a/src/switches.inc
+++ b/src/switches.inc
@@ -102,6 +102,9 @@
{$IFDEF HaveSWScale}
{$DEFINE UseSWScale}
{$ENDIF}
+ {$IFDEF HaveSWResample}
+ {$DEFINE UseSWResample}
+ {$ENDIF}
{$ENDIF}
{$IFDEF HaveLibsamplerate}
@@ -127,4 +130,4 @@
{$DEFINE UsePortaudio}
{$IFEND}
-{$ENDIF PASDOC} \ No newline at end of file
+{$ENDIF PASDOC}
diff --git a/src/ultrastardx.dpr b/src/ultrastardx.dpr
index d5f675a5..89777968 100644
--- a/src/ultrastardx.dpr
+++ b/src/ultrastardx.dpr
@@ -99,7 +99,9 @@ uses
{$ENDIF}
{$IFDEF UseSWScale}
swscale in 'lib\' + FFMPEG_DIR + '\swscale.pas',
- swresample in 'lib\' + FFMPEG_DIR + '\swresample.pas',
+ {$ENDIF}
+ {$IFDEF UseSWResample}
+ 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',
@@ -109,7 +111,9 @@ 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}
+ {$IFDEF UseSWResample}
+ swresample in 'lib\ffmpeg-0.10\swresample.pas',
{$ENDIF}
{$ENDIF}
UMediaCore_FFmpeg in 'media\UMediaCore_FFmpeg.pas',