path: root/options/m_config.h
diff options
authorwm4 <wm4@nowhere>2014-02-24 20:39:51 +0100
committerwm4 <wm4@nowhere>2014-02-24 22:50:23 +0100
commit942fb43d0cdc58b0b2fad15bab564fd5105698ff (patch)
tree797aa3db62fb264869123e335f35266539335e52 /options/m_config.h
parenta6ebfbea6922632efb2cab020303397a418959f1 (diff)
client API: implement setting options using their native type too
This is only half-implemented: actually the option will first be converted from mpv_node to its native type, then it's converted to a string, and then back to its native type. This is because the option API was made for strings and not anything else. Other than being grossly inelegant, the only downside is probably with string lists and key/value lists, which don't escape strings containing syntax elements correctly.
Diffstat (limited to 'options/m_config.h')
1 files changed, 6 insertions, 0 deletions
diff --git a/options/m_config.h b/options/m_config.h
index 2624f45edf..82382aaa27 100644
--- a/options/m_config.h
+++ b/options/m_config.h
@@ -139,6 +139,12 @@ static inline int m_config_set_option0(struct m_config *config,
return m_config_set_option(config, bstr0(name), bstr0(param));
+// Same as m_config_set_option_ext(), but set as data using mpv_node.
+struct mpv_node;
+int m_config_set_option_node(struct m_config *config, bstr name,
+ struct mpv_node *data, int flags);
int m_config_parse_suboptions(struct m_config *config, char *name,
char *subopts);