Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 285791 Details for
Bug 382161
media-gfx/blender-2.49b-r2: requires additional patch to work with media-video/ffmpeg-0.7.3
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
media-gfx/blender/files/blender-2.49_ffmpeg-compat.patch
blender-2.49_ffmpeg-compat.patch (text/plain), 5.89 KB, created by
Jonathan-Christofer Demay
on 2011-09-07 16:59:52 UTC
(
hide
)
Description:
media-gfx/blender/files/blender-2.49_ffmpeg-compat.patch
Filename:
MIME Type:
Creator:
Jonathan-Christofer Demay
Created:
2011-09-07 16:59:52 UTC
Size:
5.89 KB
patch
obsolete
>diff -Naurp blender-2.49b/source/blender/include/ffmpeg_compat.h blender-2.49b/source/blender/include/ffmpeg_compat.h >--- blender-2.49b/source/blender/include/ffmpeg_compat.h 1970-01-01 00:00:00.000000000 +0000 >+++ blender-2.49b/source/blender/include/ffmpeg_compat.h 2011-09-07 18:42:21.762303413 +0000 >@@ -0,0 +1,149 @@ >+#ifndef __ffmpeg_compat_h_included__ >+#define __ffmpeg_compat_h_included__ 1 >+ >+/* >+ * $Id: ffmpeg_compat.h 39749 2011-08-28 14:46:03Z schlaile $ >+ * >+ * compatibility macros to make every ffmpeg installation appear >+ * like the most current installation (wrapping some functionality sometimes) >+ * it also includes all ffmpeg header files at once, no need to do it >+ * seperately. >+ * >+ * Copyright (c) 2011 Peter Schlaile >+ * >+ * This program is free software; you can redistribute it and/or modify >+ * it under the terms of the GNU General Public License as published by >+ * the Free Software Foundation; either version 2 of the License, or >+ * (at your option) any later version. >+ * >+ * This program is distributed in the hope that it will be useful, >+ * but WITHOUT ANY WARRANTY; without even the implied warranty of >+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+ * GNU General Public License for more details. >+ * >+ */ >+ >+ >+#include <libavformat/avformat.h> >+#include <libavcodec/avcodec.h> >+#include <libavutil/rational.h> >+ >+#if (LIBAVFORMAT_VERSION_MAJOR > 52) || ((LIBAVFORMAT_VERSION_MAJOR >= 52) && (LIBAVFORMAT_VERSION_MINOR >= 101)) >+#define FFMPEG_HAVE_PARSE_UTILS 1 >+#include <libavutil/parseutils.h> >+#endif >+ >+#include <libswscale/swscale.h> >+#include <libavcodec/opt.h> >+ >+#if (LIBAVFORMAT_VERSION_MAJOR > 52) || ((LIBAVFORMAT_VERSION_MAJOR >= 52) && (LIBAVFORMAT_VERSION_MINOR >= 105)) >+#define FFMPEG_HAVE_AVIO 1 >+#endif >+ >+#if (LIBAVCODEC_VERSION_MAJOR > 53) || ((LIBAVCODEC_VERSION_MAJOR == 53) && (LIBAVCODEC_VERSION_MINOR > 1)) || ((LIBAVCODEC_VERSION_MAJOR == 53) && (LIBAVCODEC_VERSION_MINOR == 1) && (LIBAVCODEC_VERSION_MICRO >= 1)) || ((LIBAVCODEC_VERSION_MAJOR == 52) && (LIBAVCODEC_VERSION_MINOR >= 121)) >+#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 >+ >+#if (LIBAVFORMAT_VERSION_MAJOR > 52) || ((LIBAVFORMAT_VERSION_MAJOR >= 52) && (LIBAVFORMAT_VERSION_MINOR >= 45)) >+#define FFMPEG_HAVE_AV_GUESS_FORMAT 1 >+#endif >+ >+#if (LIBAVCODEC_VERSION_MAJOR > 52) || ((LIBAVCODEC_VERSION_MAJOR >= 52) && (LIBAVCODEC_VERSION_MINOR >= 23)) >+#define FFMPEG_HAVE_DECODE_AUDIO3 1 >+#define FFMPEG_HAVE_DECODE_VIDEO2 1 >+#endif >+ >+#if (LIBAVCODEC_VERSION_MAJOR > 52) || ((LIBAVCODEC_VERSION_MAJOR >= 52) && (LIBAVCODEC_VERSION_MINOR >= 64)) >+#define FFMPEG_HAVE_AVMEDIA_TYPES 1 >+#endif >+ >+#if ((LIBAVCODEC_VERSION_MAJOR > 52) || (LIBAVCODEC_VERSION_MAJOR >= 52) && (LIBAVCODEC_VERSION_MINOR >= 29)) && \ >+ ((LIBSWSCALE_VERSION_MAJOR > 0) || (LIBSWSCALE_VERSION_MAJOR >= 0) && (LIBSWSCALE_VERSION_MINOR >= 10)) >+#define FFMPEG_SWSCALE_COLOR_SPACE_SUPPORT >+#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 >+#define avio_size url_fsize >+#endif >+ >+/* there are some version inbetween, which have avio_... functions but no >+ AVIO_FLAG_... */ >+#ifndef AVIO_FLAG_WRITE >+#define AVIO_FLAG_WRITE URL_WRONLY >+#endif >+ >+#ifndef AV_PKT_FLAG_KEY >+#define AV_PKT_FLAG_KEY PKT_FLAG_KEY >+#endif >+ >+#ifndef FFMPEG_HAVE_AV_DUMP_FORMAT >+#define av_dump_format dump_format >+#endif >+ >+#ifndef FFMPEG_HAVE_AV_GUESS_FORMAT >+#define av_guess_format guess_format >+#endif >+ >+#ifndef FFMPEG_HAVE_PARSE_UTILS >+#define av_parse_video_rate av_parse_video_frame_rate >+#endif >+ >+#ifdef FFMPEG_HAVE_DEFAULT_VAL_UNION >+#define FFMPEG_DEF_OPT_VAL_INT(OPT) OPT->default_val.i64 >+#define FFMPEG_DEF_OPT_VAL_DOUBLE(OPT) OPT->default_val.dbl >+#else >+#define FFMPEG_DEF_OPT_VAL_INT(OPT) OPT->default_val >+#define FFMPEG_DEF_OPT_VAL_DOUBLE(OPT) OPT->default_val >+#endif >+ >+#ifndef FFMPEG_HAVE_AVMEDIA_TYPES >+#define AVMEDIA_TYPE_VIDEO CODEC_TYPE_VIDEO >+#define AVMEDIA_TYPE_AUDIO CODEC_TYPE_AUDIO >+#endif >+ >+#ifndef FFMPEG_HAVE_DECODE_AUDIO3 >+static inline >+int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples, >+ int *frame_size_ptr, AVPacket *avpkt) >+{ >+ return avcodec_decode_audio2(avctx, samples, >+ frame_size_ptr, avpkt->data, >+ avpkt->size); >+} >+#endif >+ >+#ifndef FFMPEG_HAVE_DECODE_VIDEO2 >+static inline >+int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, >+ int *got_picture_ptr, >+ AVPacket *avpkt) >+{ >+ return avcodec_decode_video(avctx, picture, got_picture_ptr, >+ avpkt->data, avpkt->size); >+} >+#endif >+ >+static inline >+int64_t av_get_pts_from_frame(AVFormatContext *avctx, AVFrame * picture) >+{ >+ int64_t pts = picture->pkt_pts; >+ >+ if (pts == AV_NOPTS_VALUE) { >+ pts = picture->pkt_dts; >+ } >+ if (pts == AV_NOPTS_VALUE) { >+ pts = 0; >+ } >+ >+ return pts; >+} >+ >+#endif >diff -Naurp blender-2.49b/source/blender/src/buttons_scene.c blender-2.49b/source/blender/src/buttons_scene.c >--- blender-2.49b/source/blender/src/buttons_scene.c 2009-09-01 15:21:46.000000000 +0000 >+++ blender-2.49b/source/blender/src/buttons_scene.c 2011-09-07 18:43:19.302387798 +0000 >@@ -109,9 +109,7 @@ > > #ifdef WITH_FFMPEG > >-#include <libavcodec/avcodec.h> /* for PIX_FMT_* and CODEC_ID_* */ >-#include <libavformat/avformat.h> >-#include <libavcodec/opt.h> >+#include "ffmpeg_compat.h" > > static int ffmpeg_preset_sel = 0; > >@@ -2723,12 +2721,12 @@ static IDProperty * ffmpeg_property_add( > switch (o->type) { > case FF_OPT_TYPE_INT: > case FF_OPT_TYPE_INT64: >- val.i = o->default_val; >+ val.i = FFMPEG_DEF_OPT_VAL_INT(o); > idp_type = IDP_INT; > break; > case FF_OPT_TYPE_DOUBLE: > case FF_OPT_TYPE_FLOAT: >- val.f = o->default_val; >+ val.f = FFMPEG_DEF_OPT_VAL_DOUBLE(o); > idp_type = IDP_FLOAT; > break; > case FF_OPT_TYPE_STRING:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 382161
: 285791