Drop dependency on libavformat.
authorgb <gb@5584edef-b1fe-4b99-b61b-dd2bab72e969>
Thu, 1 Jul 2010 11:11:18 +0000 (11:11 +0000)
committerGwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Mon, 20 Sep 2010 10:55:47 +0000 (12:55 +0200)
NEWS
configure.ac
gst-libs/gst/vaapi/Makefile.am
gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c

diff --git a/NEWS b/NEWS
index d259339..ddae573 100644 (file)
--- 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
 
index 89dca33..403f8bc 100644 (file)
@@ -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,
index 9759baf..c488897 100644 (file)
@@ -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)
 
index d6fe7e2..e8fc981 100644 (file)
  */
 
 #include "config.h"
-#include <libavcodec/avcodec.h>
-#include <libavcodec/vaapi.h>
-#include <libavformat/avformat.h>
+#ifdef HAVE_LIBAVCODEC_AVCODEC_H
+# include <libavcodec/avcodec.h>
+#endif
+#ifdef HAVE_FFMPEG_AVCODEC_H
+# include <ffmpeg/avcodec.h>
+#endif
+#ifdef HAVE_LIBAVCODEC_VAAPI_H
+# include <libavcodec/vaapi.h>
+#endif
+#ifdef HAVE_FFMPEG_VAAPI_H
+# include <ffmpeg/vaapi.h>
+#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;
 }