From 2c917219cffc74fcc64f04113fe260f2b88d5841 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 2 Sep 2016 15:50:54 +0200 Subject: vo: use new option update mechanism This is still rather basic. run_reconfig() and run_control() update the options because it's needed for panscan (and other video scaling options), and fullscreen, border, ontop updates. In the old model, these options could be accessed only while both playback thread and VO threads were locked (i.e. during synchronous calls like vo_control()), so this should be sufficient in order not to miss any updates. In the future, a more fine-grained update mechanism could be added to handle these updates "exactly". x11_common.c contains an evil hack, as I see no reasonable way to handle this properly. The VO thread can't "lock" the main thread, so this is not simple. --- options/options.c | 2 +- options/options.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'options') diff --git a/options/options.c b/options/options.c index 9c3ec0b776..bd16a0a025 100644 --- a/options/options.c +++ b/options/options.c @@ -150,7 +150,7 @@ static const m_option_t mp_vo_opt_list[] = { {0} }; -static const struct m_sub_options vo_sub_opts = { +const struct m_sub_options vo_sub_opts = { .opts = mp_vo_opt_list, .size = sizeof(struct mp_vo_opts), .defaults = &(const struct mp_vo_opts){ diff --git a/options/options.h b/options/options.h index 1a2bfa68c8..d450675e61 100644 --- a/options/options.h +++ b/options/options.h @@ -335,5 +335,6 @@ typedef struct MPOpts { extern const m_option_t mp_opts[]; extern const struct MPOpts mp_default_opts; +extern const struct m_sub_options vo_sub_opts; #endif -- cgit v1.2.3