summaryrefslogtreecommitdiffstats
path: root/common/msg_control.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-02-06 16:48:52 +0100
committerwm4 <wm4@nowhere>2015-02-06 16:48:52 +0100
commitffe894ec0a73ab6a16ce1ca62800bf1612542107 (patch)
tree2ff3877eb428fa191f318d1285ae96f28cb37bb6 /common/msg_control.h
parent1a38741dce3e32218521cc2b00819dac1ccebc3a (diff)
downloadmpv-ffe894ec0a73ab6a16ce1ca62800bf1612542107.tar.bz2
mpv-ffe894ec0a73ab6a16ce1ca62800bf1612542107.tar.xz
options: change --msg-level option
Make it accept "," as separator, instead of only ":". Do this by using the key-value-list parser. Before this, the option was stored as a string, with the option parser verifying that the option value as correct. Now it's stored pre-parsed, although the log levels still require separate verification and parsing-on-use to some degree (which is why the msg-level option type doesn't go away). Because the internal type changes, the client API "native" type also changes. This could be prevented with some more effort, but I don't think it's worth it - if MPV_FORMAT_STRING is used, it still works the same, just with a different separator on read accesses.
Diffstat (limited to 'common/msg_control.h')
-rw-r--r--common/msg_control.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/common/msg_control.h b/common/msg_control.h
index 57a7d85368..2e1a4ec6bd 100644
--- a/common/msg_control.h
+++ b/common/msg_control.h
@@ -28,9 +28,7 @@ void mp_msg_log_buffer_destroy(struct mp_log_buffer *buffer);
struct mp_log_buffer_entry *mp_msg_log_buffer_read(struct mp_log_buffer *buffer);
int mp_msg_open_stats_file(struct mpv_global *global, const char *path);
-
-struct bstr;
-int mp_msg_split_msglevel(struct bstr *s, struct bstr *out_mod, int *out_level);
+int mp_msg_find_level(const char *s);
extern const char *const mp_log_levels[MSGL_MAX + 1];
extern const int mp_mpv_log_levels[MSGL_MAX + 1];