0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
mpv/sub
wm4 26f4f18c06 options: change option macros and all option declarations
Change all OPT_* macros such that they don't define the entire m_option
initializer, and instead expand only to a part of it, which sets certain
fields. This requires changing almost every option declaration, because
they all use these macros. A declaration now always starts with

   {"name", ...

followed by designated initializers only (possibly wrapped in macros).
The OPT_* macros now initialize the .offset and .type fields only,
sometimes also .priv and others.

I think this change makes the option macros less tricky. The old code
had to stuff everything into macro arguments (and attempted to allow
setting arbitrary fields by letting the user pass designated
initializers in the vararg parts). Some of this was made messy due to
C99 and C11 not allowing 0-sized varargs with ',' removal. It's also
possible that this change is pointless, other than cosmetic preferences.

Not too happy about some things. For example, the OPT_CHOICE()
indentation I applied looks a bit ugly.

Much of this change was done with regex search&replace, but some places
required manual editing. In particular, code in "obscure" areas (which I
didn't include in compilation) might be broken now.

In wayland_common.c the author of some option declarations confused the
flags parameter with the default value (though the default value was
also properly set below). I fixed this with this change.
2020-03-18 19:52:01 +01:00
..
ass_mp.c sub: log libass version 2020-03-08 19:38:10 +01:00
ass_mp.h command: extend osd-overlay command with bounds reporting 2020-03-06 18:20:11 +01:00
dec_sub.c sub: do not ignore demuxer wakeups 2020-02-27 02:33:51 +01:00
dec_sub.h sub: make filter_sdh a "proper" filter, allow runtime changes 2020-02-16 02:07:24 +01:00
draw_bmp.c Replace uses of FFMIN/MAX with MPMIN/MAX 2019-10-31 11:24:20 +01:00
draw_bmp.h csputils: get rid of mp_csp_details 2015-01-06 16:50:58 +01:00
filter_regex.c sub: add an option to filter subtitles by regex 2020-02-16 02:07:24 +01:00
filter_sdh.c sub: make filter_sdh a "proper" filter, allow runtime changes 2020-02-16 02:07:24 +01:00
img_convert.c Replace uses of FFMIN/MAX with MPMIN/MAX 2019-10-31 11:24:20 +01:00
img_convert.h sub: move RGBA scaling to vo_vaapi 2016-07-03 19:32:43 +02:00
lavc_conv.c Remove remains of Libav compatibility 2020-02-16 15:14:55 +01:00
osd_dummy.c client API, lua: add new API for setting OSD overlays 2019-12-23 11:44:24 +01:00
osd_font.otf osc: use custom symbols for window controls 2019-12-11 13:53:10 -08:00
osd_libass.c command: extend osd-overlay command with bounds reporting 2020-03-06 18:20:11 +01:00
osd_state.h command: extend osd-overlay command with bounds reporting 2020-03-06 18:20:11 +01:00
osd.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
osd.h command: extend osd-overlay command with bounds reporting 2020-03-06 18:20:11 +01:00
sd_ass.c sub: add an option to filter subtitles by regex 2020-02-16 02:07:24 +01:00
sd_lavc.c Remove remains of Libav compatibility 2020-02-16 15:14:55 +01:00
sd.h sub: add an option to filter subtitles by regex 2020-02-16 02:07:24 +01:00