1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-31 07:51:55 +00:00
mpv/sub
wm4 75a36662cb osd, lua: manage multiple ASS overlays set with set_osd_ass() calls
Until now, there was only 1 global ASS overlay that could be set by all
scripts. This was often perceived as bug when multiple scripts tried to
set their own ASS overlay.

This was kind of hard to solve because the script could set its own ASS
PlayResX/Y, which makes it impossible to share a single ASS_Renderer for
multiple scripts. The OSC unfortunately makes use of this feature (and
unfortunately can't be fixed because it's a POS), so we're stuck with
this complication.

Implement the worst-case solution and fix this by creating separate ASS
track and renderer objects for each script that wants to set an ASS
overlay.

The z-order is decided by the order the scripts set their text first.
This is essentially random, unless you do it at script init, and you
pass scripts in a specific order. Script initialization is currently
serialized (as a feature), so the first loaded script gets lowest
Z-order.

The Lua script API interestingly remains the same. (And also will remain
undocumented, unsupported, and potentially volatile.)
2016-03-08 22:00:02 +01:00
..
ass_mp.c osd: refactor how mp_ass_render_frame() is called 2016-03-08 21:59:55 +01:00
ass_mp.h osd: refactor how mp_ass_render_frame() is called 2016-03-08 21:59:55 +01:00
dec_sub.c osd: refactor how mp_ass_render_frame() is called 2016-03-08 21:59:55 +01:00
dec_sub.h sub: make preloading more robust 2016-03-06 15:17:59 +01:00
draw_bmp.c Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
draw_bmp.h csputils: get rid of mp_csp_details 2015-01-06 16:50:58 +01:00
img_convert.c Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
img_convert.h Revert "sub: support straight alpha additionally to premultiplied alpha" 2013-08-12 02:49:22 +02:00
lavc_conv.c lavc_conv: fix Libav srt subtitles 2016-02-29 18:20:27 +01:00
osd_dummy.c osd, lua: manage multiple ASS overlays set with set_osd_ass() calls 2016-03-08 22:00:02 +01:00
osd_font.otf osd+osc: Add left-arrow to osd-font 2014-08-21 18:45:41 +02:00
osd_libass.c osd, lua: manage multiple ASS overlays set with set_osd_ass() calls 2016-03-08 22:00:02 +01:00
osd_state.h osd, lua: manage multiple ASS overlays set with set_osd_ass() calls 2016-03-08 22:00:02 +01:00
osd.c osd, lua: manage multiple ASS overlays set with set_osd_ass() calls 2016-03-08 22:00:02 +01:00
osd.h osd, lua: manage multiple ASS overlays set with set_osd_ass() calls 2016-03-08 22:00:02 +01:00
sd_ass.c osd: refactor how mp_ass_render_frame() is called 2016-03-08 21:59:55 +01:00
sd_lavc.c sub: implement "sub-seek 0" 2016-02-04 22:48:13 +01:00
sd.h sub: make preloading more robust 2016-03-06 15:17:59 +01:00