1 |
polynomial-c 14/04/29 09:02:07 |
2 |
|
3 |
Added: opal-3.10.11-libav9-gentoo.patch |
4 |
Log: |
5 |
Version bump. Fixed compilation with >=media-video/ffmpeg-2 and >=media-video/libav-9 (bug #443206) |
6 |
|
7 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 net-libs/opal/files/opal-3.10.11-libav9-gentoo.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/opal/files/opal-3.10.11-libav9-gentoo.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/opal/files/opal-3.10.11-libav9-gentoo.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: opal-3.10.11-libav9-gentoo.patch |
16 |
=================================================================== |
17 |
--- plugins/video/common/dyna.cxx |
18 |
+++ plugins/video/common/dyna.cxx |
19 |
@@ -37,6 +37,7 @@ |
20 |
* Craig Southeren (craigs@×××××××××××××.com) |
21 |
* Matthias Schneider (ma30002000@×××××.de) |
22 |
*/ |
23 |
+#include <stdio.h> |
24 |
#include "dyna.h" |
25 |
|
26 |
bool DynaLink::Open(const char *name) |
27 |
@@ -210,14 +211,14 @@ |
28 |
#endif |
29 |
|
30 |
|
31 |
-FFMPEGLibrary::FFMPEGLibrary(CodecID codec) |
32 |
+FFMPEGLibrary::FFMPEGLibrary(AVCodecID codec) |
33 |
{ |
34 |
m_codec = codec; |
35 |
- if (m_codec==CODEC_ID_H264) |
36 |
+ if (m_codec==AV_CODEC_ID_H264) |
37 |
snprintf( m_codecString, sizeof(m_codecString), "H264"); |
38 |
- if (m_codec==CODEC_ID_H263P) |
39 |
+ if (m_codec==AV_CODEC_ID_H263P) |
40 |
snprintf( m_codecString, sizeof(m_codecString), "H263+"); |
41 |
- if (m_codec==CODEC_ID_MPEG4) |
42 |
+ if (m_codec==AV_CODEC_ID_MPEG4) |
43 |
snprintf( m_codecString, sizeof(m_codecString), "MPEG4"); |
44 |
m_isLoadedOK = false; |
45 |
} |
46 |
@@ -348,12 +349,12 @@ |
47 |
return true; |
48 |
} |
49 |
|
50 |
-AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum CodecID id) |
51 |
+AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum AVCodecID id) |
52 |
{ |
53 |
return Favcodec_find_encoder(id); |
54 |
} |
55 |
|
56 |
-AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum CodecID id) |
57 |
+AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum AVCodecID id) |
58 |
{ |
59 |
WaitAndSignal m(processLock); |
60 |
|
61 |
--- plugins/video/common/dyna.h |
62 |
+++ plugins/video/common/dyna.h |
63 |
@@ -88,13 +88,13 @@ |
64 |
class FFMPEGLibrary |
65 |
{ |
66 |
public: |
67 |
- FFMPEGLibrary(CodecID codec); |
68 |
+ FFMPEGLibrary(AVCodecID codec); |
69 |
~FFMPEGLibrary(); |
70 |
|
71 |
bool Load(); |
72 |
|
73 |
- AVCodec *AvcodecFindEncoder(enum CodecID id); |
74 |
- AVCodec *AvcodecFindDecoder(enum CodecID id); |
75 |
+ AVCodec *AvcodecFindEncoder(enum AVCodecID id); |
76 |
+ AVCodec *AvcodecFindDecoder(enum AVCodecID id); |
77 |
AVCodecContext *AvcodecAllocContext(void); |
78 |
AVFrame *AvcodecAllocFrame(void); |
79 |
int AvcodecOpen(AVCodecContext *ctx, AVCodec *codec); |
80 |
@@ -117,15 +117,15 @@ |
81 |
DynaLink m_libAvcodec; |
82 |
DynaLink m_libAvutil; |
83 |
|
84 |
- CodecID m_codec; |
85 |
+ AVCodecID m_codec; |
86 |
char m_codecString[32]; |
87 |
|
88 |
void (*Favcodec_init)(void); |
89 |
void (*Fav_init_packet)(AVPacket *pkt); |
90 |
|
91 |
void (*Favcodec_register_all)(void); |
92 |
- AVCodec *(*Favcodec_find_encoder)(enum CodecID id); |
93 |
- AVCodec *(*Favcodec_find_decoder)(enum CodecID id); |
94 |
+ AVCodec *(*Favcodec_find_encoder)(enum AVCodecID id); |
95 |
+ AVCodec *(*Favcodec_find_decoder)(enum AVCodecID id); |
96 |
AVCodecContext *(*Favcodec_alloc_context)(void); |
97 |
AVFrame *(*Favcodec_alloc_frame)(void); |
98 |
int (*Favcodec_open)(AVCodecContext *ctx, AVCodec *codec); |
99 |
--- plugins/video/H.263-1998/h263-1998.cxx |
100 |
+++ plugins/video/H.263-1998/h263-1998.cxx |
101 |
@@ -43,6 +43,12 @@ |
102 |
* $Date: 2014/04/29 09:02:06 $ |
103 |
*/ |
104 |
|
105 |
+#define CODEC_FLAG_H263P_UMV 0x02000000 |
106 |
+#define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000 |
107 |
+#define CODEC_FLAG_H263P_AIV 0x00000008 |
108 |
+#define CODEC_FLAG_OBMC 0x00000001 |
109 |
+#define FF_I_TYPE 1 |
110 |
+ |
111 |
#ifndef PLUGIN_CODEC_DLL_EXPORTS |
112 |
#include "plugin-config.h" |
113 |
#endif |
114 |
@@ -94,7 +100,7 @@ |
115 |
{ CIF16_WIDTH, CIF16_HEIGHT, PLUGINCODEC_CIF16_MPI }, |
116 |
}; |
117 |
|
118 |
-static FFMPEGLibrary FFMPEGLibraryInstance(CODEC_ID_H263P); |
119 |
+static FFMPEGLibrary FFMPEGLibraryInstance(AV_CODEC_ID_H263P); |
120 |
|
121 |
|
122 |
///////////////////////////////////////////////////////////////////////////// |
123 |
@@ -203,7 +209,7 @@ |
124 |
PTRACE(4, m_prefix, "Encoder closed"); |
125 |
} |
126 |
|
127 |
-bool H263_Base_EncoderContext::Init(CodecID codecId) |
128 |
+bool H263_Base_EncoderContext::Init(AVCodecID codecId) |
129 |
{ |
130 |
PTRACE(5, m_prefix, "Opening encoder"); |
131 |
|
132 |
@@ -616,7 +622,7 @@ |
133 |
|
134 |
bool H263_RFC2190_EncoderContext::Init() |
135 |
{ |
136 |
- if (!H263_Base_EncoderContext::Init(CODEC_ID_H263)) |
137 |
+ if (!H263_Base_EncoderContext::Init(AV_CODEC_ID_H263)) |
138 |
return false; |
139 |
|
140 |
#if LIBAVCODEC_RTP_MODE |
141 |
@@ -661,7 +667,7 @@ |
142 |
|
143 |
bool H263_RFC2429_EncoderContext::Init() |
144 |
{ |
145 |
- return H263_Base_EncoderContext::Init(CODEC_ID_H263P); |
146 |
+ return H263_Base_EncoderContext::Init(AV_CODEC_ID_H263P); |
147 |
} |
148 |
|
149 |
|
150 |
@@ -685,7 +691,7 @@ |
151 |
if (!FFMPEGLibraryInstance.Load()) |
152 |
return; |
153 |
|
154 |
- if ((m_codec = FFMPEGLibraryInstance.AvcodecFindDecoder(CODEC_ID_H263)) == NULL) { |
155 |
+ if ((m_codec = FFMPEGLibraryInstance.AvcodecFindDecoder(AV_CODEC_ID_H263)) == NULL) { |
156 |
PTRACE(1, m_prefix, "Codec not found for decoder"); |
157 |
return; |
158 |
} |
159 |
--- plugins/video/H.263-1998/h263-1998.h |
160 |
+++ plugins/video/H.263-1998/h263-1998.h |
161 |
@@ -115,7 +115,7 @@ |
162 |
virtual ~H263_Base_EncoderContext(); |
163 |
|
164 |
virtual bool Init() = 0; |
165 |
- virtual bool Init(CodecID codecId); |
166 |
+ virtual bool Init(AVCodecID codecId); |
167 |
|
168 |
virtual bool SetOptions(const char * const * options); |
169 |
virtual void SetOption(const char * option, const char * value); |
170 |
--- plugins/video/H.263-1998/Makefile.in |
171 |
+++ plugins/video/H.263-1998/Makefile.in |
172 |
@@ -34,7 +34,7 @@ |
173 |
$(COMMONDIR)/mpi.cxx \ |
174 |
$(COMMONDIR)/dyna.cxx |
175 |
|
176 |
-CXXFLAGS += @LIBAVCODEC_CFLAGS@ -I$(COMMONDIR) |
177 |
+CXXFLAGS += @LIBAVCODEC_CFLAGS@ -I$(COMMONDIR) -fpermissive |
178 |
LIBS += @DL_LIBS@ |
179 |
|
180 |
HAVE_LIBAVCODEC_RTP_MODE=@HAVE_LIBAVCODEC_RTP_MODE@ |
181 |
--- plugins/video/H.264/h264-x264.cxx |
182 |
+++ plugins/video/H.264/h264-x264.cxx |
183 |
@@ -36,6 +36,15 @@ |
184 |
* $Date: 2014/04/29 09:02:06 $ |
185 |
*/ |
186 |
|
187 |
+#define FF_ER_AGGRESSIVE 3 |
188 |
+#define CODEC_FLAG2_BRDO 0x00000400 |
189 |
+#define CODEC_FLAG2_MEMC_ONLY 0x00001000 |
190 |
+#define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000 |
191 |
+#define CODEC_FLAG2_SKIP_RD 0x00004000 ///< RD optimal MB level residual skipping |
192 |
+#define FF_IDCT_H264 11 |
193 |
+ |
194 |
+#include <stdio.h> |
195 |
+ |
196 |
#ifndef PLUGIN_CODEC_DLL_EXPORTS |
197 |
#include "plugin-config.h" |
198 |
#endif |
199 |
@@ -104,7 +113,7 @@ |
200 |
|
201 |
/////////////////////////////////////////////////////////////////////////////// |
202 |
|
203 |
-FFMPEGLibrary FFMPEGLibraryInstance(CODEC_ID_H264); |
204 |
+FFMPEGLibrary FFMPEGLibraryInstance(AV_CODEC_ID_H264); |
205 |
|
206 |
PLUGINCODEC_CONTROL_LOG_FUNCTION_DEF |
207 |
|
208 |
@@ -1064,7 +1073,7 @@ |
209 |
allows you to fail the create operation (return false), which cannot |
210 |
be done in the normal C++ constructor. */ |
211 |
|
212 |
- if ((m_codec = FFMPEGLibraryInstance.AvcodecFindDecoder(CODEC_ID_H264)) == NULL) |
213 |
+ if ((m_codec = FFMPEGLibraryInstance.AvcodecFindDecoder(AV_CODEC_ID_H264)) == NULL) |
214 |
return false; |
215 |
|
216 |
if ((m_context = FFMPEGLibraryInstance.AvcodecAllocContext()) == NULL) |
217 |
@@ -1072,7 +1081,7 @@ |
218 |
|
219 |
m_context->workaround_bugs = FF_BUG_AUTODETECT; |
220 |
#ifdef FF_ER_AGGRESSIVE |
221 |
- m_context->error_recognition = FF_ER_AGGRESSIVE; |
222 |
+ m_context->err_recognition = FF_ER_AGGRESSIVE; |
223 |
#endif |
224 |
m_context->idct_algo = FF_IDCT_H264; |
225 |
m_context->error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK; |
226 |
|
227 |
--- plugins/video/MPEG4-ffmpeg/mpeg4.cxx |
228 |
+++ plugins/video/MPEG4-ffmpeg/mpeg4.cxx |
229 |
@@ -53,6 +53,11 @@ |
230 |
|
231 |
*/ |
232 |
|
233 |
+#define CODEC_FLAG_H263P_UMV 0x02000000 |
234 |
+#define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000 |
235 |
+#define FF_I_TYPE 1 |
236 |
+#define CODEC_FLAG_PART 0x0080 |
237 |
+ |
238 |
// Plugin specific |
239 |
#define _CRT_SECURE_NO_DEPRECATE |
240 |
|
241 |
@@ -205,7 +210,7 @@ |
242 |
{ 0 } |
243 |
}; |
244 |
|
245 |
-FFMPEGLibrary FFMPEGLibraryInstance(CODEC_ID_MPEG4); |
246 |
+FFMPEGLibrary FFMPEGLibraryInstance(AV_CODEC_ID_MPEG4); |
247 |
|
248 |
|
249 |
static bool mpeg4IsIframe (BYTE * frameBuffer, unsigned int frameLen ) |
250 |
@@ -701,7 +706,7 @@ |
251 |
return false; |
252 |
} |
253 |
|
254 |
- if((m_avcodec = FFMPEGLibraryInstance.AvcodecFindEncoder(CODEC_ID_MPEG4)) == NULL){ |
255 |
+ if((m_avcodec = FFMPEGLibraryInstance.AvcodecFindEncoder(AV_CODEC_ID_MPEG4)) == NULL){ |
256 |
PTRACE(1, "MPEG4", "Encoder not found"); |
257 |
return false; |
258 |
} |
259 |
@@ -1391,7 +1396,7 @@ |
260 |
|
261 |
bool MPEG4DecoderContext::OpenCodec() |
262 |
{ |
263 |
- if ((m_avcodec = FFMPEGLibraryInstance.AvcodecFindDecoder(CODEC_ID_MPEG4)) == NULL) { |
264 |
+ if ((m_avcodec = FFMPEGLibraryInstance.AvcodecFindDecoder(AV_CODEC_ID_MPEG4)) == NULL) { |
265 |
PTRACE(1, "MPEG4", "Decoder not found for encoder"); |
266 |
return false; |
267 |
} |
268 |
--- plugins/video/MPEG4-ffmpeg/Makefile.in |
269 |
+++ plugins/video/MPEG4-ffmpeg/Makefile.in |
270 |
@@ -30,7 +30,7 @@ |
271 |
SRCDIR := . |
272 |
SRCS := mpeg4.cxx $(COMMONDIR)/dyna.cxx |
273 |
|
274 |
-CXXFLAGS += @LIBAVCODEC_CFLAGS@ -I$(COMMONDIR) |
275 |
+CXXFLAGS += @LIBAVCODEC_CFLAGS@ -I$(COMMONDIR) -fpermissive |
276 |
LIBS += @DL_LIBS@ |
277 |
|
278 |
# Add LIBAVCODEC_SOURCE_DIR to the include path so we can #include <libavcodec/...h> |