mpv/options
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
..
m_config.c options: stop hiding deprecated options 2020-02-04 20:10:38 +01:00
m_config.h options: stop hiding deprecated options 2020-02-04 20:10:38 +01:00
m_option.c m_option: fix runtime changing of --audio-channels 2019-12-27 17:44:33 +01:00
m_option.h sub: make filter_sdh a "proper" filter, allow runtime changes 2020-02-16 02:07:24 +01:00
m_property.c command: move property multiply code to m_property.c 2018-03-26 19:47:08 +02:00
m_property.h command: move property multiply code to m_property.c 2018-03-26 19:47:08 +02:00
options.c sub: make filter_sdh a "proper" filter, allow runtime changes 2020-02-16 02:07:24 +01:00
options.h sub: make filter_sdh a "proper" filter, allow runtime changes 2020-02-16 02:07:24 +01:00
parse_commandline.c options: merge split_opt functions 2020-01-29 23:20:04 +01:00
parse_commandline.h player: get rid of mpv_global.opts 2018-05-24 19:56:35 +02:00
parse_configfile.c options: change license of most files to LGPL (except options.c/.h) 2017-06-12 20:55:17 +02:00
parse_configfile.h options: change license of most files to LGPL (except options.c/.h) 2017-06-12 20:55:17 +02:00
path.c path: add mp_path_is_absolute() 2020-02-06 14:14:35 +01:00
path.h path: add mp_path_is_absolute() 2020-02-06 14:14:35 +01:00