[vlc-devel] commit: vout: avoid applying subtitle offset twice and modify behavior when subtitles overlap (Jakob Leben )

Jakob Leben jakob.leben at gmail.com
Sun Nov 29 13:04:28 CET 2009


On Sun, Nov 29, 2009 at 12:42 PM, Laurent Aimar <fenrir at via.ecp.fr> wrote:

>  Once a subtitle is displayed, it should never move. Otherwise, It makes
> thing
> harder to read, breaks some subtitles files, and we had complains about
> that.
>

I am just curious in what way it breaks some subtitle files?

>    There is a problem regarding fixing that glitch at positioning: the
> code
> >    would need some wild refactoring in order to do that and still keep
> the
> >    behavior where subtitles keep their position after new ones appear.
>  Which problem ?
>

I would like subtitle position to be updated when pressing hotkeys for
subtitle offset, even position of those already displayed, it makes
adjusting it much easier. Which means subtitle offset should be applied
everytime subtitles are drawn, but subtitle overlap logic demands final
subtitle position to be stored for the life time of a subtitle.... which
also resulted in the bug where offset was applied twice... it gets even more
complicated than that when you think of live subtitle position update in
combination with bounding them to the boundary of video.

I have alternative implementations to solve the problem which keep relative
subtitle position for their life time, but there is two alternative
problems:
- either we don't bound subtitles, so when you offset them you may push them
offscreen.
- or if some bounding occurs and multiple subtitles are being displayed, the
ones that were restricted will visually overlap with their neighbour, id you
know what I mean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20091129/23f5e5a2/attachment.html>


More information about the vlc-devel mailing list