GNOME Bugzilla – Bug 638897
[textrender] allow setting the canvas size using peer caps + bugfixes
Last modified: 2011-06-15 17:42:42 UTC
Hi, currently, pango textrender plugin uses a fixed canvas size of 720x576. The attached patch adds a query for peer caps to allow specifying the size using a capsfilter. When the peer capabilities are not limited, it falls back to the original behavior. eg. gst-launch -v filesrc location=title.srt ! subparse ! textrender font-desc="Sans 30" ! video/x-raw-yuv,width=1920,height=1050 ! fakesink The patch also adds two bug fixes: 1) array bounds checks in image_to_argb and image_to_ayuv 2) removal of double gst_caps_unref() when gst_pad_set_caps() fails
Created attachment 177737 [details] [review] textrender.c changes
Please attach these patches in "git format-patch" format and best would be with a single commit/patch per functional change instead of having everything in a single patch.
Is there still any interest in this feature?
Oh well, I've extracted the three changes from your patch and committed them now ;) commit 2ba4a56d7497a26af24ed27699ff72144bc9e4dd Author: Jindrich Makovicka <makovick@gmail.com> Date: Thu May 26 10:48:05 2011 +0200 textrender: Correctly negotiate with downstream instead of just using random Fixes bug #638897. commit c186d400e597ad30c5b8c0277567baa376cf48bd Author: Jindrich Makovicka <makovick@gmail.com> Date: Thu May 26 10:43:51 2011 +0200 textrender: Add bound checks to not write outside the image area commit fe533c999531f7db4a25813c5fff7921c4a15c40 Author: Jindrich Makovicka <makovick@gmail.com> Date: Thu May 26 10:42:46 2011 +0200 textrender: Prevent double unref of caps if the caps can't be set on the src
Created attachment 188639 [details] [review] [PATCH 1/3] textrender: check destination image bounds during colorspace conversion
Created attachment 188640 [details] [review] [PATCH 2/3] textrender: remove double gst_caps_unref() in error path
oops. should have refreshed the page before posting :) thanks!