diff options
author | xylosper <darklin20@gmail.com> | 2015-02-03 17:15:14 +0900 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-02-03 13:53:39 +0100 |
commit | 95fd83a269db6e2a04e40fe0c40cc02a051f316d (patch) | |
tree | 352214e07190724a7ec2d76c39e097245eef6c90 /input | |
parent | 2c22fcd350a55ffe9c49f3fedbd4be33a16cfba5 (diff) | |
download | mpv-95fd83a269db6e2a04e40fe0c40cc02a051f316d.tar.bz2 mpv-95fd83a269db6e2a04e40fe0c40cc02a051f316d.tar.xz |
command: new commands audio_add/audio_remove/audio_reload
These commands are counterparts of sub_add/sub_remove/sub_reload which
work for external audio file.
Signed-off-by: wm4 <wm4@nowhere>
(minor simplification)
Diffstat (limited to 'input')
-rw-r--r-- | input/cmd_list.c | 6 | ||||
-rw-r--r-- | input/cmd_list.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/input/cmd_list.c b/input/cmd_list.c index 376f330ce2..28c89884e7 100644 --- a/input/cmd_list.c +++ b/input/cmd_list.c @@ -193,6 +193,12 @@ const struct mp_cmd_def mp_cmds[] = { {"double", 1})), }}, + { MP_CMD_AUDIO_ADD, "audio_add", { ARG_STRING, + OARG_CHOICE(0, ({"select", 0}, {"auto", 1}, {"cached", 2})), + OARG_STRING(""), OARG_STRING("") } }, + { MP_CMD_AUDIO_REMOVE, "audio_remove", { OARG_INT(-1) } }, + { MP_CMD_AUDIO_RELOAD, "audio_reload", { OARG_INT(-1) } }, + {0} }; diff --git a/input/cmd_list.h b/input/cmd_list.h index 84e64273e2..c761be98ee 100644 --- a/input/cmd_list.h +++ b/input/cmd_list.h @@ -73,6 +73,9 @@ enum mp_command_type { MP_CMD_MULTIPLY, MP_CMD_CYCLE_VALUES, MP_CMD_STOP, + MP_CMD_AUDIO_ADD, + MP_CMD_AUDIO_REMOVE, + MP_CMD_AUDIO_RELOAD, MP_CMD_ENABLE_INPUT_SECTION, MP_CMD_DISABLE_INPUT_SECTION, |