aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRainer Hochecker <fernetmenta@online.de>2014-01-11 01:25:27 +0100
committerRainer Hochecker <fernetmenta@online.de>2014-02-01 18:22:55 +0100
commit974a3c0e97b817ca358a959a026db95330673642 (patch)
treeff9258d87204494f938db56529bf9b5bcfe625f4 /lib
parente211654714b2266b80ba65361bda8f715d47933a (diff)
linux: link ffmpeg statically
Diffstat (limited to 'lib')
-rw-r--r--lib/DllAvCodec.h4
-rw-r--r--lib/DllAvFilter.h2
-rw-r--r--lib/DllAvFormat.h8
-rw-r--r--lib/DllAvUtil.h4
-rw-r--r--lib/DllPostProc.h2
-rw-r--r--lib/DllSwResample.h4
-rw-r--r--lib/DllSwScale.h4
-rw-r--r--lib/Makefile.in14
8 files changed, 28 insertions, 14 deletions
diff --git a/lib/DllAvCodec.h b/lib/DllAvCodec.h
index 5cef736405..af13a15d52 100644
--- a/lib/DllAvCodec.h
+++ b/lib/DllAvCodec.h
@@ -94,7 +94,7 @@ public:
virtual AVDictionary* av_frame_get_metadata(const AVFrame* frame)=0;
};
-#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
+#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
// Use direct layer
class DllAvCodec : public DllDynamic, DllAvCodecInterface
@@ -166,7 +166,7 @@ public:
// DLL faking.
virtual bool ResolveExports() { return true; }
virtual bool Load() {
-#if !defined(TARGET_DARWIN)
+#if !defined(TARGET_DARWIN) && !defined(USE_STATIC_FFMPEG)
CLog::Log(LOGDEBUG, "DllAvCodec: Using libavcodec system library");
#endif
return true;
diff --git a/lib/DllAvFilter.h b/lib/DllAvFilter.h
index 2200bfafa6..05e5c6f734 100644
--- a/lib/DllAvFilter.h
+++ b/lib/DllAvFilter.h
@@ -104,7 +104,7 @@ public:
#endif
};
-#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
+#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
// Use direct mapping
class DllAvFilter : public DllDynamic, DllAvFilterInterface
{
diff --git a/lib/DllAvFormat.h b/lib/DllAvFormat.h
index 0016c0b73e..fc7e16658e 100644
--- a/lib/DllAvFormat.h
+++ b/lib/DllAvFormat.h
@@ -41,7 +41,7 @@ extern "C" {
void xbmc_read_frame_flush(AVFormatContext *s);
#else
#include "libavformat/avformat.h"
- #if defined(TARGET_DARWIN)
+ #if defined(TARGET_DARWIN) || defined(USE_STATIC_FFMPEG)
void ff_read_frame_flush(AVFormatContext *s); // internal replacement
#define xbmc_read_frame_flush ff_read_frame_flush
#endif
@@ -73,7 +73,7 @@ public:
virtual int av_read_play(AVFormatContext *s)=0;
virtual int av_read_pause(AVFormatContext *s)=0;
virtual int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)=0;
-#if (!defined USE_EXTERNAL_FFMPEG) && (!defined TARGET_DARWIN)
+#if (!defined USE_EXTERNAL_FFMPEG) && (!defined TARGET_DARWIN) && (!defined USE_STATIC_FFMPEG)
virtual int avformat_find_stream_info_dont_call(AVFormatContext *ic, AVDictionary **options)=0;
#endif
virtual int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options)=0;
@@ -108,7 +108,7 @@ public:
#endif
};
-#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
+#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
// Use direct mapping
class DllAvFormat : public DllDynamic, DllAvFormatInterface
@@ -170,7 +170,7 @@ public:
// DLL faking.
virtual bool ResolveExports() { return true; }
virtual bool Load() {
-#if !defined(TARGET_DARWIN)
+#if !defined(TARGET_DARWIN) && !defined(USE_STATIC_FFMPEG)
CLog::Log(LOGDEBUG, "DllAvFormat: Using libavformat system library");
#endif
CSingleLock lock(DllAvCodec::m_critSection);
diff --git a/lib/DllAvUtil.h b/lib/DllAvUtil.h
index ce5889b5ff..0fcdf10679 100644
--- a/lib/DllAvUtil.h
+++ b/lib/DllAvUtil.h
@@ -116,7 +116,7 @@ public:
#endif
};
-#if defined (USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
+#if defined (USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
// Use direct layer
class DllAvUtilBase : public DllDynamic, DllAvUtilInterface
{
@@ -174,7 +174,7 @@ public:
// DLL faking.
virtual bool ResolveExports() { return true; }
virtual bool Load() {
-#if !defined(TARGET_DARWIN)
+#if !defined(TARGET_DARWIN) && !defined(USE_STATIC_FFMPEG)
CLog::Log(LOGDEBUG, "DllAvUtilBase: Using libavutil system library");
#endif
return true;
diff --git a/lib/DllPostProc.h b/lib/DllPostProc.h
index 02656510a4..e9542eb0b3 100644
--- a/lib/DllPostProc.h
+++ b/lib/DllPostProc.h
@@ -78,7 +78,7 @@ public:
virtual void pp_free_context(pp_context *ppContext)=0;
};
-#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
+#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
// We call directly.
class DllPostProc : public DllDynamic, DllPostProcInterface
diff --git a/lib/DllSwResample.h b/lib/DllSwResample.h
index 854d25073c..cd1452b0f4 100644
--- a/lib/DllSwResample.h
+++ b/lib/DllSwResample.h
@@ -60,7 +60,7 @@ public:
virtual int swr_set_compensation(struct SwrContext *s, int sample_delta, int compensation_distance) = 0;
};
-#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
+#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
// Use direct mapping
class DllSwResample : public DllDynamic, DllSwResampleInterface
@@ -71,7 +71,7 @@ public:
// DLL faking.
virtual bool ResolveExports() { return true; }
virtual bool Load() {
-#if !defined(TARGET_DARWIN)
+#if !defined(TARGET_DARWIN) && !defined(USE_STATIC_FFMPEG)
CLog::Log(LOGDEBUG, "DllAvFormat: Using libswresample system library");
#endif
return true;
diff --git a/lib/DllSwScale.h b/lib/DllSwScale.h
index 36bb616809..97e3b400ed 100644
--- a/lib/DllSwScale.h
+++ b/lib/DllSwScale.h
@@ -87,7 +87,7 @@ public:
virtual void sws_freeContext(struct SwsContext *context)=0;
};
-#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
+#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
// We call into this library directly.
class DllSwScale : public DllDynamic, public DllSwScaleInterface
@@ -111,7 +111,7 @@ public:
// DLL faking.
virtual bool ResolveExports() { return true; }
virtual bool Load() {
-#if !defined(TARGET_DARWIN)
+#if !defined(TARGET_DARWIN) && !defined(USE_STATIC_FFMPEG)
CLog::Log(LOGDEBUG, "DllSwScale: Using libswscale system library");
#endif
return true;
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 906219c573..ca18a4ae31 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -27,6 +27,7 @@ endif
LIBS=
ifneq (@USE_EXTERNAL_FFMPEG@,1)
+ifneq (@USE_STATIC_FFMPEG@,1)
LIBS+=$(AVUTIL_SO) \
$(AVCODEC_SO) \
$(AVFORMAT_SO) \
@@ -35,10 +36,12 @@ ifneq (@USE_EXTERNAL_FFMPEG@,1)
$(SWSCALE_SO) \
$(SWRESAMPLE_SO)
endif
+endif
.PHONY: $(DIRS) codecs
ifneq ($(findstring osx,$(ARCH)), osx)
+ifneq (@USE_STATIC_FFMPEG@,1)
codecs: $(addprefix $(SYSDIR)/, $(LIBS));
@@ -71,6 +74,17 @@ ffmpeg/libswscale/libswscale.so : ffmpeg;
ffmpeg/libpostproc/libpostproc.so : ffmpeg;
ffmpeg/libswresample/libswresample.so : ffmpeg;
endif
+endif
+
+ifeq (@USE_STATIC_FFMPEG@,1)
+ffmpeg/libavutil/libavutil.a : ffmpeg;
+ffmpeg/libavcodec/libavcodec.a : ffmpeg;
+ffmpeg/libavformat/libavformat.a : ffmpeg;
+ffmpeg/libavfilter/libavfilter.a : ffmpeg;
+ffmpeg/libswscale/libswscale.a : ffmpeg;
+ffmpeg/libpostproc/libpostproc.a : ffmpeg;
+ffmpeg/libswresample/libswresample.a : ffmpeg;
+endif
ffmpeg:
$(MAKE) -C $@