[gst-devel] Text rendering

Jan Schmidt thaytan at noraisin.net
Sun Feb 20 20:35:04 CET 2005


On Sun, 2005-02-20 at 21:58 +0100, Maciej Katafiasz wrote:
>Dnia 20-02-2005, nie o godzinie 18:51 +0100, Gergely Nagy napisał:
>> Note, that the text renderer element would only create a buffer that
>> is large enough to hold the text, not as large as the whole frame
>> it will be rendered onto. This way the extra overhead coming from
>> the fact that renderer and blender are separated is insignificant.
>
>Not really, you kinda need to render to full frame (at least logically
>so), because subtitles are to be positioned precisely. If we were to
>render only "necessary" parts, it will make correct positioning
>impossible. As I refuse to pass positioning info via caps, it pretty
>much reduces to either RLE or what Jan proposed -- equivalent of X
>damage regions. I favor the latter, having RLE decoder inside imagemixer
>feels wrong :)

Actually, I think an RLE input format will be useful - in fact I'm
planning to implement one for DVD subtitling, because RLE is the format
the subtitles are given as on DVD. I'm planning to do this with a helper
library in gst-libs to avoid duplicating the code everywhere, of course.

Also, I don't think we need anything as complex as a full XDamage
structure, we just need some values in the first bytes of the buffer
that specify the x/y offset and have each buffer represent a single
output rectangle to draw. To draw multiple regions in an output frame,
the text renderers could supply a stream of buffers with 0 duration and
identical timestamps. Only the last buffer of the set would have a
non-zero duration.
 
J.
-- 
Jan Schmidt <thaytan at noraisin.net>





More information about the gstreamer-devel mailing list