From 0ec5d35d57b57c68e93fc69f5fde9bbf3e19f50a Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 8 Oct 2014 14:15:14 +0200 Subject: client API: introduce numeric log levels Maybe using strings for log levels was a mistake (too broad and too impractical), so I'm adding numeric log level at least for the receiver side. This makes it easier to map mpv log levels to other logging systems. I'm still too stingy to add a function to set the log level by a numeric value, though. The numeric values are not directly mapped to the internal mpv values, because then almost every file in mpv would have to include the client API header. Coalesce this into API version 1.6, since 1.6 was bumped just yesterday. --- player/client.c | 1 + 1 file changed, 1 insertion(+) (limited to 'player/client.c') diff --git a/player/client.c b/player/client.c index a7700fbd1c..f64f0bd976 100644 --- a/player/client.c +++ b/player/client.c @@ -654,6 +654,7 @@ mpv_event *mpv_wait_event(mpv_handle *ctx, double timeout) *cmsg = (struct mpv_event_log_message){ .prefix = talloc_steal(event, msg->prefix), .level = mp_log_levels[msg->level], + .log_level = mp_mpv_log_levels[msg->level], .text = talloc_steal(event, msg->text), }; event->data = cmsg; -- cgit v1.2.3