Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Schlaile <peter@schlaile.de>2011-05-28 03:33:40 +0400
committerPeter Schlaile <peter@schlaile.de>2011-05-28 03:33:40 +0400
commit42121590f4bfd65f26e8ec705a660f4cc1bd826e (patch)
treed57d4cf5b303c81ecdd43b89d503b481d48a2be8 /source/blender/blenkernel/intern/writeffmpeg.c
parenta9467182fb00be9fb6dd276e80b69fb650b2cac3 (diff)
== FFMPEG ==
Added central compatibility header file, which enables blender to compile against very old ffmpeg versions as well as very new versions using the *NEW* API. (Old API functions are simulated using macros and inline functions) Added a whole lot of additional checks, tested against 6 different versions down the timeline, hopefully, now finally all is well.
Diffstat (limited to 'source/blender/blenkernel/intern/writeffmpeg.c')
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c41
1 files changed, 3 insertions, 38 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index 48930ae2eb8..c729565533f 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -61,34 +61,7 @@
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
-#if (LIBAVFORMAT_VERSION_MAJOR > 52) || ((LIBAVFORMAT_VERSION_MAJOR >= 52) && (LIBAVFORMAT_VERSION_MINOR >= 105))
-#define FFMPEG_HAVE_AVIO 1
-#endif
-
-#if (LIBAVFORMAT_VERSION_MAJOR > 53) || ((LIBAVFORMAT_VERSION_MAJOR >= 53) && (LIBAVFORMAT_VERSION_MINOR >= 1))
-#define FFMPEG_HAVE_DEFAULT_VAL_UNION 1
-#endif
-
-#if (LIBAVFORMAT_VERSION_MAJOR > 52) || ((LIBAVFORMAT_VERSION_MAJOR >= 52) && (LIBAVFORMAT_VERSION_MINOR >= 101))
-#define FFMPEG_HAVE_AV_DUMP_FORMAT 1
-#endif
-
-#ifndef FFMPEG_HAVE_AVIO
-#define AVIO_FLAG_WRITE URL_WRONLY
-#define avio_open url_fopen
-#define avio_tell url_ftell
-#define avio_close url_fclose
-#endif
-
-/* make OpenSuSe special "in-between" ffmpeg 0.6.2 version(tm) happy...
- Arrrrgh */
-#ifndef AVIO_FLAG_WRITE
-#define AVIO_FLAG_WRITE URL_WRONLY
-#endif
-
-#ifndef FFMPEG_HAVE_AV_DUMP_FORMAT
-#define av_dump_format dump_format
-#endif
+#include "ffmpeg_compat.h"
extern void do_init_ffmpeg(void);
@@ -1080,20 +1053,12 @@ IDProperty *ffmpeg_property_add(RenderData *rd, char * type, int opt_index, int
switch (o->type) {
case FF_OPT_TYPE_INT:
case FF_OPT_TYPE_INT64:
-#ifdef FFMPEG_HAVE_DEFAULT_VAL_UNION
- val.i = o->default_val.i64;
-#else
- val.i = o->default_val;
-#endif
+ val.i = FFMPEG_DEF_OPT_VAL_INT(o);
idp_type = IDP_INT;
break;
case FF_OPT_TYPE_DOUBLE:
case FF_OPT_TYPE_FLOAT:
-#ifdef FFMPEG_HAVE_DEFAULT_VAL_UNION
- val.f = o->default_val.dbl;
-#else
- val.f = o->default_val;
-#endif
+ val.f = FFMPEG_DEF_OPT_VAL_DOUBLE(o);
idp_type = IDP_FLOAT;
break;
case FF_OPT_TYPE_STRING: