Commit ef0cc2a1 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

avcodec: move more build logic to Makefile

parent 773c26ea
......@@ -655,7 +655,7 @@ AC_CHECK_FUNC(getopt_long,, [
AC_SUBST(GNUGETOPT_LIBS)
AC_CHECK_LIB(m,cos,[
VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom rotate noise grain scene kate lua chorus_flanger freetype avcodec swscale postproc faad twolame equalizer spatializer param_eq samplerate freetype mpc dmo quicktime qt4 compressor headphone_channel_mixer normvol audiobargraph_a audiobargraph_v speex opus mono colorthres extract ball access_imem hotkeys mosaic gaussianblur x262 x26410b hqdn3d anaglyph oldrc ncurses oldmovie glspectrum],[-lm])
VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom rotate noise grain scene kate lua chorus_flanger freetype swscale postproc faad twolame equalizer spatializer param_eq samplerate freetype mpc dmo quicktime qt4 compressor headphone_channel_mixer normvol audiobargraph_a audiobargraph_v speex opus mono colorthres extract ball access_imem hotkeys mosaic gaussianblur x262 x26410b hqdn3d anaglyph oldrc ncurses oldmovie glspectrum],[-lm])
LIBM="-lm"
], [
LIBM=""
......@@ -2301,12 +2301,6 @@ AS_IF([test "${enable_avcodec}" != "no"], [
CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
AC_CHECK_HEADERS(libavcodec/avcodec.h)
AC_CHECK_HEADERS(libavutil/avutil.h)
VLC_ADD_PLUGIN([avcodec])
VLC_ADD_LIBS([avcodec],[$AVCODEC_LIBS])
AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
VLC_ADD_LIBS([avcodec],[${ac_cv_ld_bsymbolic}])
])
VLC_ADD_CFLAGS([avcodec],[$AVCODEC_CFLAGS])
VLC_RESTORE_FLAGS
have_avcodec="yes"
],[
......@@ -2315,6 +2309,7 @@ AS_IF([test "${enable_avcodec}" != "no"], [
], [
have_avcodec="no"
])
AM_CONDITIONAL([HAVE_AVCODEC], [test "${have_avcodec}" != "no"])
dnl
dnl libva needs avcodec
......@@ -2440,9 +2435,6 @@ AS_IF([test "${enable_avformat}" != "no"], [
AC_CHECK_HEADERS(libavutil/avutil.h)
AS_IF([test "$enable_merge_ffmpeg" = "no"], [
have_avformat="no"
], [
VLC_ADD_LIBS([avcodec],[$AVFORMAT_LIBS $AVUTIL_LIBS])
VLC_ADD_CFLAGS([avcodec],[$AVFORMAT_CFLAGS $AVUTIL_CFLAGS])
])
VLC_RESTORE_FLAGS
],[
......
......@@ -106,12 +106,11 @@ libavcodec_plugin_la_SOURCES = \
avcodec/va.c avcodec/va.h \
avcodec/avcodec.c avcodec/avcodec.h
if ENABLE_SOUT
libavcodec_plugin_la_SOURCES += \
avcodec/encoder.c
libavcodec_plugin_la_SOURCES += avcodec/encoder.c
endif
libavcodec_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_avcodec)
libavcodec_plugin_la_LIBADD = $(AM_LIBADD) $(LIBS_avcodec)
libavcodec_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_avcodec)
libavcodec_plugin_la_CFLAGS = $(AM_CFLAGS) $(AVCODEC_CFLAGS)
libavcodec_plugin_la_LIBADD = $(AM_LIBADD) $(AVCODEC_LIBS) $(LIBM)
libavcodec_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(SYMBOLIC_LDFLAGS)
if HAVE_WIN32
libavcodec_plugin_la_DEPENDENCIES = libavcodec_plugin.rc.o
endif
......@@ -120,26 +119,27 @@ if MERGE_FFMPEG
libavcodec_plugin_la_SOURCES += \
../demux/avformat/demux.c \
../access/avio.c
libavcodec_plugin_la_CFLAGS += $(AVFORMAT_CFLAGS)
libavcodec_plugin_la_LIBADD += $(AVFORMAT_LIBS)
if ENABLE_SOUT
libavcodec_plugin_la_SOURCES += \
../demux/avformat/mux.c
endif
libavcodec_plugin_la_CFLAGS += -DMERGE_FFMPEG
endif
libvlc_LTLIBRARIES += \
$(LTLIBavcodec)
EXTRA_LTLIBRARIES += \
libavcodec_plugin.la
if HAVE_AVCODEC
libvlc_LTLIBRARIES += libavcodec_plugin.la
endif
### avcodec hardware acceleration ###
libvaapi_plugin_la_SOURCES = \
avcodec/copy.c avcodec/copy.h \
avcodec/vaapi.c
libvaapi_plugin_la_CFLAGS = $(AM_CFLAGS) $(LIBVA_CFLAGS) $(X_CFLAGS) $(CFLAGS_avcodec)
libvaapi_plugin_la_LIBADD = $(AM_LIBADD) $(LIBVA_LIBS) \
$(X_LIBS) $(X_PRE_LIBS) -lX11 $(LIBS_avcodec)
libvaapi_plugin_la_CFLAGS = $(AM_CFLAGS) \
$(LIBVA_CFLAGS) $(X_CFLAGS) $(AVCODEC_CFLAGS)
libvaapi_plugin_la_LIBADD = $(AM_LIBADD) \
$(LIBVA_LIBS) $(X_LIBS) $(X_PRE_LIBS) -lX11
if HAVE_AVCODEC_VAAPI
libvlc_LTLIBRARIES += libvaapi_plugin.la
endif
......@@ -156,17 +156,16 @@ libdxva2_plugin_la_DEPENDENCIES = libdxva2_plugin.rc.o
libvda_plugin_la_SOURCES = \
avcodec/copy.c avcodec/copy.h \
avcodec/vda.c
libvda_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_avcodec)
libvda_plugin_la_LIBADD = $(AM_LIBADD) $(LIBS_avcodec)
libvda_plugin_la_LDFLAGS = $(LDFLAGS_avcodec) -Wl,-framework,CoreFoundation,-framework,VideoDecodeAcceleration,-framework,QuartzCore
libvda_plugin_la_CFLAGS = $(AM_CFLAGS) $(AVCODEC_CFLAGS)
libvda_plugin_la_LDFLAGS = -Wl,-framework,CoreFoundation,-framework,VideoDecodeAcceleration,-framework,QuartzCore
if HAVE_AVCODEC_VDA
libvlc_LTLIBRARIES += libvda_plugin.la
endif
libhwdummy_plugin_la_SOURCES = avcodec/hwdummy.c
libhwdummy_plugin_la_CFLAGS = $(AM_CFLAGS) $(VDPAU_CFLAGS) $(CFLAGS_avcodec)
libhwdummy_plugin_la_LIBADD = $(AM_LIBADD) $(LIBS_avcodec)
libhwdummy_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_avcodec)
libhwdummy_plugin_la_CFLAGS = $(AM_CFLAGS) $(VDPAU_CFLAGS) $(AVCODEC_CFLAGS)
libhwdummy_plugin_la_LIBADD = $(AM_LIBADD) $(AVCODEC_LIBS)
# FIXME: hwdummy only needs libavutil, and only if avcodec < 55.13.0
if HAVE_AVCODEC_VDPAU
libvlc_LTLIBRARIES += libhwdummy_plugin.la
endif
......
......@@ -19,10 +19,10 @@ libvlc_LTLIBRARIES =
libvdpau_avcodec_plugin_la_SOURCES = avcodec.c picture.c
libvdpau_avcodec_plugin_la_CFLAGS = $(AM_CFLAGS) \
$(X_CFLAGS) $(CFLAGS_avcodec)
$(X_CFLAGS) $(AVCODEC_CFLAGS)
libvdpau_avcodec_plugin_la_LIBADD = $(AM_LIBADD) \
$(X_LIBS) $(X_PRE_LIBS) -lX11 $(LIBS_avcodec)
libvdpau_avcodec_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_avcodec)
$(X_LIBS) $(X_PRE_LIBS) -lX11 $(AVCODEC_LIBS)
# FIXME: hwdummy only needs libavutil, and only if avcodec < 55.13.0
if HAVE_AVCODEC_VDPAU
libvlc_LTLIBRARIES += libvdpau_avcodec_plugin.la
endif
......
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