mpv/sub
wm4 6aad532aa3 options: move most subtitle and OSD rendering options to sub structs
Remove them from the big MPOpts struct and move them to their sub
structs. In the places where their fields are used, create a private
copy of the structs, instead of accessing the semi-deprecated global
option struct instance (mpv_global.opts) directly.

This actually makes accessing these options finally thread-safe. They
weren't even if they should have for years. (Including some potential
for undefined behavior when e.g. the OSD font was changed at runtime.)

This is mostly transparent. All options get moved around, but most users
of the options just need to access a different struct (changing sd.opts
to a different type changes a lot of uses, for example).

One thing which has to be considered and could cause potential
regressions is that the new option copies must be explicitly updated.
sub_update_opts() takes care of this for example.

Another thing is that writing to the option structs manually won't work,
because the changes won't be propagated to other copies. Apparently the
only affected case is the implementation of the sub-step command, which
tries to change sub_delay. Handle this one explicitly (osd_changed()
doesn't need to be called anymore, because changing the option triggers
UPDATE_OSD, and updates the OSD as a consequence). The way the option
value is propagated is rather hacky, but for now this will do.
2018-01-02 14:27:37 -08:00
..
ass_mp.c options: move most subtitle and OSD rendering options to sub structs 2018-01-02 14:27:37 -08:00
ass_mp.h ass_mp: change license to LGPL 2017-04-20 12:53:09 +02:00
dec_sub.c options: move most subtitle and OSD rendering options to sub structs 2018-01-02 14:27:37 -08:00
dec_sub.h options: move most subtitle and OSD rendering options to sub structs 2018-01-02 14:27:37 -08:00
draw_bmp.c mp_image: split colorimetry metadata into its own struct 2016-07-03 19:42:52 +02:00
draw_bmp.h csputils: get rid of mp_csp_details 2015-01-06 16:50:58 +01:00
filter_sdh.c filter_sdh: remove pointless set_pos function 2017-04-20 08:22:46 +02:00
img_convert.c sub: move RGBA scaling to vo_vaapi 2016-07-03 19:32:43 +02:00
img_convert.h sub: move RGBA scaling to vo_vaapi 2016-07-03 19:32:43 +02:00
lavc_conv.c lavc_conv: make disable_styles faster 2017-10-30 12:44:11 +01:00
osd.c options: move most subtitle and OSD rendering options to sub structs 2018-01-02 14:27:37 -08:00
osd.h vo_opengl: don't discard buffered video on redundant resize calls 2017-08-29 15:15:34 +02:00
osd_dummy.c command: shorten long playlists on OSD 2017-01-26 18:24:53 +01:00
osd_font.otf osd-font: make volume muted glyph slightly thicker 2017-04-22 18:03:16 +01:00
osd_libass.c options: move most subtitle and OSD rendering options to sub structs 2018-01-02 14:27:37 -08:00
osd_state.h options: move most subtitle and OSD rendering options to sub structs 2018-01-02 14:27:37 -08:00
sd.h options: move most subtitle and OSD rendering options to sub structs 2018-01-02 14:27:37 -08:00
sd_ass.c options: move most subtitle and OSD rendering options to sub structs 2018-01-02 14:27:37 -08:00
sd_lavc.c options: move most subtitle and OSD rendering options to sub structs 2018-01-02 14:27:37 -08:00