summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-01 15:36:30 +0100
committerwm4 <wm4@nowhere>2014-11-01 15:45:41 +0100
commitdbc41ea3bbf48bc5d7dd625fb7930b4a3b498cf7 (patch)
treeba3c085dcd286ded3de7fafe525ed57888e46938 /input
parentde59b87609f99da7c6f5deea688829d5398fc64d (diff)
downloadmpv-dbc41ea3bbf48bc5d7dd625fb7930b4a3b498cf7.tar.bz2
mpv-dbc41ea3bbf48bc5d7dd625fb7930b4a3b498cf7.tar.xz
ipc: make it possible to receive log messages
The receiving part was implemented, but since no messages are enabled by default, it couldn't be used.
Diffstat (limited to 'input')
-rw-r--r--input/ipc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/input/ipc.c b/input/ipc.c
index 548bb3fe39..5d470ac257 100644
--- a/input/ipc.c
+++ b/input/ipc.c
@@ -414,6 +414,19 @@ static char *json_execute_command(struct client_arg *arg, void *ta_parent,
rc = mpv_unobserve_property(arg->client,
cmd_node->u.list->values[1].u.int64);
+ } else if (!strcmp("request_log_messages", cmd)) {
+ if (cmd_node->u.list->num != 2) {
+ rc = MPV_ERROR_INVALID_PARAMETER;
+ goto error;
+ }
+
+ if (cmd_node->u.list->values[1].format != MPV_FORMAT_STRING) {
+ rc = MPV_ERROR_INVALID_PARAMETER;
+ goto error;
+ }
+
+ rc = mpv_request_log_messages(arg->client,
+ cmd_node->u.list->values[1].u.string);
} else if (!strcmp("suspend", cmd)) {
if (arg->suspend_counter < INT_MAX) {
mpv_suspend(arg->client);