From 39fc0060fb1a2889256e56c1e33421d21ac0f8cf Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 31 Oct 2013 23:25:55 +0100 Subject: command: replace speed_mult with multiply command The compatibility layer still takes care of the old speed_mult command. --- DOCS/man/en/input.rst | 3 --- etc/input.conf | 8 ++++---- mpvcore/input/input.c | 2 +- mpvcore/input/input.h | 1 - mpvcore/player/command.c | 8 -------- 5 files changed, 5 insertions(+), 17 deletions(-) diff --git a/DOCS/man/en/input.rst b/DOCS/man/en/input.rst index 5ba139e83b..53336344af 100644 --- a/DOCS/man/en/input.rst +++ b/DOCS/man/en/input.rst @@ -115,9 +115,6 @@ List of Input Commands ``multiply `` Multiplies the value of a property with the numeric factor. -``speed_mult `` - Multiply the ``speed`` property by the given value. - ``screenshot [subtitles|video|window|- [single|each-frame]]`` Take a screenshot. diff --git a/etc/input.conf b/etc/input.conf index 78da3730bb..1687220d08 100644 --- a/etc/input.conf +++ b/etc/input.conf @@ -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 diff --git a/mpvcore/input/input.c b/mpvcore/input/input.c index aaa9cc14df..f3da874bde 100644 --- a/mpvcore/input/input.c +++ b/mpvcore/input/input.c @@ -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"}, diff --git a/mpvcore/input/input.h b/mpvcore/input/input.h index b3e8ae9543..8ea1070f8b 100644 --- a/mpvcore/input/input.h +++ b/mpvcore/input/input.h @@ -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, diff --git a/mpvcore/player/command.c b/mpvcore/player/command.c index 172a799c03..bacc37aa27 100644 --- a/mpvcore/player/command.c +++ b/mpvcore/player/command.c @@ -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; -- cgit v1.2.3