textoverlay: no support for displaying multiple text buffers
Submitted by Benjamin Schmitz
Please describe the problem:
After receiving a text buffer, textoverlay waits until it has expired before accepting a new one. That way, textoverlay can only display one text event (or rather: the contents of one text buffer) at a time.
Several subtitle formats have support for multiple simultaneous lines or text events, like ASS or SRT.
Steps to reproduce:
Just play some file with ASS or SRT subs, where there are multiple lines of text to be displayed simultaneously.
Only the text buffer that is received first is actually displayed. All others that should be displayed simultaneously are DROPPED and not displayed at all.
Textoverlay should be able to display the contents of more than one text buffer at a time. Of course, this means that it is also necessary to implement collision detection, so that multiple lines of text won't overlap.
Does this happen every time?
The direction of the shift for collision detection depends on the current setting for the vertical alignment.
When subtitles are aligned at bottom, any additional lines of text shall be shifted upward, so that they won't overlap with what's already being displayed.
When subtitles are aligned at top, additional lines shall be shifted downward.
Not sure what to do with centered subtitles, but who uses that anyway? ;-)