summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-01-09 09:49:24 +0000
committerCarl Hetherington <cth@carlh.net>2013-01-09 09:49:24 +0000
commit94b48aad7958be46e8294ed736baa53c86ce6b26 (patch)
tree13fdb16a9c17633f44104c292b85caba06f9e71a
parent8a6d700346a6f5ca320883ea1e4d628b80f3b8fd (diff)
Try to allow builds with 0.10.4-era ffmpeg.
-rw-r--r--src/lib/ffmpeg_compatibility.cc8
-rw-r--r--src/lib/ffmpeg_compatibility.h7
-rw-r--r--src/lib/filter_graph.h1
-rw-r--r--src/lib/image.h1
-rw-r--r--src/lib/matcher.h1
-rw-r--r--wscript20
6 files changed, 38 insertions, 0 deletions
diff --git a/src/lib/ffmpeg_compatibility.cc b/src/lib/ffmpeg_compatibility.cc
index c47cdf5ce..09f9276ac 100644
--- a/src/lib/ffmpeg_compatibility.cc
+++ b/src/lib/ffmpeg_compatibility.cc
@@ -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
diff --git a/src/lib/ffmpeg_compatibility.h b/src/lib/ffmpeg_compatibility.h
index 80cc79ffb..772d22c33 100644
--- a/src/lib/ffmpeg_compatibility.h
+++ b/src/lib/ffmpeg_compatibility.h
@@ -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
diff --git a/src/lib/filter_graph.h b/src/lib/filter_graph.h
index a4b9ef75f..9e6ac6252 100644
--- a/src/lib/filter_graph.h
+++ b/src/lib/filter_graph.h
@@ -25,6 +25,7 @@
#define DVDOMATIC_FILTER_GRAPH_H
#include "util.h"
+#include "ffmpeg_compatibility.h"
class Image;
class VideoFilter;
diff --git a/src/lib/image.h b/src/lib/image.h
index 95e0de9dc..e19c6f54b 100644
--- a/src/lib/image.h
+++ b/src/lib/image.h
@@ -32,6 +32,7 @@ extern "C" {
#include <libavfilter/avfilter.h>
}
#include "util.h"
+#include "ffmpeg_compatibility.h"
class Scaler;
class RGBFrameImage;
diff --git a/src/lib/matcher.h b/src/lib/matcher.h
index 9bd30fe62..b94c28446 100644
--- a/src/lib/matcher.h
+++ b/src/lib/matcher.h
@@ -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 49505836a..c8fdc4977 100644
--- 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')