Commit 65e339de authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

avcodec: move the common code between ffmpeg modules in a static library

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent ff6938db
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment