diff options
author | wm4 <wm4@nowhere> | 2012-11-15 20:26:52 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-11-16 21:21:15 +0100 |
commit | b7052b431c92c2babd032885701fb56dfd3ec452 (patch) | |
tree | cf4e45be7d61387cf831d28a19306a0cb4cbf194 /core/input | |
parent | dd7dc2ee3d060d77dbafb3182127eb1a59c2d79f (diff) | |
download | mpv-b7052b431c92c2babd032885701fb56dfd3ec452.tar.bz2 mpv-b7052b431c92c2babd032885701fb56dfd3ec452.tar.xz |
command: add sub_reload and sub_remove commands
sub_remove remove an external subtitle track, for whatever this may be
needed.
sub_reload removes and re-adds an external subtitle track.
Also rename sub_load to sub_add, because that seems to be more in line
with sub_remove.
Diffstat (limited to 'core/input')
-rw-r--r-- | core/input/input.c | 5 | ||||
-rw-r--r-- | core/input/input.h | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/core/input/input.c b/core/input/input.c index 210aa54a4f..6d60211e65 100644 --- a/core/input/input.c +++ b/core/input/input.c @@ -144,7 +144,9 @@ static const mp_cmd_t mp_cmds[] = { { MP_CMD_PRINT_TEXT, "print_text", { ARG_STRING } }, { MP_CMD_SHOW_TEXT, "show_text", { ARG_STRING, OARG_INT(-1), OARG_INT(0) } }, { MP_CMD_SHOW_PROGRESS, "show_progress", }, - { MP_CMD_SUB_LOAD, "sub_load", { ARG_STRING } }, + { MP_CMD_SUB_ADD, "sub_add", { ARG_STRING } }, + { MP_CMD_SUB_REMOVE, "sub_remove", { OARG_INT(-1) } }, + { MP_CMD_SUB_RELOAD, "sub_reload", { OARG_INT(-1) } }, { MP_CMD_TV_START_SCAN, "tv_start_scan", }, { MP_CMD_TV_STEP_CHANNEL, "tv_step_channel", { ARG_INT } }, @@ -231,6 +233,7 @@ static const struct legacy_cmd legacy_cmds[] = { {"saturation", "add saturation"}, {"hue", "add hue"}, {"switch_vsync", "cycle vsync"}, + {"sub_load", "sub_add"}, {"sub_select", "cycle sub"}, {"sub_pos", "add sub-pos"}, {"sub_delay", "add sub-delay"}, diff --git a/core/input/input.h b/core/input/input.h index a1c633ad69..b86f51a1e7 100644 --- a/core/input/input.h +++ b/core/input/input.h @@ -47,7 +47,9 @@ enum mp_command_type { MP_CMD_FRAME_STEP, MP_CMD_SPEED_MULT, MP_CMD_RUN, - MP_CMD_SUB_LOAD, + MP_CMD_SUB_ADD, + MP_CMD_SUB_REMOVE, + MP_CMD_SUB_RELOAD, MP_CMD_KEYDOWN_EVENTS, MP_CMD_SET, MP_CMD_GET_PROPERTY, |