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.4: 01_new-codec-ids.patch 03_disable-aac.patch 02_av_picture_copy.patch 04_disable-mpegts.patch
Date: Mon, 23 Jun 2008 22:34:53
Message-Id: E1KAucZ-0001fR-Nw@stork.gentoo.org
1 loki_val 08/06/23 22:34:47
2
3 Added: 01_new-codec-ids.patch 03_disable-aac.patch
4 02_av_picture_copy.patch 04_disable-mpegts.patch
5 Log:
6 Revbump with patches to fix interaction with newer ffmpeg, courtesy of Debian. Fixes bug 229015.
7 (Portage version: 2.2_rc1/cvs/Linux 2.6.25.8 i686)
8
9 Revision Changes Path
10 1.1 media-plugins/gst-plugins-ffmpeg/files/0.10.4/01_new-codec-ids.patch
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/gst-plugins-ffmpeg/files/0.10.4/01_new-codec-ids.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/gst-plugins-ffmpeg/files/0.10.4/01_new-codec-ids.patch?rev=1.1&content-type=text/plain
14
15 Index: 01_new-codec-ids.patch
16 ===================================================================
17 --- ext/ffmpeg/gstffmpegcodecmap.c.old 2008-05-12 17:24:59.000000000 +0200
18 +++ ext/ffmpeg/gstffmpegcodecmap.c 2008-05-12 17:26:20.000000000 +0200
19 @@ -1051,6 +1051,9 @@
20 "samplesize", G_TYPE_INT, context->bits_per_sample, NULL);
21 }
22 break;
23 + case CODEC_ID_VORBIS:
24 + caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-vorbis", NULL);
25 + break;
26 default:
27 g_warning ("Unknown codec ID %d, please add here", codec_id);
28 break;
29
30
31
32 1.1 media-plugins/gst-plugins-ffmpeg/files/0.10.4/03_disable-aac.patch
33
34 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/gst-plugins-ffmpeg/files/0.10.4/03_disable-aac.patch?rev=1.1&view=markup
35 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/gst-plugins-ffmpeg/files/0.10.4/03_disable-aac.patch?rev=1.1&content-type=text/plain
36
37 Index: 03_disable-aac.patch
38 ===================================================================
39 --- ext/ffmpeg/gstffmpegdec.c.old 2008-05-23 11:45:42.000000000 +0200
40 +++ ext/ffmpeg/gstffmpegdec.c 2008-05-23 11:48:52.000000000 +0200
41 @@ -2456,7 +2456,9 @@
42 !strcmp (in_plugin->name, "vorbis") ||
43 !strcmp (in_plugin->name, "mpeg1video") ||
44 !strcmp (in_plugin->name, "wavpack") ||
45 - !strcmp (in_plugin->name, "mp2")) {
46 + !strcmp (in_plugin->name, "mp2") ||
47 + !strcmp (in_plugin->name, "libfaad") ||
48 + !strcmp (in_plugin->name, "mpeg4aac")) {
49 GST_LOG ("Ignoring decoder %s", in_plugin->name);
50 goto next;
51 }
52
53
54
55 1.1 media-plugins/gst-plugins-ffmpeg/files/0.10.4/02_av_picture_copy.patch
56
57 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/gst-plugins-ffmpeg/files/0.10.4/02_av_picture_copy.patch?rev=1.1&view=markup
58 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/gst-plugins-ffmpeg/files/0.10.4/02_av_picture_copy.patch?rev=1.1&content-type=text/plain
59
60 Index: 02_av_picture_copy.patch
61 ===================================================================
62 diff -up gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegcodecmap.c~ gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegcodecmap.c
63 --- gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegcodecmap.c~ 2008-05-22 20:18:14.000000000 +0200
64 +++ gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegcodecmap.c 2008-05-22 20:18:14.000000000 +0200
65 @@ -3287,29 +3287,3 @@ gst_ffmpeg_avpicture_fill (AVPicture * p
66
67 return 0;
68 }
69 -
70 -/**
71 - * Convert image 'src' to 'dst'.
72 - *
73 - * We use this code to copy two pictures between the same
74 - * colorspaces, so this function is not realy used to do
75 - * colorspace conversion.
76 - * The ffmpeg code has a bug in it where odd sized frames were
77 - * not copied completely. We adjust the input parameters for
78 - * the original ffmpeg img_convert function here so that it
79 - * still does the right thing.
80 - */
81 -int
82 -gst_ffmpeg_img_convert (AVPicture * dst, int dst_pix_fmt,
83 - const AVPicture * src, int src_pix_fmt, int src_width, int src_height)
84 -{
85 - struct SwsContext *ctx;
86 - int res;
87 -
88 - ctx = sws_getContext (src_width, src_height, src_pix_fmt, src_width, src_height, dst_pix_fmt, 2, /* flags : bicubic */
89 - NULL, NULL, NULL);
90 - res = sws_scale (ctx, (uint8_t **) src->data, (int *) src->linesize,
91 - 2, src_width, dst->data, dst->linesize);
92 - sws_freeContext (ctx);
93 - return res;
94 -}
95 diff -up gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegcodecmap.h~ gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegcodecmap.h
96 --- gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegcodecmap.h~ 2008-05-22 20:17:56.000000000 +0200
97 +++ gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegcodecmap.h 2008-05-22 20:17:56.000000000 +0200
98 @@ -125,15 +125,6 @@ gst_ffmpeg_avpicture_fill (AVPicture * p
99 int height);
100
101 /*
102 - * convert an image, we only use this for copying the image, ie,
103 - * convert between the same colorspaces.
104 - */
105 -int
106 -gst_ffmpeg_img_convert (AVPicture * dst, int dst_pix_fmt,
107 - const AVPicture * src, int src_pix_fmt,
108 - int src_width, int src_height);
109 -
110 -/*
111 * Convert from/to a GStreamer <-> FFMpeg timestamp.
112 */
113 static inline guint64
114 diff -up gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegdec.c~ gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegdec.c
115 --- gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegdec.c~ 2008-05-22 20:27:02.000000000 +0200
116 +++ gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegdec.c 2008-05-22 20:27:02.000000000 +0200
117 @@ -1342,11 +1342,7 @@ get_output_buffer (GstFFMpegDec * ffmpeg
118 gst_ffmpeg_avpicture_fill (&pic, GST_BUFFER_DATA (*outbuf),
119 ffmpegdec->context->pix_fmt, width, height);
120
121 - /* the original convert function did not do the right thing, this
122 - * is a patched up version that adjust widht/height so that the
123 - * ffmpeg one works correctly. */
124 - gst_ffmpeg_img_convert (&pic, ffmpegdec->context->pix_fmt,
125 - (AVPicture *) ffmpegdec->picture,
126 + av_picture_copy(&pic, (AVPicture *) ffmpegdec->picture,
127 ffmpegdec->context->pix_fmt, width, height);
128 }
129 ffmpegdec->picture->pts = -1;
130 diff -up gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegdemux.c~ gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegdemux.c
131 --- gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegdemux.c~ 2008-05-22 20:27:18.000000000 +0200
132 +++ gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegdemux.c 2008-05-22 20:27:18.000000000 +0200
133 @@ -1268,9 +1268,8 @@ gst_ffmpegdemux_loop (GstPad * pad)
134 avstream->codec->pix_fmt, avstream->codec->width,
135 avstream->codec->height);
136
137 - gst_ffmpeg_img_convert (&dst, avstream->codec->pix_fmt,
138 - &src, avstream->codec->pix_fmt, avstream->codec->width,
139 - avstream->codec->height);
140 + av_picture_copy (&dst, &src, avstream->codec->pix_fmt,
141 + avstream->codec->width, avstream->codec->height);
142 } else {
143 memcpy (GST_BUFFER_DATA (outbuf), pkt.data, outsize);
144 }
145 diff -up gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegmux.c~ gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegmux.c
146 --- gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegmux.c~ 2008-05-22 20:27:17.000000000 +0200
147 +++ gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegmux.c 2008-05-22 20:27:17.000000000 +0200
148 @@ -554,8 +554,8 @@ gst_ffmpegmux_collected (GstCollectPads
149 gst_ffmpeg_avpicture_fill (&src, GST_BUFFER_DATA (buf),
150 PIX_FMT_RGB24, st->codec->width, st->codec->height);
151
152 - gst_ffmpeg_img_convert (&dst, PIX_FMT_RGB24,
153 - &src, PIX_FMT_RGB24, st->codec->width, st->codec->height);
154 + av_picture_copy(&dst, &src, PIX_FMT_RGB24,
155 + st->codec->width, st->codec->height);
156 } else {
157 pkt.data = GST_BUFFER_DATA (buf);
158 pkt.size = GST_BUFFER_SIZE (buf);
159
160
161
162 1.1 media-plugins/gst-plugins-ffmpeg/files/0.10.4/04_disable-mpegts.patch
163
164 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/gst-plugins-ffmpeg/files/0.10.4/04_disable-mpegts.patch?rev=1.1&view=markup
165 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/gst-plugins-ffmpeg/files/0.10.4/04_disable-mpegts.patch?rev=1.1&content-type=text/plain
166
167 Index: 04_disable-mpegts.patch
168 ===================================================================
169 Index: gstffmpegdemux.c
170 ===================================================================
171 RCS file: /cvs/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegdemux.c,v
172 retrieving revision 1.90
173 diff -u -p -r1.90 gstffmpegdemux.c
174 --- ext/ffmpeg/gstffmpegdemux.c 13 May 2008 15:07:25 -0000 1.90
175 +++ ext/ffmpeg/gstffmpegdemux.c 18 May 2008 14:33:02 -0000
176 @@ -1142,10 +1142,14 @@ gst_ffmpegdemux_type_find (GstTypeFind *
177 res = MAX (1, res * GST_TYPE_FIND_MAXIMUM / AVPROBE_SCORE_MAX);
178 /* Restrict the probability for MPEG-TS streams, because there is
179 * probably a better version in plugins-base, if the user has a recent
180 - * plugins-base */
181 - if (!strcmp (in_plugin->name, "mpegts"))
182 + * plugins-base (in fact we shouldn't even get here for ffmpeg mpegts or
183 + * mpegtsraw typefinders, since we blacklist them) */
184 + if (g_str_has_prefix (in_plugin->name, "mpegts"))
185 res = MIN (res, GST_TYPE_FIND_POSSIBLE);
186
187 + GST_LOG ("ffmpeg typefinder '%s' suggests %" GST_PTR_FORMAT ", p=%u%%",
188 + in_plugin->name, params->sinkcaps, res);
189 +
190 gst_type_find_suggest (tf, res, params->sinkcaps);
191 }
192 }
193 @@ -1552,6 +1556,7 @@ gst_ffmpegdemux_register (GstPlugin * pl
194 !strcmp (in_plugin->name, "mpc") ||
195 !strcmp (in_plugin->name, "mpc8") ||
196 !strcmp (in_plugin->name, "mpegts") ||
197 + !strcmp (in_plugin->name, "mpegtsraw") ||
198 !strcmp (in_plugin->name, "nuv") ||
199 !strcmp (in_plugin->name, "swf") ||
200 !strcmp (in_plugin->name, "voc") || !strcmp (in_plugin->name, "gif"))
201
202
203
204
205 --
206 gentoo-commits@l.g.o mailing list