mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
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.
This commit is contained in:
13
input/ipc.c
13
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);
|
||||
|
||||
Reference in New Issue
Block a user