After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 638897 - [textrender] allow setting the canvas size using peer caps + bugfixes
[textrender] allow setting the canvas size using peer caps + bugfixes
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.30
Other Linux
: Normal normal
: 0.10.36
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-01-07 10:38 UTC by Jindrich Makovicka
Modified: 2011-06-15 17:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
textrender.c changes (2.87 KB, patch)
2011-01-07 10:54 UTC, Jindrich Makovicka
committed Details | Review
[PATCH 1/3] textrender: check destination image bounds during colorspace conversion (1.67 KB, patch)
2011-05-26 09:00 UTC, Jindrich Makovicka
committed Details | Review
[PATCH 2/3] textrender: remove double gst_caps_unref() in error path (781 bytes, patch)
2011-05-26 09:00 UTC, Jindrich Makovicka
committed Details | Review

Description Jindrich Makovicka 2011-01-07 10:38:55 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
Comment 1 Jindrich Makovicka 2011-01-07 10:54:08 UTC
Created attachment 177737 [details] [review]
textrender.c changes
Comment 2 Sebastian Dröge (slomo) 2011-01-08 17:23:00 UTC
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.
Comment 3 Sebastian Dröge (slomo) 2011-05-26 08:41:21 UTC
Is there still any interest in this feature?
Comment 4 Sebastian Dröge (slomo) 2011-05-26 08:49:12 UTC
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
Comment 5 Jindrich Makovicka 2011-05-26 09:00:08 UTC
Created attachment 188639 [details] [review]
[PATCH 1/3] textrender: check destination image bounds during  colorspace conversion
Comment 6 Jindrich Makovicka 2011-05-26 09:00:32 UTC
Created attachment 188640 [details] [review]
[PATCH 2/3] textrender: remove double gst_caps_unref() in error path
Comment 7 Jindrich Makovicka 2011-05-26 09:01:29 UTC
oops. should have refreshed the page before posting :) thanks!