1 |
vapier 12/03/30 18:56:16 |
2 |
|
3 |
Added: xbmc-11.0-ffmpeg.patch xbmc-11.0-libav.patch |
4 |
Log: |
5 |
Add fixes by Tomáš Chvátal to build with libav #406215 by Ben Kohler. |
6 |
|
7 |
(Portage version: 2.2.0_alpha95/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 media-tv/xbmc/files/xbmc-11.0-ffmpeg.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-tv/xbmc/files/xbmc-11.0-ffmpeg.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-tv/xbmc/files/xbmc-11.0-ffmpeg.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: xbmc-11.0-ffmpeg.patch |
16 |
=================================================================== |
17 |
https://bugs.gentoo.org/406215 |
18 |
|
19 |
From 97212837ec81c3869ba60e0690f26c09b9428747 Mon Sep 17 00:00:00 2001 |
20 |
From: Tomas Chvatal <tchvatal@××××.cz> |
21 |
Date: Fri, 30 Mar 2012 10:00:46 +0200 |
22 |
Subject: [PATCH] Ensure we include proper header on ffmpeg. |
23 |
|
24 |
--- |
25 |
configure.in | 3 +++ |
26 |
lib/DllAvFilter.h | 6 +++++- |
27 |
2 files changed, 8 insertions(+), 1 deletions(-) |
28 |
|
29 |
diff --git a/configure.in b/configure.in |
30 |
index bca9239..d209f80 100755 |
31 |
--- a/configure.in |
32 |
+++ b/configure.in |
33 |
@@ -1229,6 +1229,9 @@ if test "$use_external_ffmpeg" = "yes"; then |
34 |
AC_CHECK_HEADERS([libswscale/rgb2rgb.h],,) |
35 |
AC_CHECK_HEADERS([ffmpeg/rgb2rgb.h],,) |
36 |
|
37 |
+ # check for avcodec header as it is not present on libav |
38 |
+ AC_CHECK_HEADERS([libavfilter/avcodec.h],,) |
39 |
+ |
40 |
# Check if AVFilterBufferRefVideoProps AVRational member is named |
41 |
# 'pixel_aspect' or 'sample_aspect_ratio'. |
42 |
AC_CHECK_MEMBER([AVFilterBufferRefVideoProps.sample_aspect_ratio], |
43 |
diff --git a/lib/DllAvFilter.h b/lib/DllAvFilter.h |
44 |
index 827746e..d47623b 100644 |
45 |
--- a/lib/DllAvFilter.h |
46 |
+++ b/lib/DllAvFilter.h |
47 |
@@ -48,7 +48,11 @@ extern "C" { |
48 |
#endif |
49 |
/* for av_vsrc_buffer_add_frame */ |
50 |
#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,8,0) |
51 |
- #include <libavfilter/vsrc_buffer.h> |
52 |
+ #if defined(HAVE_LIBAVFILTER_AVCODEC_H) |
53 |
+ #include <libavfilter/avcodec.h> |
54 |
+ #else |
55 |
+ #include <libavfilter/vsrc_buffer.h> |
56 |
+ #endif |
57 |
#elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0) |
58 |
int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, |
59 |
AVFrame *frame); |
60 |
-- |
61 |
1.7.3.4 |
62 |
|
63 |
|
64 |
|
65 |
|
66 |
1.1 media-tv/xbmc/files/xbmc-11.0-libav.patch |
67 |
|
68 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-tv/xbmc/files/xbmc-11.0-libav.patch?rev=1.1&view=markup |
69 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-tv/xbmc/files/xbmc-11.0-libav.patch?rev=1.1&content-type=text/plain |
70 |
|
71 |
Index: xbmc-11.0-libav.patch |
72 |
=================================================================== |
73 |
https://bugs.gentoo.org/406215 |
74 |
|
75 |
From c74abc298e2075f431d9fa700fcfc5e1bbbddf22 Mon Sep 17 00:00:00 2001 |
76 |
From: Tomas Chvatal <tchvatal@××××.cz> |
77 |
Date: Fri, 23 Mar 2012 12:08:53 +0100 |
78 |
Subject: [PATCH 2/2] Add support for libav api as it sligthly differ. |
79 |
|
80 |
The libav use micro version as 0 |
81 |
The ffmpeg use the micro version as 100+ |
82 |
|
83 |
Simply check if the variable is defined then it is not libav. |
84 |
--- |
85 |
lib/DllAvFilter.h | 10 +++++++++- |
86 |
.../DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 4 ++++ |
87 |
2 files changed, 13 insertions(+), 1 deletions(-) |
88 |
|
89 |
diff --git a/lib/DllAvFilter.h b/lib/DllAvFilter.h |
90 |
index 302e35c..827746e 100644 |
91 |
--- a/lib/DllAvFilter.h |
92 |
+++ b/lib/DllAvFilter.h |
93 |
@@ -48,7 +48,7 @@ extern "C" { |
94 |
#endif |
95 |
/* for av_vsrc_buffer_add_frame */ |
96 |
#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,8,0) |
97 |
- #include <libavfilter/avcodec.h> |
98 |
+ #include <libavfilter/vsrc_buffer.h> |
99 |
#elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0) |
100 |
int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, |
101 |
AVFrame *frame); |
102 |
@@ -83,7 +83,11 @@ public: |
103 |
virtual int avfilter_poll_frame(AVFilterLink *link)=0; |
104 |
virtual int avfilter_request_frame(AVFilterLink *link)=0; |
105 |
#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,13,0) |
106 |
+#if LIBAVFILTER_VERSION_MICRO |
107 |
virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags)=0; |
108 |
+#else |
109 |
+ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int64_t pts, AVRational pixel_aspect)=0; |
110 |
+#endif |
111 |
#elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0) |
112 |
virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame)=0; |
113 |
#elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,3,0) |
114 |
@@ -172,7 +176,11 @@ public: |
115 |
virtual int avfilter_poll_frame(AVFilterLink *link) { return ::avfilter_poll_frame(link); } |
116 |
virtual int avfilter_request_frame(AVFilterLink *link) { return ::avfilter_request_frame(link); } |
117 |
#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,13,0) |
118 |
+#if LIBAVFILTER_VERSION_MICRO |
119 |
virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame, flags); } |
120 |
+#else |
121 |
+ 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); } |
122 |
+#endif |
123 |
#elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0) |
124 |
virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame); } |
125 |
#elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,3,0) |
126 |
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp |
127 |
index b4e1451..4e5eedf 100644 |
128 |
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp |
129 |
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp |
130 |
@@ -814,7 +814,11 @@ int CDVDVideoCodecFFmpeg::FilterProcess(AVFrame* frame) |
131 |
if (frame) |
132 |
{ |
133 |
#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,13,0) |
134 |
+#if LIBAVFILTER_VERSION_MICRO |
135 |
result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, 0); |
136 |
+#else |
137 |
+ result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, frame->pts, m_pCodecContext->sample_aspect_ratio); |
138 |
+#endif |
139 |
#elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0) |
140 |
result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame); |
141 |
#elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,3,0) |
142 |
-- |
143 |
1.7.3.4 |