[prev in list] [next in list] [prev in thread] [next in thread]
List: xine-cvslog
Subject: [xine-cvs] =?utf-8?q?HG=3A_xine-lib-1=2E2=3A_Make_ffmpeg/postproc?= =?utf-8?q?_optional=2E?=
From: Torsten_Jager <t.jager () gmx ! de>
Date: 2016-09-14 17:12:28
Message-ID: ad6811727a1164c38d0b.1473873070 () hg ! debian ! org
[Download RAW message or body]
# HG changeset patch
# User Torsten Jager <t.jager@gmx.de>
# Date 1473873070 -7200
# Node ID ad6811727a1164c38d0b7e3cb9dd59b49f82e922
# Branch default
# Parent d9520c25a5b9da4e77747a2404ba51dc53995f9b
Make ffmpeg/postproc optional.
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
* Join 15 video demuxers into a single multiplugin lib.
* Join 5 vdpau decoders into a single multiplugin lib.
* Join 3 raw video decoders into a single multiplugin lib.
+ * Make ffmpeg/postproc optional.
* Log individual items when loading multiplugin libs.
* Improved qt/mp4 edit list handling.
* Detect mp3 files with large id3v2 tags.
--git a/m4/decoders.m4 b/m4/decoders.m4
--- a/m4/decoders.m4
+++ b/m4/decoders.m4
@@ -84,26 +84,47 @@
AM_CONDITIONAL([ENABLE_FAAD], [test x"$enable_faad" != x"no"])
AM_CONDITIONAL([WITH_EXTERNAL_FAAD], [test x"$have_external_faad" = x"yes"])
- dnl ffmpeg external version required
- PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 51.68.0])
- PKG_CHECK_MODULES([AVUTIL], [libavutil >= 49.6.0])
- PKG_CHECK_MODULES([FFMPEG_POSTPROC], [libpostproc])
- AC_DEFINE([HAVE_FFMPEG], 1, [Define this if you have ffmpeg library])
+ dnl ffmpeg (optional, enabled by default)
+ dnl this also affects dxr3 and vaapi
+ AC_ARG_ENABLE([ffmpeg],
+ [AS_HELP_STRING([--disable-ffmpeg], [Disable support for FFmpeg decoders \
(default: enabled)])]) + if test x"$enable_ffmpeg" != x"no" ; then
+ PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 51.68.0], [], [enable_ffmpeg=no])
+ PKG_CHECK_MODULES([AVUTIL], [libavutil >= 49.6.0], [], [enable_ffmpeg=no])
+ if test x"$enable_ffmpeg" != x"no" ; then
+ AC_DEFINE([HAVE_FFMPEG], 1, [Define this if you have the ffmpeg \
library]) + dnl Check presence of ffmpeg/avutil.h to see if it's old or \
new + dnl style for headers. The new style would be preferred actually...
+ ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $FFMPEG_CFLAGS"
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CFLAGS $FFMPEG_CFLAGS $AVUTIL_CFLAGS"
+ AC_CHECK_HEADERS([ffmpeg/avutil.h])
+ AC_CHECK_HEADERS([libavutil/avutil.h])
+ AC_CHECK_HEADERS([libavutil/sha1.h])
+ AC_CHECK_HEADERS([libavutil/sha.h])
+ if test "$ac_cv_header_ffmpeg_avutil_h" = "yes" && test \
"$ac_cv_header_libavutil_avutil_h" = "yes"; then + AC_MSG_ERROR([old & \
new ffmpeg headers found - you need to clean up!]) + fi
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ CFLAGS="$ac_save_CFLAGS"
+ else
+ AC_MSG_WARN([*** no suitable FFmpeg found, disabling ffmpeg / vaapi / \
dxr3 ***]) + fi
+ fi
+ AM_CONDITIONAL([ENABLE_FFMPEG], [test x"$enable_ffmpeg" != x"no"])
- dnl Check presence of ffmpeg/avutil.h to see if it's old or new
- dnl style for headers. The new style would be preferred actually...
- ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $FFMPEG_CFLAGS"
- ac_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CFLAGS $FFMPEG_CFLAGS $AVUTIL_CFLAGS"
- AC_CHECK_HEADERS([ffmpeg/avutil.h])
- AC_CHECK_HEADERS([libavutil/avutil.h])
- AC_CHECK_HEADERS([libavutil/sha1.h])
- AC_CHECK_HEADERS([libavutil/sha.h])
- if test "$ac_cv_header_ffmpeg_avutil_h" = "yes" && test \
"$ac_cv_header_libavutil_avutil_h" = "yes"; then
- AC_MSG_ERROR([old & new ffmpeg headers found - you need to clean up!])
- fi
- CPPFLAGS="$ac_save_CPPFLAGS"
- CFLAGS="$ac_save_CFLAGS"
+ dnl postproc (optional, enabled by default)
+ AC_ARG_ENABLE([postproc],
+ [AS_HELP_STRING([--disable-postproc], [Disable support for libpostproc video \
filtering (default: enabled)])]) + if test x"$enable_postproc" != x"no" ; then
+ PKG_CHECK_MODULES([POSTPROC], [libpostproc >= 51.2.0], [], \
[enable_postproc=no]) + if test x"$enable_postproc" != x"no" ; then
+ AC_DEFINE([HAVE_POSTPROC], 1, [Define this if you have the postproc \
library]) + else
+ AC_MSG_WARN([*** no suitable libpostproc found, disabling ffmpeg / vaapi \
/ post:pp ***]) + fi
+ fi
+ AM_CONDITIONAL([ENABLE_POSTPROC], [test x"$enable_postproc" != x"no"])
dnl gdk-pixbuf (optional; enabled by default)
AC_ARG_ENABLE([gdkpixbuf],
--git a/m4/summary.m4 b/m4/summary.m4
--- a/m4/summary.m4
+++ b/m4/summary.m4
@@ -32,7 +32,7 @@
test x"$have_v4l2" = x"yes" && echo " - v4l2"
echo " - cdda"
test x"$have_libbluray" = x"yes" && echo " - bluray"
- test x"$have_avformat" = x"yes" && echo " - avio (libavformat)"
+ test x"$enable_ffmpeg" != x"no" -a x"$have_avformat" = x"yes" && echo " - avio \
(libavformat)" echo " - test"
echo ""
@@ -71,7 +71,7 @@
test x"$have_libflac" = x"yes" && echo " - FLAC (with libFLAC)"
test x"$have_vorbis" = x"yes" && echo " - ogg"
test x"$have_wavpack" = x"yes" && echo " - WavPack"
- test x"$have_avformat" = x"yes" && echo " - avformat (with libavformat)"
+ test x"$enable_ffmpeg" != x"no" -a x"$have_avformat" = x"yes" && echo " - \
avformat (with libavformat)" echo ""
dnl video decoders
@@ -87,28 +87,7 @@
test x"$have_vdpau" = x"yes" && echo " - vdpau"
test x"$have_mmal" = x"yes" && echo " - mmal (Broadcom HW)"
test x"$have_vpx" = x"yes" && echo " - libvpx (VP8/VP9)"
- if test x"$with_external_ffmpeg" != x"no"; then
- echo " - ffmpeg (external library)"
- else
- echo " - ffmpeg (*INTERNAL* library):"
- echo " - MPEG-4 (ISO, Microsoft, DivX*, XviD)"
- echo " - Creative YUV - Motion JPEG"
- echo " - Cinepak - MS Video-1"
- echo " - FLI/FLC - MS RLE"
- echo " - Id RoQ - Id Cin"
- echo " - Apple Graphics - Apple Video"
- echo " - Apple Animation - Interplay Video"
- echo " - Westwood VQA - Origin Xan"
- echo " - H.263 - Intel Indeo 3"
- echo " - SVQ1 - SVQ3"
- echo " - Real Video 1.0 - Real Video 2.0"
- echo " - 4X Video - Sierra Video"
- echo " - Asus v1/v2 - HuffYUV"
- echo " - On2 VP3 - DV"
- echo " - 8BPS - Duck TrueMotion v1"
- echo " - ATI VCR1 - Flash Video"
- echo " - ZLIB - MSZH"
- fi
+ test x"$enable_ffmpeg" != x"no" && echo " - ffmpeg"
echo ""
dnl audio decoders
@@ -149,18 +128,7 @@
echo " - Musepack (*INTERNAL* library)"
fi
fi
- if test x"$with_external_ffmpeg" != x"no"; then
- echo " - ffmpeg (external library)"
- else
- echo " - ffmpeg (*INTERNAL* library):"
- echo " - Windows Media Audio v1/v2/Pro"
- echo " - DV - logarithmic PCM"
- echo " - 14k4 - 28k8"
- echo " - MS ADPCM - IMA ADPCM"
- echo " - XA ADPCM - Game DPCM/ADPCM"
- echo " - Mace 3:13 - Mace 6:1"
- echo " - FLAC"
- fi
+ test x"$enable_ffmpeg" != x"no" && echo " - ffmpeg"
echo ""
dnl spu decoders
@@ -178,7 +146,8 @@
echo " - eq - eq2"
echo " - boxblur - denoise3d"
echo " - unsharp - tvtime"
- test x"$have_dvb" = x"yes" && echo " - vdr"
+ test x"$enable_postproc" != x"no" && echo " - postproc"
+ test x"$have_dvb" = x"yes" && echo " - vdr"
echo " * SFX:"
echo " - goom - oscope"
echo " - fftscope - mosaico"
@@ -216,7 +185,9 @@
if test x"$have_opengl2" = x"yes"; then
echo " - OpenGL 2.0 (with bicubic scaling)"
fi
- test x"$have_vaapi" = x"yes" && echo " - vaapi (Video Acceleration \
(VA) API for Linux)" + if test x"$have_vaapi" = x"yes" -a x"$enable_ffmpeg" != \
x"no" ; then + echo " - vaapi (Video Acceleration (VA) API for Linux)"
+ fi
test x"$have_vdpau" = x"yes" && echo " - vdpau (X11 Video Decode and \
Presentation API for Unix)" if test x"$have_sunfb" = x"yes"; then
if test x"$have_sundga" = x"yes"; then
--git a/src/combined/ffmpeg/Makefile.am b/src/combined/ffmpeg/Makefile.am
--- a/src/combined/ffmpeg/Makefile.am
+++ b/src/combined/ffmpeg/Makefile.am
@@ -6,6 +6,9 @@
AM_CPPFLAGS = $(ZLIB_CPPFLAGS)
AM_LDFLAGS = $(xineplug_ldflags)
+if ENABLE_FFMPEG
+if ENABLE_POSTPROC
+
xineplug_LTLIBRARIES = xineplug_decode_ff.la
ff_generated = \
@@ -24,9 +27,9 @@
nodist_xineplug_decode_ff_la_SOURCES = ffmpeg_config.h
-xineplug_decode_ff_la_CFLAGS = $(AM_CFLAGS) $(FFMPEG_CFLAGS) \
$(FFMPEG_POSTPROC_CFLAGS) +xineplug_decode_ff_la_CFLAGS = $(AM_CFLAGS) \
$(FFMPEG_CFLAGS) $(POSTPROC_CFLAGS) xineplug_decode_ff_la_LIBADD = $(XINE_LIB) \
$(MLIB_LIBS) -lm $(ZLIB_LIBS) \
- $(FFMPEG_LIBS) $(AVUTIL_LIBS) $(FFMPEG_POSTPROC_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL)
+ $(FFMPEG_LIBS) $(AVUTIL_LIBS) $(POSTPROC_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL)
xineplug_decode_ff_la_LDFLAGS = $(AM_LDFLAGS) $(IMPURE_TEXT_LDFLAGS)
if ENABLE_AVFORMAT
@@ -63,3 +66,6 @@
@$(top_srcdir)/src/combined/ffmpeg/mkcodeclist.pl avcodec_video.list \
xine_video.list - video
.PHONY: report
+
+endif
+endif
--git a/src/dxr3/Makefile.am b/src/dxr3/Makefile.am
--- a/src/dxr3/Makefile.am
+++ b/src/dxr3/Makefile.am
@@ -23,10 +23,12 @@
noinst_HEADERS = em8300.h dxr3.h dxr3_scr.h video_out_dxr3.h
if ENABLE_DXR3
+if ENABLE_FFMPEG
xineplug_LTLIBRARIES = xineplug_decode_dxr3_video.la \
xineplug_decode_dxr3_spu.la \
xineplug_vo_out_dxr3.la
endif
+endif
xineplug_decode_dxr3_video_la_SOURCES = dxr3_decode_video.c
xineplug_decode_dxr3_video_la_LIBADD = $(XINE_LIB) $(LTLIBINTL)
--git a/src/post/planar/Makefile.am b/src/post/planar/Makefile.am
--- a/src/post/planar/Makefile.am
+++ b/src/post/planar/Makefile.am
@@ -6,6 +6,13 @@
AM_CPPFLAGS =
AM_LDFLAGS =
+if ENABLE_POSTPROC
+pp_module_sources = pp.c
+pp_module_libs = $(POSTPROC_LIBS)
+pp_module_deps = $(POSTPROC_DEPS)
+pp_module_cflags = $(FFMPEG_CFLAGS) $(POSTPROC_CFLAGS)
+endif
+
noinst_LTLIBRARIES = libpost_planar_asm.la
libpost_planar_asm_la_SOURCES = eq.c eq2.c noise.c
libpost_planar_asm_la_CFLAGS = $(O1_CFLAGS) -fomit-frame-pointer $(AM_CFLAGS)
@@ -13,8 +20,8 @@
xinepost_LTLIBRARIES = xineplug_post_planar.la
xineplug_post_planar_la_SOURCES = planar.c invert.c expand.c fill.c boxblur.c \
- denoise3d.c unsharp.c pp.c
-xineplug_post_planar_la_LIBADD = $(XINE_LIB) $(FFMPEG_POSTPROC_LIBS) -lm \
$(PTHREAD_LIBS) $(LTLIBINTL) $(noinst_LTLIBRARIES)
-xineplug_post_planar_la_DEPS = $(FFMPEG_POSTPROC_DEPS)
-xineplug_post_planar_la_CFLAGS = $(DEFAULT_OCFLAGS) $(AM_CFLAGS) $(FFMPEG_CFLAGS) \
$(FFMPEG_POSTPROC_CFLAGS) + denoise3d.c unsharp.c \
$(pp_module_sources) +xineplug_post_planar_la_LIBADD = $(XINE_LIB) $(pp_module_libs) \
-lm $(PTHREAD_LIBS) $(LTLIBINTL) $(noinst_LTLIBRARIES) +xineplug_post_planar_la_DEPS \
= $(pp_module_deps) +xineplug_post_planar_la_CFLAGS = $(DEFAULT_OCFLAGS) \
$(AM_CFLAGS) $(pp_module_cflags) xineplug_post_planar_la_LDFLAGS = $(AM_LDFLAGS) \
$(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS)
--git a/src/post/planar/planar.c b/src/post/planar/planar.c
--- a/src/post/planar/planar.c
+++ b/src/post/planar/planar.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000-2009 the xine project
+ * Copyright (C) 2000-2016 the xine project
*
* This file is part of xine, a free video player.
*
@@ -52,8 +52,10 @@
extern void *unsharp_init_plugin(xine_t *xine, void *);
static const post_info_t unsharp_special_info = { XINE_POST_TYPE_VIDEO_FILTER };
+#ifdef HAVE_POSTPROC
extern void *pp_init_plugin(xine_t *xine, void *);
static const post_info_t pp_special_info = { XINE_POST_TYPE_VIDEO_FILTER };
+#endif
extern void *noise_init_plugin(xine_t *xine, void *);
static const post_info_t noise_special_info = { XINE_POST_TYPE_VIDEO_FILTER };
@@ -68,7 +70,9 @@
{ PLUGIN_POST, 10, "boxblur", XINE_VERSION_CODE, &boxblur_special_info, \
&boxblur_init_plugin }, { PLUGIN_POST, 10, "eq2", XINE_VERSION_CODE, \
&eq2_special_info, &eq2_init_plugin }, { PLUGIN_POST, 10, "unsharp", \
XINE_VERSION_CODE, &unsharp_special_info, &unsharp_init_plugin }, +#ifdef \
HAVE_POSTPROC { PLUGIN_POST, 10, "pp", XINE_VERSION_CODE, &pp_special_info, \
&pp_init_plugin }, +#endif
{ PLUGIN_POST, 10, "noise", XINE_VERSION_CODE, &noise_special_info, \
&noise_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
--git a/src/video_out/Makefile.am b/src/video_out/Makefile.am
--- a/src/video_out/Makefile.am
+++ b/src/video_out/Makefile.am
@@ -47,8 +47,10 @@
endif
if ENABLE_VAAPI
+if ENABLE_FFMPEG
vaapi_module = xineplug_vo_out_vaapi.la
endif
+endif
if ENABLE_XCB
XCBOSD = xcbosd.c
------------------------------------------------------------------------------
_______________________________________________
Xine-cvslog mailing list
Xine-cvslog@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-cvslog
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic