diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-01-15 20:06:09 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-01-15 20:09:56 +0100 |
commit | 6c7bdd028173f8349759fe4b4b640722b85bf3c4 (patch) | |
tree | d7509ff6d9467734908393f36dec0710c72e0807 | |
parent | a251a120ee0a6d1d1dd6e38ef80789e726c67846 (diff) |
ffmpeg header location checking
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | plugins/ffmpeg/ffmpeg.c | 19 |
2 files changed, 22 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 1ef1266d..52d9531f 100644 --- a/configure.ac +++ b/configure.ac @@ -44,7 +44,7 @@ CFLAGS="$CFLAGS $INSANE_CFLAGS -D_GNU_SOURCE -DLIBDIR=\\\"$libdir\\\" -DPREFIX=\ PKG_CHECK_MODULES(DEPS, samplerate) PKG_CHECK_MODULES(GTKUI_DEPS, gtk+-2.0 >= 2.12 gthread-2.0 glib-2.0, HAVE_GTK=1, NO_GTK=1) PKG_CHECK_MODULES(ALSA_DEPS, alsa, HAVE_ALSA=1, NO_ALSA=1) -PKG_CHECK_MODULES(FFMPEG_DEPS, libavcodec >= 52.0.0 libavutil libavformat >= 52.0.0, HAVE_FFMPEG=1, NO_FFMPEG=1) +PKG_CHECK_MODULES(FFMPEG_DEPS, libavcodec >= 51.0.0 libavutil libavformat >= 52.0.0, HAVE_FFMPEG=1, NO_FFMPEG=1) AC_CHECK_LIB([pthread], [main]) AC_CHECK_LIB([dl], [main]) @@ -168,6 +168,8 @@ fi AM_CONDITIONAL(HAVE_FFMPEG, test $HAVE_FFMPEG) if test ${HAVE_FFMPEG}; then + dnl check headers + AC_CHECK_HEADER("ffmpeg/avformat.h", FFMPEG_DEPS_CFLAGS="$FFMPEG_DEPS_CFLAGS -D FFMPEG_OLD") FFMPEG_DIR="plugins/ffmpeg" AC_SUBST(FFMPEG_DEPS_CFLAGS) AC_SUBST(FFMPEG_DEPS_LIBS) diff --git a/plugins/ffmpeg/ffmpeg.c b/plugins/ffmpeg/ffmpeg.c index d6f10b62..67e3ddd7 100644 --- a/plugins/ffmpeg/ffmpeg.c +++ b/plugins/ffmpeg/ffmpeg.c @@ -16,12 +16,31 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <alloca.h> +#include <errno.h> + #include "../../deadbeef.h" + +#if !FFMPEG_OLD + #include <libavformat/avformat.h> #include <libavcodec/avcodec.h> #include <libavutil/avutil.h> #include <libavutil/avstring.h> +#else + +#include <ffmpeg/avformat.h> +#include <ffmpeg/avcodec.h> +#include <ffmpeg/avutil.h> +#include <ffmpeg/avstring.h> + +#endif + #define trace(...) { fprintf(stderr, __VA_ARGS__); } //#define trace(fmt,...) |