commands: remove speed_set/speed_incr commands

Redundant with set/switch commands.
This commit is contained in:
wm4 2012-09-15 01:48:27 +02:00
parent 4e2fab5846
commit 950999dd7b
4 changed files with 5 additions and 20 deletions

View File

@ -2097,7 +2097,6 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
sh_video_t *const sh_video = mpctx->sh_video;
int osd_duration = opts->osd_duration;
int osdl = cmd->on_osd ? 1 : OSD_LEVEL_INVISIBLE;
int case_fallthrough_hack = 0;
switch (cmd->id) {
case MP_CMD_SEEK: {
float v = cmd->args[0].v.f;
@ -2238,21 +2237,9 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
video_reset_aspect(sh_video);
break;
case MP_CMD_SPEED_INCR: {
case MP_CMD_SPEED_MULT: {
float v = cmd->args[0].v.f;
mp_property_do("speed", M_PROPERTY_STEP_UP, &v, mpctx);
if (cmd->on_osd)
show_property_osd(mpctx, "speed");
break;
}
case MP_CMD_SPEED_MULT:
case_fallthrough_hack = true;
case MP_CMD_SPEED_SET: {
float v = cmd->args[0].v.f;
if (case_fallthrough_hack)
v *= mpctx->opts.playback_speed;
v *= mpctx->opts.playback_speed;
mp_property_do("speed", M_PROPERTY_SET, &v, mpctx);
if (cmd->on_osd)
show_property_osd(mpctx, "speed");

View File

@ -51,7 +51,7 @@ PGDWN seek -600
] speed_mult 1.1
{ speed_mult 0.5
} speed_mult 2.0
BS speed_set 1.0 # reset speed to normal
BS set speed 1.0 # reset speed to normal
q quit
q {encode} quit
ESC quit

View File

@ -101,9 +101,7 @@ static const mp_cmd_t mp_cmds[] = {
#endif
{ MP_CMD_SEEK, "seek", { ARG_FLOAT, OARG_INT(0), OARG_INT(0) } },
{ MP_CMD_EDL_MARK, "edl_mark", },
{ MP_CMD_SPEED_INCR, "speed_incr", { ARG_FLOAT } },
{ MP_CMD_SPEED_MULT, "speed_mult", { ARG_FLOAT } },
{ MP_CMD_SPEED_SET, "speed_set", { ARG_FLOAT } },
{ MP_CMD_QUIT, "quit", { OARG_INT(0) } },
{ MP_CMD_STOP, "stop", },
{ MP_CMD_FRAME_STEP, "frame_step", },
@ -198,6 +196,8 @@ static const struct legacy_cmd legacy_cmds[] = {
{"step_property", "no-osd switch"},
{"set_property", "no-osd set"},
{"set_property_osd", "set"},
{"speed_set", "set speed"},
// Approximate
{"pt_step 1", "playlist_next"},
{"pt_step -1", "playlist_prev"},
{0}

View File

@ -44,9 +44,7 @@ enum mp_command_type {
MP_CMD_TV_SET_NORM,
MP_CMD_SWITCH_RATIO,
MP_CMD_FRAME_STEP,
MP_CMD_SPEED_INCR,
MP_CMD_SPEED_MULT,
MP_CMD_SPEED_SET,
MP_CMD_RUN,
MP_CMD_SUB_LOAD,
MP_CMD_KEYDOWN_EVENTS,