diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2018-11-30 09:48:16 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2018-11-30 11:14:27 +0200 |
commit | 5deb0c670de30689b7019f00f7b67af84f6056d3 (patch) | |
tree | f3eb069b57d7f0898c176272dc243dda51bf1190 /gnu/packages | |
parent | 25ca46985ccb26880f98b479d2a3ac862b20006e (diff) | |
download | guix-5deb0c670de30689b7019f00f7b67af84f6056d3.tar.gz guix-5deb0c670de30689b7019f00f7b67af84f6056d3.zip |
gnu: blender: Use newer ffmpeg.
* gnu/packages/graphics.scm (blender)[source]: Add patch for newer
ffmpeg compatability.
[inputs]: Replace ffmpeg-2.8 with ffmpeg.
* gnu/packages/patches/blender-newer-ffmpeg.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/graphics.scm | 5 | ||||
-rw-r--r-- | gnu/packages/patches/blender-newer-ffmpeg.patch | 80 |
2 files changed, 83 insertions, 2 deletions
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index c3c1a4a580..6e184d3334 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -85,7 +85,8 @@ "blender-" version ".tar.gz")) (sha256 (base32 - "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c")))) + "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c")) + (patches (search-patches "blender-newer-ffmpeg.patch")))) (build-system cmake-build-system) (arguments (let ((python-version (version-major+minor (package-version python)))) @@ -141,7 +142,7 @@ ("libjpeg" ,libjpeg) ("libpng" ,libpng) ("libtiff" ,libtiff) - ("ffmpeg-2.8" ,ffmpeg-2.8) ;<https://lists.gnu.org/archive/html/guix-devel/2016-04/msg01019.html> + ("ffmpeg" ,ffmpeg) ("fftw" ,fftw) ("jack" ,jack-1) ("libsndfile" ,libsndfile) diff --git a/gnu/packages/patches/blender-newer-ffmpeg.patch b/gnu/packages/patches/blender-newer-ffmpeg.patch new file mode 100644 index 0000000000..363489bc70 --- /dev/null +++ b/gnu/packages/patches/blender-newer-ffmpeg.patch @@ -0,0 +1,80 @@ +https://sources.debian.org/data/main/b/blender/2.79.b+dfsg0-4/debian/patches/0008-fix_building_with_latest_versions_of_FFmpeg.patch + +From: Bastien Montagne <montagne29@wanadoo.fr> +Date: Tue, 8 May 2018 16:00:52 +0200 +Subject: fix_building_with_latest_versions_of_FFmpeg + +Some years-old deprecated stuff has now been removed. + +Correct solution is probably to use valid defines etc. in own code, but +this is more FFMEPG maintainer task (since it also may change how old +FFMPEG we do support...). +--- + intern/ffmpeg/ffmpeg_compat.h | 39 ++++++++++++++++++++++++++ + source/blender/blenkernel/intern/writeffmpeg.c | 3 +- + 2 files changed, 41 insertions(+), 1 deletion(-) + +diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h +index 9c06c8a..f7f437c 100644 +--- a/intern/ffmpeg/ffmpeg_compat.h ++++ b/intern/ffmpeg/ffmpeg_compat.h +@@ -109,6 +109,45 @@ int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt) + + #endif + ++/* XXX TODO Probably fix to correct modern flags in code? Not sure how old FFMPEG we want to support though, ++ * so for now this will do. */ ++ ++#ifndef FF_MIN_BUFFER_SIZE ++# ifdef AV_INPUT_BUFFER_MIN_SIZE ++# define FF_MIN_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE ++# endif ++#endif ++ ++#ifndef FF_INPUT_BUFFER_PADDING_SIZE ++# ifdef AV_INPUT_BUFFER_PADDING_SIZE ++# define FF_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE ++# endif ++#endif ++ ++#ifndef CODEC_FLAG_GLOBAL_HEADER ++# ifdef AV_CODEC_FLAG_GLOBAL_HEADER ++# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER ++# endif ++#endif ++ ++#ifndef CODEC_FLAG_GLOBAL_HEADER ++# ifdef AV_CODEC_FLAG_GLOBAL_HEADER ++# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER ++# endif ++#endif ++ ++#ifndef CODEC_FLAG_INTERLACED_DCT ++# ifdef AV_CODEC_FLAG_INTERLACED_DCT ++# define CODEC_FLAG_INTERLACED_DCT AV_CODEC_FLAG_INTERLACED_DCT ++# endif ++#endif ++ ++#ifndef CODEC_FLAG_INTERLACED_ME ++# ifdef AV_CODEC_FLAG_INTERLACED_ME ++# define CODEC_FLAG_INTERLACED_ME AV_CODEC_FLAG_INTERLACED_ME ++# endif ++#endif ++ + /* FFmpeg upstream 1.0 is the first who added AV_ prefix. */ + #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 59, 100) + # define AV_CODEC_ID_NONE CODEC_ID_NONE +diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c +index a19e414..04d508a 100644 +--- a/source/blender/blenkernel/intern/writeffmpeg.c ++++ b/source/blender/blenkernel/intern/writeffmpeg.c +@@ -605,7 +605,8 @@ static AVStream *alloc_video_stream(FFMpegContext *context, RenderData *rd, int + c->rc_buffer_aggressivity = 1.0; + #endif + +- c->me_method = ME_EPZS; ++ /* Deprecated and not doing anything since July 2015, deleted in recent ffmpeg */ ++ //c->me_method = ME_EPZS; + + codec = avcodec_find_encoder(c->codec_id); + if (!codec) |