[vlc-commits] avcodec: move the common code between ffmpeg modules in a static library
Steve Lhomme
git at videolan.org
Tue Nov 14 11:54:41 CET 2017
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Sat Nov 11 19:07:43 2017 +0100| [65e339de6765e36e1bd10c3f3a489a742fd28165] | committer: Jean-Baptiste Kempf
avcodec: move the common code between ffmpeg modules in a static library
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=65e339de6765e36e1bd10c3f3a489a742fd28165
---
modules/codec/Makefile.am | 10 +++++-----
modules/demux/Makefile.am | 7 ++-----
modules/packetizer/Makefile.am | 6 ++----
3 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/modules/codec/Makefile.am b/modules/codec/Makefile.am
index 5cea916541..a0969619d8 100644
--- a/modules/codec/Makefile.am
+++ b/modules/codec/Makefile.am
@@ -361,22 +361,21 @@ EXTRA_LTLIBRARIES += libvideotoolbox_plugin.la
codec_LTLIBRARIES += $(LTLIBvideotoolbox)
### FFmpeg/libav ###
+vlc_avcodec_common_la_SOURCES = codec/avcodec/fourcc.c codec/avcodec/avcommon.h \
+ codec/avcodec/chroma.c codec/avcodec/chroma.h \
+ codec/avcodec/avcommon_compat.h
libavcodec_plugin_la_SOURCES = \
- codec/avcodec/avcommon_compat.h \
- codec/avcodec/avcommon.h \
codec/avcodec/video.c \
codec/avcodec/subtitle.c \
codec/avcodec/audio.c \
- codec/avcodec/fourcc.c \
- codec/avcodec/chroma.c codec/avcodec/chroma.h \
codec/avcodec/va.c codec/avcodec/va.h \
codec/avcodec/avcodec.c codec/avcodec/avcodec.h
if ENABLE_SOUT
libavcodec_plugin_la_SOURCES += codec/avcodec/encoder.c
endif
libavcodec_plugin_la_CFLAGS = $(AVCODEC_CFLAGS) $(AM_CFLAGS)
-libavcodec_plugin_la_LIBADD = $(AVCODEC_LIBS) $(LIBM)
+libavcodec_plugin_la_LIBADD = $(AVCODEC_LIBS) $(LIBM) vlc_avcodec_common.la
libavcodec_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(SYMBOLIC_LDFLAGS)
if MERGE_FFMPEG
@@ -392,6 +391,7 @@ if HAVE_DARWIN
libavcodec_plugin_la_LDFLAGS += -Wl,-framework,Foundation -Wl,-framework,Security,-framework,CoreFoundation
endif
if HAVE_AVCODEC
+noinst_LTLIBRARIES += vlc_avcodec_common.la
codec_LTLIBRARIES += libavcodec_plugin.la
endif
diff --git a/modules/demux/Makefile.am b/modules/demux/Makefile.am
index d8c99b788a..d583d374ce 100644
--- a/modules/demux/Makefile.am
+++ b/modules/demux/Makefile.am
@@ -136,17 +136,13 @@ libcaf_plugin_la_LIBADD = $(LIBM)
demux_LTLIBRARIES += libcaf_plugin.la
libavformat_plugin_la_SOURCES = demux/avformat/demux.c \
- codec/avcodec/fourcc.c \
- codec/avcodec/chroma.c \
- codec/avcodec/avcommon.h \
- codec/avcodec/avcommon_compat.h \
demux/vobsub.h \
demux/avformat/avformat.c demux/avformat/avformat.h
if ENABLE_SOUT
libavformat_plugin_la_SOURCES += demux/avformat/mux.c
endif
libavformat_plugin_la_CFLAGS = $(AM_CFLAGS) $(AVFORMAT_CFLAGS) $(AVUTIL_CFLAGS)
-libavformat_plugin_la_LIBADD = $(AVFORMAT_LIBS) $(AVUTIL_LIBS) $(LIBM)
+libavformat_plugin_la_LIBADD = $(AVFORMAT_LIBS) $(AVUTIL_LIBS) $(LIBM) vlc_avcodec_common.la
libavformat_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(SYMBOLIC_LDFLAGS)
if HAVE_ZLIB
libavformat_plugin_la_LIBADD += -lz
@@ -157,6 +153,7 @@ endif
if HAVE_AVFORMAT
if !MERGE_FFMPEG
demux_LTLIBRARIES += libavformat_plugin.la
+noinst_LTLIBRARIES += vlc_avcodec_common.la
endif
endif
diff --git a/modules/packetizer/Makefile.am b/modules/packetizer/Makefile.am
index ad8dc21050..80ed2018e1 100644
--- a/modules/packetizer/Makefile.am
+++ b/modules/packetizer/Makefile.am
@@ -27,11 +27,9 @@ libpacketizer_dts_plugin_la_SOURCES = packetizer/dts.c \
libpacketizer_avparser_plugin_la_SOURCES = packetizer/avparser.c \
packetizer/avparser.h \
- codec/avcodec/avcommon.h \
- codec/avcodec/avcodec.h \
- codec/avcodec/fourcc.c
+ codec/avcodec/avcodec.h
libpacketizer_avparser_plugin_la_CFLAGS = $(AVCODEC_CFLAGS) $(AVUTIL_CFLAGS) $(AM_CFLAGS)
-libpacketizer_avparser_plugin_la_LIBADD = $(AVCODEC_LIBS) $(AVUTIL_LIBS) $(LIBM)
+libpacketizer_avparser_plugin_la_LIBADD = $(AVCODEC_LIBS) $(AVUTIL_LIBS) $(LIBM) vlc_avcodec_common.la
noinst_HEADERS += packetizer/packetizer_helper.h packetizer/startcode_helper.h
More information about the vlc-commits
mailing list