diff options
Diffstat (limited to 'src/combined/ffmpeg/Makefile.am')
-rw-r--r-- | src/combined/ffmpeg/Makefile.am | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/src/combined/ffmpeg/Makefile.am b/src/combined/ffmpeg/Makefile.am new file mode 100644 index 000000000..24cab7577 --- /dev/null +++ b/src/combined/ffmpeg/Makefile.am @@ -0,0 +1,81 @@ +include $(top_builddir)/misc/Makefile.plugins +include $(top_srcdir)/misc/Makefile.common + +DEFAULT_INCLUDES = -I. + +if HAVE_FFMPEG +ff_cppflags = $(FFMPEG_CFLAGS) $(FFMPEG_POSTPROC_CFLAGS) +link_ffmpeg = $(FFMPEG_LIBS) $(FFMPEG_UTIL_LIBS) $(FFMPEG_POSTPROC_LIBS) +else +ff_cppflags = -I$(top_builddir)/src/libffmpeg -I$(top_srcdir)/src/libffmpeg/libavcodec -I$(top_srcdir)/src/libffmpeg/libavutil +link_ffmpeg = \ + $(top_builddir)/src/libffmpeg/libavcodec/libavcodec.la \ + $(top_builddir)/src/libffmpeg/libavutil/libavutil.la \ + $(top_builddir)/src/libffmpeg/libavcodec/libpostproc/libpostprocess.la +endif + +ff_generated = \ + avcodec_video.list avcodec_audio.list \ + ff_video_list.h ff_audio_list.h + +BUILT_SOURCES = $(ff_generated) + +# ffmpeg_config.h is generated by configure +DISTCLEANFILES = ffmpeg_config.h $(ff_generated) + +# this must always be included, even if the current machine has no DXR3... +EXTRA_DIST = ffmpeg_encoder.c \ + xine_video.list xine_audio.list mkcodeclist.pl + +xineplug_LTLIBRARIES = xineplug_decode_ff.la xineplug_decode_dvaudio.la + +if HAVE_DXR3 +AM_CPPFLAGS = -I$(top_srcdir)/src/dxr3 $(X_CFLAGS) $(ff_cppflags) \ + $(ZLIB_CPPFLAGS) +xineplug_decode_ff_la_SOURCES = ffmpeg_decoder.c ff_audio_decoder.c ff_video_decoder.c \ + ffmpeg_encoder.c ff_mpeg_parser.c ffmpeg_decoder.h \ + ff_mpeg_parser.h +else +AM_CPPFLAGS = $(ff_cppflags) $(ZLIB_CPPFLAGS) +xineplug_decode_ff_la_SOURCES = ffmpeg_decoder.c ff_audio_decoder.c ff_video_decoder.c \ + ff_mpeg_parser.c ffmpeg_decoder.h ff_mpeg_parser.h +endif + +xineplug_decode_ff_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) +xineplug_decode_ff_la_LDFLAGS = $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS) +xineplug_decode_ff_la_LIBADD = $(XINE_LIB) $(MLIB_LIBS) -lm $(ZLIB_LIBS) \ + $(link_ffmpeg) $(PTHREAD_LIBS) $(LTLIBINTL) + +xineplug_decode_dvaudio_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) +xineplug_decode_dvaudio_la_LDFLAGS = $(xineplug_ldflags) +xineplug_decode_dvaudio_la_SOURCES = ff_dvaudio_decoder.c +xineplug_decode_dvaudio_la_LIBADD = $(XINE_LIB) $(LTLIBINTL) + +$(top_srcdir)/src/libffmpeg/libavcodec/libavcodec.la: + make -C $(top_srcdir)/src/libffmpeg + +# Generation of ffmpeg->xine codec mapping lists (see xine_*.list). + +AV_CPP = $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) + +# Extract some CODEC_ID_* from avcodec.h. Requires some sed mangling. +avcodec_audio.list: AV_CODECS:=/CODEC_ID_PCM_S16LE/,/CODEC_ID_DVD_SUBTITLE/ +avcodec_video.list: AV_CODECS:=/CODEC_ID_MPEG1VIDEO/,/CODEC_ID_PCM_S16LE/ + +avcodec_audio.list avcodec_video.list: + echo '#include "$(srcdir)/ffmpeg_decoder.h"' | $(AV_CPP) - |\ + sed -e $(AV_CODECS)'! d; s/^[ \t]*//; s/[=,].*//; /^$$/ d' >$@ + +# Generate the mappings. These are #included where needed. +ff_%_list.h: $(srcdir)/mkcodeclist.pl avcodec_%.list $(srcdir)/xine_%.list + $(PERL) $^ $@ + +ff_audio_decoder.c: ff_audio_list.h +ff_video_decoder.c: ff_video_list.h + +# 'make report' prints tokens corresponding to any unhandled codecs. +report: avcodec_audio.list avcodec_video.list + @$(top_srcdir)/src/combined/ffmpeg/mkcodeclist.pl avcodec_audio.list xine_audio.list - audio + @$(top_srcdir)/src/combined/ffmpeg/mkcodeclist.pl avcodec_video.list xine_video.list - video + +.PHONY: report |