summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2012-03-15 18:49:17 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2012-03-15 18:49:17 +0000
commite92fb32bcfc8b4e30cb495d4e16d0194916622ce (patch)
tree4cc304ae2bb9eac63e3275b1c34d9ce91283df6b /media-tv
parentMove xv.png to mirrors wrt #370905 by Matt Turner (diff)
downloadgentoo-2-e92fb32bcfc8b4e30cb495d4e16d0194916622ce.tar.gz
gentoo-2-e92fb32bcfc8b4e30cb495d4e16d0194916622ce.tar.bz2
gentoo-2-e92fb32bcfc8b4e30cb495d4e16d0194916622ce.zip
Make the eden build againts new ffmpeg api in libav. This should be included in trunk based on github.
(Portage version: 2.2.0_alpha90/cvs/Linux x86_64)
Diffstat (limited to 'media-tv')
-rw-r--r--media-tv/xbmc/ChangeLog7
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-libav-0.8.patch150
-rw-r--r--media-tv/xbmc/xbmc-11.0_rc2.ebuild3
3 files changed, 158 insertions, 2 deletions
diff --git a/media-tv/xbmc/ChangeLog b/media-tv/xbmc/ChangeLog
index 1797123fa47d..8fc1151821dc 100644
--- a/media-tv/xbmc/ChangeLog
+++ b/media-tv/xbmc/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for media-tv/xbmc
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/ChangeLog,v 1.119 2012/03/15 18:31:12 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/ChangeLog,v 1.120 2012/03/15 18:49:17 scarabeus Exp $
+
+ 15 Mar 2012; Tomáš Chvátal <scarabeus@gentoo.org>
+ +files/xbmc-11.0-libav-0.8.patch, xbmc-11.0_rc2.ebuild:
+ Make the eden build againts new ffmpeg api in libav. This should be included
+ in trunk based on github.
*xbmc-11.0_rc2 (15 Mar 2012)
diff --git a/media-tv/xbmc/files/xbmc-11.0-libav-0.8.patch b/media-tv/xbmc/files/xbmc-11.0-libav-0.8.patch
new file mode 100644
index 000000000000..6735b2ded59b
--- /dev/null
+++ b/media-tv/xbmc/files/xbmc-11.0-libav-0.8.patch
@@ -0,0 +1,150 @@
+diff --git a/configure.in b/configure.in
+index bca9239..27297b8 100755
+--- a/configure.in
++++ b/configure.in
+@@ -1248,7 +1248,11 @@ if test "$use_external_ffmpeg" = "yes"; then
+ AC_DEFINE([USE_EXTERNAL_FFMPEG], [1], [Whether to use external FFmpeg libraries.])
+
+ # Disable vdpau support if external libavcodec doesn't have it
+- AC_CHECK_LIB([avcodec], [ff_vdpau_vc1_decode_picture],,
++ AC_RUN_IFELSE(
++ AC_LANG_PROGRAM([[#include <libavcodec/avcodec.h>]],
++ [[avcodec_register_all();
++ AVCodec *codec = avcodec_find_decoder_by_name("vc1_vdpau");
++ return (codec) ? 0 : 1;]]),,
+ [if test "x$use_vdpau" = "xyes"; then
+ AC_MSG_ERROR($ffmpeg_vdpau_not_supported)
+ else
+@@ -1256,6 +1260,23 @@ if test "$use_external_ffmpeg" = "yes"; then
+ AC_MSG_RESULT($ffmpeg_vdpau_not_supported)
+ fi])
+
++ # Other headers to include if available.
++ AC_CHECK_HEADERS([libavutil/mathematics.h],,)
++
++ # Check if <libavfilter/vsrc_buffer.h> exists and defines old
++ # av_vsrc_buffer_add_frame() from SoC. This avoids multiple declarations of
++ # av_vsrc_buffer_add_frame().
++ AC_COMPILE_IFELSE(
++ AC_LANG_SOURCE([[
++ #include <libavfilter/vsrc_buffer.h>
++ void foo(void)
++ {
++ AVRational a;
++ av_vsrc_buffer_add_frame(NULL, NULL, 0, a);
++ }
++ ]]), AC_DEFINE([USE_OLD_AV_VSRC_BUFFER_ADD_FRAME],
++ [1], [Check if SoC av_vsrc_buffer_add_frame() is defined in libavfilter/vsrc_buffer.h.]),)
++
+ # Check for 'PIX_FMT_VDPAU_MPEG4' from libavutil
+ if test "x$use_vdpau" != "xno"; then
+ AC_LANG_PUSH([C++])
+diff --git a/lib/DllAvFilter.h b/lib/DllAvFilter.h
+index 302e35c..a421225 100644
+--- a/lib/DllAvFilter.h
++++ b/lib/DllAvFilter.h
+@@ -47,17 +47,21 @@
+ #include <ffmpeg/avfiltergraph.h>
+ #endif
+ /* for av_vsrc_buffer_add_frame */
+- #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,8,0)
+- #include <libavfilter/avcodec.h>
+- #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0)
+- int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter,
+- AVFrame *frame);
+- #elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,3,0)
+- int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter,
+- AVFrame *frame, int64_t pts);
++ #if (defined USE_OLD_AV_VSRC_BUFFER_ADD_FRAME)
++ #include <libavfilter/vsrc_buffer.h>
+ #else
+- int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter,
+- AVFrame *frame, int64_t pts, AVRational pixel_aspect);
++ #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,8,0)
++ #include <libavfilter/avcodec.h>
++ #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0)
++ int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter,
++ AVFrame *frame);
++ #elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,3,0)
++ int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter,
++ AVFrame *frame, int64_t pts);
++ #else
++ int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter,
++ AVFrame *frame, int64_t pts, AVRational pixel_aspect);
++ #endif
+ #endif
+ #else
+ #include "libavfilter/avfiltergraph.h"
+@@ -82,6 +86,9 @@ class DllAvFilterInterface
+ virtual int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx)=0;
+ virtual int avfilter_poll_frame(AVFilterLink *link)=0;
+ virtual int avfilter_request_frame(AVFilterLink *link)=0;
++#if (defined USE_OLD_AV_VSRC_BUFFER_ADD_FRAME)
++ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int64_t pts, AVRational pixel_aspect)=0;
++#else
+ #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,13,0)
+ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags)=0;
+ #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0)
+@@ -91,6 +98,7 @@ class DllAvFilterInterface
+ #else
+ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int64_t pts, AVRational pixel_aspect)=0;
+ #endif
++#endif
+ virtual AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)=0;
+ virtual void avfilter_unref_buffer(AVFilterBufferRef *ref)=0;
+ virtual int avfilter_link(AVFilterContext *src, unsigned srcpad, AVFilterContext *dst, unsigned dstpad)=0;
+@@ -171,6 +179,9 @@ class DllAvFilter : public DllDynamic, DllAvFilterInterface
+ }
+ virtual int avfilter_poll_frame(AVFilterLink *link) { return ::avfilter_poll_frame(link); }
+ virtual int avfilter_request_frame(AVFilterLink *link) { return ::avfilter_request_frame(link); }
++#if (defined USE_OLD_AV_VSRC_BUFFER_ADD_FRAME)
++ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int64_t pts, AVRational pixel_aspect) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame, pts, pixel_aspect); }
++#else
+ #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,13,0)
+ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame, flags); }
+ #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0)
+@@ -180,6 +191,7 @@ class DllAvFilter : public DllDynamic, DllAvFilterInterface
+ #else
+ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int64_t pts, AVRational pixel_aspect) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame, pts, pixel_aspect); }
+ #endif
++#endif
+ virtual AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h) { return ::avfilter_get_video_buffer(link, perms, w, h); }
+ virtual void avfilter_unref_buffer(AVFilterBufferRef *ref) { ::avfilter_unref_buffer(ref); }
+ virtual int avfilter_link(AVFilterContext *src, unsigned srcpad, AVFilterContext *dst, unsigned dstpad) { return ::avfilter_link(src, srcpad, dst, dstpad); }
+diff --git a/lib/DllAvUtil.h b/lib/DllAvUtil.h
+index e882cac..b8bb2d6 100644
+--- a/lib/DllAvUtil.h
++++ b/lib/DllAvUtil.h
+@@ -59,6 +59,10 @@
+ #else
+ #include <ffmpeg/mem.h>
+ #endif
++ /* For AVRounding */
++ #if (defined HAVE_LIBAVUTIL_MATHEMATICS_H)
++ #include <libavutil/mathematics.h>
++ #endif
+ #else
+ #include "libavutil/avutil.h"
+ #include "libavutil/crc.h"
+diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+index c79ead4..c59130f 100644
+--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
++++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+@@ -787,6 +787,9 @@ int CDVDVideoCodecFFmpeg::FilterProcess(AVFrame* frame)
+
+ if (frame)
+ {
++#if (defined USE_OLD_AV_VSRC_BUFFER_ADD_FRAME)
++ result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, frame->pts, m_pCodecContext->sample_aspect_ratio);
++#else
+ #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,13,0)
+ result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, 0);
+ #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0)
+@@ -796,6 +799,7 @@ int CDVDVideoCodecFFmpeg::FilterProcess(AVFrame* frame)
+ #else
+ result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, frame->pts, m_pCodecContext->sample_aspect_ratio);
+ #endif
++#endif
+
+ if (result < 0)
+ {
diff --git a/media-tv/xbmc/xbmc-11.0_rc2.ebuild b/media-tv/xbmc/xbmc-11.0_rc2.ebuild
index 9d484febad26..2b0c673847f4 100644
--- a/media-tv/xbmc/xbmc-11.0_rc2.ebuild
+++ b/media-tv/xbmc/xbmc-11.0_rc2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/xbmc-11.0_rc2.ebuild,v 1.1 2012/03/15 18:31:12 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/xbmc-11.0_rc2.ebuild,v 1.2 2012/03/15 18:49:17 scarabeus Exp $
EAPI="4"
@@ -124,6 +124,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-9999-nomythtv.patch
epatch "${FILESDIR}"/${PN}-9999-no-arm-flags.patch #400617
epatch "${FILESDIR}"/${PN}-9999-no-exec-stack.patch
+ epatch "${FILESDIR}"/${PN}-11.0-libav-0.8.patch
# The mythtv patch touches configure.ac, so force a regen
rm -f configure