1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-31 12:11:52 +00:00

input: remove numeric compatibility parameters from commands

MPlayer requires numeric values for input command parameters. mplayer2
also did. mpv changed these to choices using symbolic strings a long
time ago, but left numeric choices for compatibility.
This commit is contained in:
wm4 2015-03-04 17:20:58 +01:00
parent f447179c59
commit 9e1866af1e

View File

@ -60,12 +60,12 @@ const struct mp_cmd_def mp_cmds[] = {
{ MP_CMD_SEEK, "seek", {
ARG_TIME,
OARG_CHOICE(0, ({"relative", 0}, {"0", 0}, {"-", 0},
{"absolute-percent", 1}, {"1", 1},
{"absolute", 2}, {"2", 2})),
OARG_CHOICE(0, ({"default-precise", 0}, {"0", 0},
{"exact", 1}, {"1", 1},
{"keyframes", -1}, {"-1", -1})),
OARG_CHOICE(0, ({"relative", 0},, {"-", 0},
{"absolute-percent", 1},
{"absolute", 2},
OARG_CHOICE(0, ({"default-precise", 0},
{"exact", 1},
{"keyframes", -1})),
},
.allow_auto_repeat = true,
},
@ -79,12 +79,12 @@ const struct mp_cmd_def mp_cmds[] = {
.on_updown = true },
{ MP_CMD_FRAME_BACK_STEP, "frame_back_step", .allow_auto_repeat = true },
{ MP_CMD_PLAYLIST_NEXT, "playlist_next", {
OARG_CHOICE(0, ({"weak", 0}, {"0", 0},
{"force", 1}, {"1", 1})),
OARG_CHOICE(0, ({"weak", 0},,
{"force", 1})),
}},
{ MP_CMD_PLAYLIST_PREV, "playlist_prev", {
OARG_CHOICE(0, ({"weak", 0}, {"0", 0},
{"force", 1}, {"1", 1})),
OARG_CHOICE(0, ({"weak", 0},
{"force", 1})),
}},
{ MP_CMD_SUB_STEP, "sub_step", { ARG_INT }, .allow_auto_repeat = true },
{ MP_CMD_SUB_SEEK, "sub_seek", { ARG_INT }, .allow_auto_repeat = true },
@ -116,15 +116,15 @@ const struct mp_cmd_def mp_cmds[] = {
}},
{ MP_CMD_LOADFILE, "loadfile", {
ARG_STRING,
OARG_CHOICE(0, ({"replace", 0}, {"0", 0},
{"append", 1}, {"1", 1},
OARG_CHOICE(0, ({"replace", 0},
{"append", 1},
{"append-play", 2})),
OPT_KEYVALUELIST(ARG(str_list), MP_CMD_OPT_ARG),
}},
{ MP_CMD_LOADLIST, "loadlist", {
ARG_STRING,
OARG_CHOICE(0, ({"replace", 0}, {"0", 0},
{"append", 1}, {"1", 1})),
OARG_CHOICE(0, ({"replace", 0},
{"append", 1})),
}},
{ MP_CMD_PLAYLIST_CLEAR, "playlist_clear", },
{ MP_CMD_PLAYLIST_REMOVE, "playlist_remove", {