summaryrefslogtreecommitdiffstats
path: root/options/m_config.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-11-28 20:06:19 +0100
committerwm4 <wm4@nowhere>2019-11-29 12:14:43 +0100
commit1e6c57d4e437b403eab89d07ab61b872253b2c35 (patch)
tree199deb1757494a14e8d41566337c096cca8e6b85 /options/m_config.h
parent5b5d163a6a559ad9fa9559e4aa36ac02d37daa94 (diff)
downloadmpv-1e6c57d4e437b403eab89d07ab61b872253b2c35.tar.bz2
mpv-1e6c57d4e437b403eab89d07ab61b872253b2c35.tar.xz
m_config: move stuff around
Create a separate struct for internal fields of m_config_cache, so API users can't just mess with stuff they shouldn't access. Move the ts field out of m_config_data, so we don't need unnecessary atomics in one case. This is just preparation, and shouldn't change any behavior.
Diffstat (limited to 'options/m_config.h')
-rw-r--r--options/m_config.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/options/m_config.h b/options/m_config.h
index 120a82b768..42734e8000 100644
--- a/options/m_config.h
+++ b/options/m_config.h
@@ -35,6 +35,7 @@ struct m_sub_options;
struct m_obj_desc;
struct m_obj_settings;
struct mp_log;
+struct mp_dispatch_queue;
// Config option
struct m_config_option {
@@ -263,20 +264,11 @@ struct mpv_node m_config_get_profiles(struct m_config *config);
// the cache itself is allowed.
struct m_config_cache {
// The struct as indicated by m_config_cache_alloc's group parameter.
- // (Internally the same as data->gdata[0]->udata.)
+ // (Internally the same as internal->gdata[0]->udata.)
void *opts;
- // Internal.
- struct m_config_shadow *shadow; // real data
- struct m_config_data *data; // copy for the cache user
- bool in_list; // registered as listener with root config
- // --- Implicitly synchronized by setting/unsetting wakeup_cb.
- struct mp_dispatch_queue *wakeup_dispatch_queue;
- void (*wakeup_dispatch_cb)(void *ctx);
- void *wakeup_dispatch_cb_ctx;
- // --- Protected by shadow->lock
- void (*wakeup_cb)(void *ctx);
- void *wakeup_cb_ctx;
+ // Do not access.
+ struct config_cache *internal;
};
#define GLOBAL_CONFIG NULL