diff options
author | wm4 <wm4@nowhere> | 2013-12-21 19:45:42 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-21 21:05:02 +0100 |
commit | d8d42b44fc717c695af59c14213d54885088ea37 (patch) | |
tree | 9dbfd597e3352249cb5d1fda996d2c0ce1602fe9 /options/m_config.h | |
parent | a2d144fc8f146f96e4fe97b1b2c15828e24f8494 (diff) | |
download | mpv-d8d42b44fc717c695af59c14213d54885088ea37.tar.bz2 mpv-d8d42b44fc717c695af59c14213d54885088ea37.tar.xz |
m_option, m_config: mp_msg conversions
Always pass around mp_log contexts in the option parser code. This of
course affects all users of this API as well.
In stream.c, pass a mp_null_log, because we can't do it properly yet.
This will be fixed later.
Diffstat (limited to 'options/m_config.h')
-rw-r--r-- | options/m_config.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/options/m_config.h b/options/m_config.h index 829fa90ba7..2624f45edf 100644 --- a/options/m_config.h +++ b/options/m_config.h @@ -34,6 +34,7 @@ struct m_option_type; struct m_sub_options; struct m_obj_desc; struct m_obj_settings; +struct mp_log; // Config option struct m_config_option { @@ -48,6 +49,8 @@ struct m_config_option { // Config object /** \ingroup Config */ typedef struct m_config { + struct mp_log *log; + // Registered options. struct m_config_option *opts; // all options, even suboptions int num_opts; @@ -77,14 +80,15 @@ typedef struct m_config { // and a corresponding option switch or sub-option field. // suboptinit: if not NULL, initialize the suboption string (used for presets) // Note that the m_config object will keep pointers to defaults and options. -struct m_config *m_config_new(void *talloc_ctx, size_t size, - const void *defaults, +struct m_config *m_config_new(void *talloc_ctx, struct mp_log *log, + size_t size, const void *defaults, const struct m_option *options); -struct m_config *m_config_from_obj_desc(void *talloc_ctx, +struct m_config *m_config_from_obj_desc(void *talloc_ctx, struct mp_log *log, struct m_obj_desc *desc); struct m_config *m_config_from_obj_desc_noalloc(void *talloc_ctx, + struct mp_log *log, struct m_obj_desc *desc); int m_config_set_obj_params(struct m_config *conf, char **args); |