1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-16 12:17:12 +00:00

command: replace speed_mult with multiply command

The compatibility layer still takes care of the old speed_mult command.
This commit is contained in:
wm4 2013-10-31 23:25:55 +01:00
parent 71ded03123
commit 39fc0060fb
5 changed files with 5 additions and 17 deletions

View File

@ -115,9 +115,6 @@ List of Input Commands
``multiply <property> <factor>``
Multiplies the value of a property with the numeric factor.
``speed_mult <value>``
Multiply the ``speed`` property by the given value.
``screenshot [subtitles|video|window|- [single|each-frame]]``
Take a screenshot.

View File

@ -66,10 +66,10 @@
#PGDWN seek -600
#+ add audio-delay 0.100 # this changes audio/video sync
#- add audio-delay -0.100
#[ speed_mult 0.9091 # scale playback speed
#] speed_mult 1.1
#{ speed_mult 0.5
#} speed_mult 2.0
#[ multiply speed 0.9091 # scale playback speed
#] multiply speed 1.1
#{ multiply speed 0.5
#} multiply speed 2.0
#BS set speed 1.0 # reset speed to normal
#q quit
#Q quit_watch_later

View File

@ -142,7 +142,6 @@ static const mp_cmd_t mp_cmds[] = {
{"exact", 1}, {"1", 1},
{"keyframes", -1}, {"-1", -1})),
}},
{ MP_CMD_SPEED_MULT, "speed_mult", { ARG_DOUBLE } },
{ MP_CMD_QUIT, "quit", { OARG_INT(0) } },
{ MP_CMD_QUIT_WATCH_LATER, "quit_watch_later", },
{ MP_CMD_STOP, "stop", },
@ -291,6 +290,7 @@ static const struct legacy_cmd legacy_cmds[] = {
{"show_tracks_osd", "show_text ${track-list}"},
{"!show_tracks", "show_text ${track-list}"},
{"!show_playlist", "show_text ${playlist}"},
{"!speed_mult", "multiply speed"},
// Approximate (can fail if user added additional whitespace)
{"pt_step 1", "playlist_next"},

View File

@ -50,7 +50,6 @@ enum mp_command_type {
MP_CMD_TV_SET_NORM,
MP_CMD_FRAME_STEP,
MP_CMD_FRAME_BACK_STEP,
MP_CMD_SPEED_MULT,
MP_CMD_RUN,
MP_CMD_SUB_ADD,
MP_CMD_SUB_REMOVE,

View File

@ -2542,14 +2542,6 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
break;
}
case MP_CMD_SPEED_MULT: {
double v = cmd->args[0].v.d * cmd->scale;
v *= mpctx->opts->playback_speed;
mp_property_do("speed", M_PROPERTY_SET, &v, mpctx);
show_property_osd(mpctx, "speed", cmd->on_osd);
break;
}
case MP_CMD_FRAME_STEP:
add_step_frame(mpctx, 1);
break;