mpv/player
wm4 0b35b4c917 sub: make filter_sdh a "proper" filter, allow runtime changes
Until now, filter_sdh was simply a function that was called by sd_ass
directly (if enabled).

I want to add another filter, so it's time to turn this into a somewhat
more general subtitle filtering infrastructure.

I pondered whether to reuse the audio/video filtering stuff - but better
not. Also, since subtitles are horrible and tend to refuse proper
abstraction, it's still messed into sd_ass, instead of working on the
dec_sub.c level. Actually mpv used to have subtitle "filters" and even
made subtitle converters part of it, but it was fairly horrible, so
don't do that again.

In addition, make runtime changes possible. Since this was supposed to
be a quick hack, I just decided to put all subtitle filter options into
a separate option group (=> simpler change notification), to manually
push the change through the playloop (like it was sort of before for OSD
options), and to recreate the sub filter chain completely in every
change. Should be good enough.

One strangeness is that due to prefetching and such, most subtitle
packets (or those some time ahead) are actually done filtering when we
change, so the user still needs to manually seek to actually refresh
everything. And since subtitle data is usually cached in ASS_Track (for
other terrible but user-friendly reasons), we also must clear the
subtitle data, but of course only on seek, since otherwise all subtitles
would just disappear. What a fucking mess, but such is life. We could
trigger a "refresh seek" to make this more automatic, but I don't feel
like it currently.

This is slightly inefficient (lots of allocations and copying), but I
decided that it doesn't matter. Could matter slightly for crazy ASS
subtitles that render with thousands of events.

Not very well tested. Still seems to work, but I didn't have many test
cases.
2020-02-16 02:07:24 +01:00
..
javascript js: require: directory-scripts: first look at <dir>/modules/ 2020-02-07 18:22:12 +02:00
lua ytdl_hook.lua: delay load subtitles 2020-02-15 18:30:42 +01:00
audio.c audio: slightly simplify pull underrun message printing 2020-02-13 18:02:16 +01:00
client.c
client.h
command.c sub: make filter_sdh a "proper" filter, allow runtime changes 2020-02-16 02:07:24 +01:00
command.h
configfiles.c
core.h
external_files.c
external_files.h
javascript.c js: require: directory-scripts: first look at <dir>/modules/ 2020-02-07 18:22:12 +02:00
loadfile.c
lua.c
main.c
misc.c player: add ab-loop-count option/property 2020-02-08 15:01:33 +01:00
osd.c
playloop.c player: consider audio buffer if AO driver does not report underruns 2020-02-13 01:32:58 +01:00
screenshot.c screenshot: fix typo in comment 2020-02-07 13:42:42 +01:00
screenshot.h player: make screenshot each-frame mode more accurate 2020-02-07 13:32:21 +01:00
scripting.c
sub.c
video.c player: make screenshot each-frame mode more accurate 2020-02-07 13:32:21 +01:00