diff options
author | wm4 <wm4@nowhere> | 2016-09-01 20:00:43 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-01 20:00:43 +0200 |
commit | d32bee5f019f2c51839df16b7c7955dc33651cbe (patch) | |
tree | 96424f3477a67ca6b5f6220295bf4c906ac6106a /options/m_config.c | |
parent | 17dbb39dec1fcd3280f86e480a7191b6f78cbbcc (diff) | |
download | mpv-d32bee5f019f2c51839df16b7c7955dc33651cbe.tar.bz2 mpv-d32bee5f019f2c51839df16b7c7955dc33651cbe.tar.xz |
command: add options to property list
Now options are accessible through the property list as well, which
unifies them to a degree.
Not all options support runtime changes (meaning affected components
need to be restarted for the options to take effects). Remove from the
manpage those properties which are cleanly mapped to options anyway.
From the user-perspective they're just options available through the
property interface.
Diffstat (limited to 'options/m_config.c')
-rw-r--r-- | options/m_config.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/options/m_config.c b/options/m_config.c index 352965ea47..d4c19808b0 100644 --- a/options/m_config.c +++ b/options/m_config.c @@ -447,6 +447,16 @@ struct m_config_option *m_config_get_co(const struct m_config *config, return NULL; } +int m_config_get_co_count(struct m_config *config) +{ + return config->num_opts; +} + +struct m_config_option *m_config_get_co_index(struct m_config *config, int index) +{ + return &config->opts[index]; +} + const char *m_config_get_positional_option(const struct m_config *config, int p) { int pos = 0; @@ -509,7 +519,7 @@ static void handle_on_set(struct m_config *config, struct m_config_option *co, mp_msg_update_msglevels(config->global); } -// The type data points to is as in: m_config_get_co(config, name)->opt +// The type data points to is as in: co->opt int m_config_set_option_raw(struct m_config *config, struct m_config_option *co, void *data, int flags) { |