summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-01 14:13:05 +0100
committerwm4 <wm4@nowhere>2014-11-01 15:45:41 +0100
commitde59b87609f99da7c6f5deea688829d5398fc64d (patch)
tree305942ab15bfe5cfed50ca4a38ce3269b50e26ab /input
parenta1e7daf9429a2052a20df133cc9c7f8335071c22 (diff)
downloadmpv-de59b87609f99da7c6f5deea688829d5398fc64d.tar.bz2
mpv-de59b87609f99da7c6f5deea688829d5398fc64d.tar.xz
ipc: add a command to retrieve API version
Diffstat (limited to 'input')
-rw-r--r--input/ipc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/input/ipc.c b/input/ipc.c
index 1fb096842b..548bb3fe39 100644
--- a/input/ipc.c
+++ b/input/ipc.c
@@ -287,6 +287,10 @@ static char *json_execute_command(struct client_arg *arg, void *ta_parent,
int64_t time_us = mpv_get_time_us(arg->client);
mpv_node_map_add_int64(ta_parent, &reply_node, "data", time_us);
rc = MPV_ERROR_SUCCESS;
+ } else if (!strcmp("get_version", cmd)) {
+ int64_t ver = mpv_client_api_version();
+ mpv_node_map_add_int64(ta_parent, &reply_node, "data", ver);
+ rc = MPV_ERROR_SUCCESS;
} else if (!strcmp("get_property", cmd)) {
mpv_node result_node;