From fcb65d60f5aebae322c88a19bef558c3d7504ba6 Mon Sep 17 00:00:00 2001 From: gb Date: Thu, 1 Jul 2010 11:11:18 +0000 Subject: [PATCH] Drop dependency on libavformat. --- NEWS | 1 + configure.ac | 7 ++----- gst-libs/gst/vaapi/Makefile.am | 2 -- gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c | 17 +++++++++++++---- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index d259339b8a..ddae573c89 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ gst-vaapi NEWS -- summary of changes. 2010-06-DD Copyright (C) 2010 Splitted-Desktop Systems Version 0.2.5 - DD.Jun.2010 +* Drop dependency on libavformat * Fix build with older VA-API 0.29-sds * Fix decoding of some H.264 streams. e.g. Ice Age 2 trailer diff --git a/configure.ac b/configure.ac index 89dca33d77..403f8bc7a8 100644 --- a/configure.ac +++ b/configure.ac @@ -272,12 +272,9 @@ else fi dnl Check for FFmpeg -PKG_CHECK_MODULES(LIBAVFORMAT, [libavformat]) -AC_CHECK_HEADERS([libavformat/avformat.h]) - PKG_CHECK_MODULES(LIBAVCODEC, [libavcodec]) -AC_CHECK_HEADERS([libavcodec/avcodec.h]) -AC_CHECK_HEADERS([libavcodec/vaapi.h], [], +AC_CHECK_HEADERS([libavcodec/avcodec.h ffmpeg/avcodec.h]) +AC_CHECK_HEADERS([libavcodec/vaapi.h ffmpeg/vaapi.h], [break], AC_MSG_ERROR([The system FFmpeg headers do not support VA-API])) AC_DEFINE_UNQUOTED(USE_GLX, $USE_GLX, diff --git a/gst-libs/gst/vaapi/Makefile.am b/gst-libs/gst/vaapi/Makefile.am index 9759baf839..c488897974 100644 --- a/gst-libs/gst/vaapi/Makefile.am +++ b/gst-libs/gst/vaapi/Makefile.am @@ -140,7 +140,6 @@ libgstvaapi_@GST_MAJORMINOR@_la_CFLAGS = \ $(GST_BASE_CFLAGS) \ $(GST_CFLAGS) \ $(LIBAVCODEC_CFLAGS) \ - $(LIBAVFORMAT_CFLAGS) \ $(LIBVA_CFLAGS) \ $(NULL) @@ -148,7 +147,6 @@ libgstvaapi_@GST_MAJORMINOR@_la_LIBADD = \ $(GST_BASE_LIBS) \ $(GST_LIBS) \ $(LIBAVCODEC_LIBS) \ - $(LIBAVFORMAT_LIBS) \ $(LIBVA_LIBS) \ $(NULL) diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c b/gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c index d6fe7e2406..e8fc98121f 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c @@ -25,9 +25,18 @@ */ #include "config.h" -#include -#include -#include +#ifdef HAVE_LIBAVCODEC_AVCODEC_H +# include +#endif +#ifdef HAVE_FFMPEG_AVCODEC_H +# include +#endif +#ifdef HAVE_LIBAVCODEC_VAAPI_H +# include +#endif +#ifdef HAVE_FFMPEG_VAAPI_H +# include +#endif #include "gstvaapidecoder_ffmpeg.h" #include "gstvaapidecoder_priv.h" #include "gstvaapidisplay_priv.h" @@ -598,7 +607,7 @@ gst_vaapi_decoder_ffmpeg_class_init(GstVaapiDecoderFfmpegClass *klass) static gpointer gst_vaapi_decoder_ffmpeg_init_once_cb(gpointer user_data) { - av_register_all(); + avcodec_register_all(); return NULL; }