Gentoo Archives: gentoo-commits

From: "Peter Alfredsen (loki_val)" <loki_val@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-plugins/gst-plugins-ffmpeg/files/0.10.5: lavc.patch offset.patch system-ffmpeg-warning.patch
Date: Tue, 14 Oct 2008 14:32:01
Message-Id: E1KpkwH-0002tj-RF@stork.gentoo.org
1 loki_val 08/10/14 14:31:57
2
3 Added: lavc.patch offset.patch system-ffmpeg-warning.patch
4 Log:
5 Bump to 0.10.5, take maintainership since it seems I'm stuck with it.
6 (Portage version: 2.2_rc12/cvs/Linux 2.6.27-rc8 x86_64)
7
8 Revision Changes Path
9 1.1 media-plugins/gst-plugins-ffmpeg/files/0.10.5/lavc.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/gst-plugins-ffmpeg/files/0.10.5/lavc.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/gst-plugins-ffmpeg/files/0.10.5/lavc.patch?rev=1.1&content-type=text/plain
13
14 Index: lavc.patch
15 ===================================================================
16 Index: gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegcfg.c
17 ===================================================================
18 --- gst-ffmpeg-0.10.4.orig/ext/ffmpeg/gstffmpegcfg.c
19 +++ gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegcfg.c
20 @@ -272,7 +272,9 @@ gst_ffmpeg_flags_get_type (void)
21 {CODEC_FLAG_GRAY, "Only decode/encode grayscale", "gray"},
22 {CODEC_FLAG_NORMALIZE_AQP,
23 "Normalize Adaptive Quantization (masking, etc)", "aqp"},
24 +#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
25 {CODEC_FLAG_TRELLIS_QUANT, "Trellis Quantization", "trellis"},
26 +#endif
27 {CODEC_FLAG_GLOBAL_HEADER,
28 "Global headers in extradata instead of every keyframe",
29 "global-headers"},
30 @@ -669,6 +671,11 @@ gst_ffmpeg_cfg_init ()
31 "Prediction Method",
32 GST_TYPE_FFMPEG_PRED_METHOD, FF_PRED_LEFT, G_PARAM_READWRITE);
33 gst_ffmpeg_add_pspec (pspec, config.prediction_method, FALSE, huffyuv, NULL);
34 +#if LIBAVCODEC_VERSION_INT >= ((52<<16)+(0<<8)+0)
35 + pspec = g_param_spec_int ("trellis", "Trellis Quantization",
36 + "Trellis RD quantization", 0, 1, 1, G_PARAM_READWRITE);
37 + gst_ffmpeg_add_pspec (pspec, config.trellis, FALSE, mpeg, NULL);
38 +#endif
39 }
40
41 /* ==== END CONFIGURATION SECTION ==== */
42 Index: gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegcodecmap.c
43 ===================================================================
44 --- gst-ffmpeg-0.10.4.orig/ext/ffmpeg/gstffmpegcodecmap.c
45 +++ gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegcodecmap.c
46 @@ -332,7 +332,11 @@ gst_ffmpeg_codecid_to_caps (enum CodecID
47 NULL);
48 if (context) {
49 gst_caps_set_simple (caps,
50 +#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
51 "depth", G_TYPE_INT, context->bits_per_sample, NULL);
52 +#else
53 + "depth", G_TYPE_INT, context->bits_per_coded_sample, NULL);
54 +#endif
55 }
56 break;
57
58 @@ -511,7 +515,11 @@ gst_ffmpeg_codecid_to_caps (enum CodecID
59 caps = gst_ff_vid_caps_new (context, codec_id, "video/x-huffyuv", NULL);
60 if (context) {
61 gst_caps_set_simple (caps,
62 +#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
63 "bpp", G_TYPE_INT, context->bits_per_sample, NULL);
64 +#else
65 + "bpp", G_TYPE_INT, context->bits_per_coded_sample, NULL);
66 +#endif
67 }
68 break;
69
70 @@ -627,7 +635,11 @@ gst_ffmpeg_codecid_to_caps (enum CodecID
71 "layout", G_TYPE_STRING, "microsoft", NULL);
72 if (context) {
73 gst_caps_set_simple (caps,
74 +#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
75 "depth", G_TYPE_INT, (gint) context->bits_per_sample, NULL);
76 +#else
77 + "depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
78 +#endif
79 } else {
80 gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 1, 64, NULL);
81 }
82 @@ -638,7 +650,11 @@ gst_ffmpeg_codecid_to_caps (enum CodecID
83 "layout", G_TYPE_STRING, "quicktime", NULL);
84 if (context) {
85 gst_caps_set_simple (caps,
86 +#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
87 "depth", G_TYPE_INT, (gint) context->bits_per_sample, NULL);
88 +#else
89 + "depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
90 +#endif
91 } else {
92 gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 1, 64, NULL);
93 }
94 @@ -688,7 +704,11 @@ gst_ffmpeg_codecid_to_caps (enum CodecID
95 caps = gst_ff_vid_caps_new (context, codec_id, "video/x-camtasia", NULL);
96 if (context) {
97 gst_caps_set_simple (caps,
98 +#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
99 "depth", G_TYPE_INT, (gint) context->bits_per_sample, NULL);
100 +#else
101 + "depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
102 +#endif
103 } else {
104 gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 8, 32, NULL);
105 }
106 @@ -1026,7 +1046,11 @@ gst_ffmpeg_codecid_to_caps (enum CodecID
107 caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-alac", NULL);
108 if (context) {
109 gst_caps_set_simple (caps,
110 +#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
111 "samplesize", G_TYPE_INT, context->bits_per_sample, NULL);
112 +#else
113 + "samplesize", G_TYPE_INT, context->bits_per_coded_sample, NULL);
114 +#endif
115 }
116 break;
117
118 @@ -1049,7 +1073,11 @@ gst_ffmpeg_codecid_to_caps (enum CodecID
119 caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-tta", NULL);
120 if (context) {
121 gst_caps_set_simple (caps,
122 +#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
123 "samplesize", G_TYPE_INT, context->bits_per_sample, NULL);
124 +#else
125 + "samplesize", G_TYPE_INT, context->bits_per_coded_sample, NULL);
126 +#endif
127 }
128 break;
129 case CODEC_ID_VORBIS:
130 @@ -1416,7 +1444,11 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps
131
132 gst_structure_get_int (structure, "width", &context->width);
133 gst_structure_get_int (structure, "height", &context->height);
134 +#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
135 gst_structure_get_int (structure, "bpp", &context->bits_per_sample);
136 +#else
137 + gst_structure_get_int (structure, "bpp", &context->bits_per_coded_sample);
138 +#endif
139
140 fps = gst_structure_get_value (structure, "framerate");
141 if (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps)) {
142 @@ -1647,7 +1679,11 @@ gst_ffmpeg_caps_with_codecid (enum Codec
143 gint depth;
144
145 if (gst_structure_get_int (str, "depth", &depth)) {
146 +#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
147 context->bits_per_sample = depth;
148 +#else
149 + context->bits_per_coded_sample = depth;
150 +#endif
151 } else {
152 GST_WARNING ("No depth field in caps %" GST_PTR_FORMAT, caps);
153 }
154 @@ -1680,7 +1716,11 @@ gst_ffmpeg_caps_with_codecid (enum Codec
155 context->bit_rate = bitrate;
156 }
157 case CODEC_ID_ALAC:
158 +#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
159 gst_structure_get_int (str, "samplesize", &context->bits_per_sample);
160 +#else
161 + gst_structure_get_int (str, "samplesize", &context->bits_per_coded_sample);
162 +#endif
163 break;
164
165 case CODEC_ID_DVVIDEO:
166 Index: gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegdec.c
167 ===================================================================
168 --- gst-ffmpeg-0.10.4.orig/ext/ffmpeg/gstffmpegdec.c
169 +++ gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegdec.c
170 @@ -696,7 +696,11 @@ gst_ffmpegdec_setcaps (GstPad * pad, Gst
171
172 /* workaround encoder bugs */
173 ffmpegdec->context->workaround_bugs |= FF_BUG_AUTODETECT;
174 +#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
175 ffmpegdec->context->error_resilience = 1;
176 +#else
177 + ffmpegdec->context->error_recognition = 1;
178 +#endif
179
180 /* for slow cpus */
181 ffmpegdec->context->lowres = ffmpegdec->lowres;
182 @@ -2423,7 +2427,7 @@ gst_ffmpegdec_register (GstPlugin * plug
183 AVCodec *in_plugin;
184 gint rank;
185
186 - in_plugin = first_avcodec;
187 + in_plugin = av_codec_next(NULL);
188
189 GST_LOG ("Registering decoders");
190
191 @@ -2545,7 +2549,7 @@ gst_ffmpegdec_register (GstPlugin * plug
192 gst_caps_unref (sinkcaps);
193 if (srccaps)
194 gst_caps_unref (srccaps);
195 - in_plugin = in_plugin->next;
196 + in_plugin = av_codec_next(in_plugin);
197 }
198
199 GST_LOG ("Finished Registering decoders");
200 Index: gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegenc.c
201 ===================================================================
202 --- gst-ffmpeg-0.10.4.orig/ext/ffmpeg/gstffmpegenc.c
203 +++ gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegenc.c
204 @@ -306,8 +306,8 @@ gst_ffmpegenc_getcaps (GstPad * pad)
205 /* set some default properties */
206 ctx->width = DEFAULT_WIDTH;
207 ctx->height = DEFAULT_HEIGHT;
208 - ctx->time_base.num = DEFAULT_FRAME_RATE_BASE;
209 - ctx->time_base.den = 25 * DEFAULT_FRAME_RATE_BASE;
210 + ctx->time_base.num = 1;
211 + ctx->time_base.den = 25;
212 ctx->bit_rate = DEFAULT_VIDEO_BITRATE;
213 /* makes it silent */
214 ctx->strict_std_compliance = -1;
215 @@ -391,7 +391,9 @@ gst_ffmpegenc_setcaps (GstPad * pad, Gst
216
217 /* RTP payload used for GOB production (for Asterisk) */
218 if (ffmpegenc->rtp_payload_size) {
219 +#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
220 ffmpegenc->context->rtp_mode = 1;
221 +#endif
222 ffmpegenc->context->rtp_payload_size = ffmpegenc->rtp_payload_size;
223 }
224
225 @@ -944,13 +946,13 @@ gst_ffmpegenc_register (GstPlugin * plug
226 GType type;
227 AVCodec *in_plugin;
228
229 - in_plugin = first_avcodec;
230
231 GST_LOG ("Registering encoders");
232
233 /* build global ffmpeg param/property info */
234 gst_ffmpeg_cfg_init ();
235
236 + in_plugin = av_codec_next(NULL);
237 while (in_plugin) {
238 gchar *type_name;
239 GstCaps *srccaps = NULL, *sinkcaps = NULL;
240 @@ -1027,7 +1029,7 @@ gst_ffmpegenc_register (GstPlugin * plug
241 gst_caps_unref (sinkcaps);
242 if (srccaps)
243 gst_caps_unref (srccaps);
244 - in_plugin = in_plugin->next;
245 + in_plugin = av_codec_next(in_plugin);
246 }
247
248 GST_LOG ("Finished registering encoders");
249
250
251
252 1.1 media-plugins/gst-plugins-ffmpeg/files/0.10.5/offset.patch
253
254 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/gst-plugins-ffmpeg/files/0.10.5/offset.patch?rev=1.1&view=markup
255 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/gst-plugins-ffmpeg/files/0.10.5/offset.patch?rev=1.1&content-type=text/plain
256
257 Index: offset.patch
258 ===================================================================
259 Index: gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegprotocol.c
260 ===================================================================
261 --- gst-ffmpeg-0.10.4.orig/ext/ffmpeg/gstffmpegprotocol.c
262 +++ gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegprotocol.c
263 @@ -175,8 +175,8 @@ gst_ffmpegdata_write (URLContext * h, un
264 return size;
265 }
266
267 -static offset_t
268 -gst_ffmpegdata_seek (URLContext * h, offset_t pos, int whence)
269 +static int64_t
270 +gst_ffmpegdata_seek (URLContext * h, int64_t pos, int whence)
271 {
272 GstProtocolInfo *info;
273 guint64 newpos;
274
275
276
277 1.1 media-plugins/gst-plugins-ffmpeg/files/0.10.5/system-ffmpeg-warning.patch
278
279 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/gst-plugins-ffmpeg/files/0.10.5/system-ffmpeg-warning.patch?rev=1.1&view=markup
280 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/gst-plugins-ffmpeg/files/0.10.5/system-ffmpeg-warning.patch?rev=1.1&content-type=text/plain
281
282 Index: system-ffmpeg-warning.patch
283 ===================================================================
284 diff -NrU5 gst-ffmpeg-0.10.5.orig/configure gst-ffmpeg-0.10.5/configure
285 --- gst-ffmpeg-0.10.5.orig/configure 2008-10-14 15:37:05.000000000 +0200
286 +++ gst-ffmpeg-0.10.5/configure 2008-10-14 15:38:00.000000000 +0200
287 @@ -17231,68 +17231,10 @@
288 _ACEOF
289
290 HAVE_FFMPEG_UNINSTALLED=0
291 { $as_echo "$as_me:$LINENO: Using system-installed FFMpeg code" >&5
292 $as_echo "$as_me: Using system-installed FFMpeg code" >&6;}
293 - { $as_echo "$as_me:$LINENO: WARNING:
294 - ======================================================================
295 - WARNING: you have chosen to build gst-ffmpeg against a random
296 - external version of ffmpeg instead of building it against the tested
297 - internal ffmpeg snapshot that is included with gst-ffmpeg.
298 -
299 - This is a very bad idea. So bad in fact that words cannot express
300 - just how bad it is. Suffice to say that it is BAD.
301 -
302 - The GStreamer developers cannot and will not support a gst-ffmpeg
303 - built this way. Any bug reports that indicate there is an external
304 - version of ffmpeg involved will be closed immediately without further
305 - investigation.
306 -
307 - The reason such a setup can't be supported is that the ffmpeg API
308 - and ABI is in constant flux, yet there aren't any official releases
309 - of the ffmpeg library to develop against. This makes it impossible
310 - to guarantee that gst-ffmpeg will work reliably, or even compile,
311 - with a randomly picked version ffmpeg. Even if gst-ffmpeg compiles
312 - and superficially appears to work fine against your chosen external
313 - ffmpeg version, that might just not be the case on other systems, or
314 - even the same system at a later time, or when using decoders,
315 - encoders, demuxers or muxers that have not been tested.
316 -
317 - Please do not create or distribute binary packages of gst-ffmpeg
318 - that link against an external ffmpeg. Thank you!
319 - ======================================================================
320 - " >&5
321 -$as_echo "$as_me: WARNING:
322 - ======================================================================
323 - WARNING: you have chosen to build gst-ffmpeg against a random
324 - external version of ffmpeg instead of building it against the tested
325 - internal ffmpeg snapshot that is included with gst-ffmpeg.
326 -
327 - This is a very bad idea. So bad in fact that words cannot express
328 - just how bad it is. Suffice to say that it is BAD.
329 -
330 - The GStreamer developers cannot and will not support a gst-ffmpeg
331 - built this way. Any bug reports that indicate there is an external
332 - version of ffmpeg involved will be closed immediately without further
333 - investigation.
334 -
335 - The reason such a setup can't be supported is that the ffmpeg API
336 - and ABI is in constant flux, yet there aren't any official releases
337 - of the ffmpeg library to develop against. This makes it impossible
338 - to guarantee that gst-ffmpeg will work reliably, or even compile,
339 - with a randomly picked version ffmpeg. Even if gst-ffmpeg compiles
340 - and superficially appears to work fine against your chosen external
341 - ffmpeg version, that might just not be the case on other systems, or
342 - even the same system at a later time, or when using decoders,
343 - encoders, demuxers or muxers that have not been tested.
344 -
345 - Please do not create or distribute binary packages of gst-ffmpeg
346 - that link against an external ffmpeg. Thank you!
347 - ======================================================================
348 - " >&2;}
349 -
350 - sleep 15
351 else
352
353 source "$srcdir/ffmpegrev"
354
355 { $as_echo "$as_me:$LINENO: Using ffmpeg revision $FFMPEG_REVISION" >&5