From 2ac74977c5f6561e33ad37c68b9da47739c7fd6c Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 22 Sep 2016 20:43:33 +0200 Subject: command: add a load-script command The intention is to give libmpv users as much flexibility to load scripts as using mpv from CLI, but without restricting libmpv users from having to decide everything on creation time, or having to go through hacks like recreating the libmpv context to update state. --- input/cmd_list.c | 2 ++ input/cmd_list.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'input') diff --git a/input/cmd_list.c b/input/cmd_list.c index f6db9cbba8..53cc375b3a 100644 --- a/input/cmd_list.c +++ b/input/cmd_list.c @@ -226,6 +226,8 @@ const struct mp_cmd_def mp_cmds[] = { { MP_CMD_APPLY_PROFILE, "apply-profile", {ARG_STRING } }, + { MP_CMD_LOAD_SCRIPT, "load-script", {ARG_STRING} }, + {0} }; diff --git a/input/cmd_list.h b/input/cmd_list.h index e0fd8fa2de..1c2330b589 100644 --- a/input/cmd_list.h +++ b/input/cmd_list.h @@ -116,6 +116,8 @@ enum mp_command_type { MP_CMD_APPLY_PROFILE, + MP_CMD_LOAD_SCRIPT, + // Internal MP_CMD_COMMAND_LIST, // list of sub-commands in args[0].v.p }; -- cgit v1.2.3