summaryrefslogtreecommitdiffstats
path: root/options/m_config.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-19 19:51:26 +0200
committerwm4 <wm4@nowhere>2016-09-19 19:51:26 +0200
commitfe7db610355b623305d08135869b3f4ff4487b6d (patch)
tree563523768617c50b6f41639b0fdc8550871da5c0 /options/m_config.h
parent32f235bcef49b268126262f45637b6818767f065 (diff)
downloadmpv-fe7db610355b623305d08135869b3f4ff4487b6d.tar.bz2
mpv-fe7db610355b623305d08135869b3f4ff4487b6d.tar.xz
options: slightly better option update mechanism
Extend the flag-based notification mechanism that was used via M_OPT_TERM. Make the vo_opengl update mechanism use this (which, btw., also fixes compilation with OpenGL renderers forcibly disabled). While this adds a 3rd mechanism and just seems to further the chaos, I'd rather have a very simple mechanism now, than actually furthering the mess by mixing old and new update mechanisms. In particular, we'll be able to remove quite some property implementations, and replace them with much simpler update handling. The new update mechanism can also more easily refactored once we have a final mechanism that handles everything in an uniform way.
Diffstat (limited to 'options/m_config.h')
-rw-r--r--options/m_config.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/options/m_config.h b/options/m_config.h
index 8befc51805..74390f150b 100644
--- a/options/m_config.h
+++ b/options/m_config.h
@@ -77,10 +77,17 @@ typedef struct m_config {
int (*includefunc)(void *ctx, char *filename, int flags);
void *includefunc_ctx;
+ // Can intercept option write accesses.
int (*option_set_callback)(void *ctx, struct m_config_option *co,
void *data, int flags);
void *option_set_callback_cb;
+ // Notification after an option was successfully written to.
+ // Uses flags as set in UPDATE_OPTS_MASK.
+ void (*option_change_callback)(void *ctx, struct m_config_option *co,
+ int flags);
+ void *option_change_callback_ctx;
+
// For the command line parser
int recursion_depth;