Try to allow builds with 0.10.4-era ffmpeg.
authorCarl Hetherington <cth@carlh.net>
Wed, 9 Jan 2013 09:49:24 +0000 (09:49 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 9 Jan 2013 09:49:24 +0000 (09:49 +0000)
src/lib/ffmpeg_compatibility.cc
src/lib/ffmpeg_compatibility.h
src/lib/filter_graph.h
src/lib/image.h
src/lib/matcher.h
wscript

index c47cdf5ce71f03c4ee4edfc31b85e013af1085c4..09f9276ac0fbb8d80adec70b78554e28dffd27ed 100644 (file)
@@ -107,3 +107,11 @@ avfilter_inout_alloc ()
        return (AVFilterInOut *) av_malloc (sizeof (AVFilterInOut));
 }
 #endif
+
+#ifndef HAVE_AV_FRAME_GET_BEST_EFFORT_TIMESTAMP
+int64_t av_frame_get_best_effort_timestamp (AVFrame const * f)
+{
+       return f->best_effort_timestamp;
+}
+
+#endif
index 80cc79ffb8b8995189c09d8bd976d9665c2c29fb..772d22c33f598433bc16c0275c8f0944d3857016 100644 (file)
@@ -22,3 +22,10 @@ struct AVFilterInOut;
 extern AVFilter* get_sink ();
 extern AVFilterInOut* avfilter_inout_alloc ();
 
+#ifndef HAVE_AV_PIXEL_FORMAT
+#define AVPixelFormat PixelFormat
+#endif
+
+#ifndef HAVE_AV_FRAME_GET_BEST_EFFORT_TIMESTAMP
+extern int64_t av_frame_get_best_effort_timestamp (AVFrame const *);
+#endif
index a4b9ef75fb68bd44ed9e9319d15359986c15c600..9e6ac62528859591acaf0af5152a5bb3e53e947f 100644 (file)
@@ -25,6 +25,7 @@
 #define DVDOMATIC_FILTER_GRAPH_H
 
 #include "util.h"
+#include "ffmpeg_compatibility.h"
 
 class Image;
 class VideoFilter;
index 95e0de9dc2baa09b84d8edcb319e01e90fb25aa6..e19c6f54b7055d916df185cdab98c102f9ea8496 100644 (file)
@@ -32,6 +32,7 @@ extern "C" {
 #include <libavfilter/avfilter.h>
 }
 #include "util.h"
+#include "ffmpeg_compatibility.h"
 
 class Scaler;
 class RGBFrameImage;
index 9bd30fe620bef802284a7ba06faf93cddc380589..b94c28446a4d7f3b69a8ebe8c70204ecf34e3b67 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <boost/optional.hpp>
 #include "processor.h"
+#include "ffmpeg_compatibility.h"
 
 class Matcher : public AudioVideoProcessor
 {
diff --git a/wscript b/wscript
index 49505836ab75169e6597d81e15a855da6997789d..c8fdc497714dc22ffbc2f2a56b0cbced5e33481f 100644 (file)
--- a/wscript
+++ b/wscript
@@ -151,6 +151,26 @@ def configure(conf):
                              define_name = 'HAVE_G_FORMAT_SIZE',
                              mandatory = False)
 
+    conf.check_cc(fragment = """
+                             extern "C" {
+                               #include <libavutil/avutil.h>
+                             }
+                             int main() { AVPixelFormat f; }
+                             """, msg = 'Checking for AVPixelFormat',
+                             uselib = 'AVUTIL',
+                             define_name = 'HAVE_AV_PIXEL_FORMAT',
+                             mandatory = False)
+
+    conf.check_cc(fragment = """
+                             extern "C" {
+                               #include <libavcodec/avcodec.h>
+                             }
+                             int main() { AVFrame* f; av_frame_get_best_effort_timestamp(f); }
+                             """, msg = 'Checking for av_frame_get_best_effort_timestamp',
+                             uselib = 'AVCODEC',
+                             define_name = 'HAVE_AV_FRAME_GET_BEST_EFFORT_TIMESTAMP',
+                             mandatory = False)
+
     conf.recurse('src')
     conf.recurse('test')