mirror of https://github.com/mpv-player/mpv
input: remove pausing command prefixes
These are now equivalent to combining commands with the "cycle pause" or "set pause" commands, and thus are not needed anymore. They were also obscure and undocumented.
This commit is contained in:
parent
4b367d1602
commit
31663beeac
|
@ -510,9 +510,6 @@ prefixes can be specified. They are separated by whitespace.
|
|||
All of the osd prefixes are still overridden by the global ``--osd-level``
|
||||
settings.
|
||||
|
||||
Undocumented prefixes: ``pausing``, ``pausing_keep``, ``pausing_toggle``,
|
||||
``pausing_keep_force``. (Should these be made official?)
|
||||
|
||||
Input Sections
|
||||
--------------
|
||||
|
||||
|
|
|
@ -108,8 +108,6 @@ struct flag {
|
|||
};
|
||||
|
||||
static const struct flag cmd_flags[] = {
|
||||
{"pausing", MP_PAUSING_FLAGS, MP_PAUSING},
|
||||
{"pausing-toggle", MP_PAUSING_FLAGS, MP_PAUSING_TOGGLE},
|
||||
{"no-osd", MP_ON_OSD_FLAGS, MP_ON_OSD_NO},
|
||||
{"osd-bar", MP_ON_OSD_FLAGS, MP_ON_OSD_BAR},
|
||||
{"osd-msg", MP_ON_OSD_FLAGS, MP_ON_OSD_MSG},
|
||||
|
|
|
@ -44,12 +44,9 @@ enum mp_cmd_flags {
|
|||
MP_ON_OSD_BAR = 2, // force a bar, if applicable
|
||||
MP_ON_OSD_MSG = 4, // force a message, if applicable
|
||||
MP_EXPAND_PROPERTIES = 8, // expand strings as properties
|
||||
MP_PAUSING = 16, // pause after running command
|
||||
MP_PAUSING_TOGGLE = 32, // toggle pause after running command
|
||||
|
||||
MP_ON_OSD_FLAGS = MP_ON_OSD_NO | MP_ON_OSD_AUTO |
|
||||
MP_ON_OSD_BAR | MP_ON_OSD_MSG,
|
||||
MP_PAUSING_FLAGS = MP_PAUSING | MP_PAUSING_TOGGLE,
|
||||
};
|
||||
|
||||
enum mp_input_section_flags {
|
||||
|
|
|
@ -3714,15 +3714,6 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
|
|||
default:
|
||||
MP_VERBOSE(mpctx, "Received unknown cmd %s\n", cmd->name);
|
||||
}
|
||||
|
||||
if (cmd->flags & MP_PAUSING)
|
||||
pause_player(mpctx);
|
||||
if (cmd->flags & MP_PAUSING_TOGGLE) {
|
||||
if (opts->pause)
|
||||
unpause_player(mpctx);
|
||||
else
|
||||
pause_player(mpctx);
|
||||
}
|
||||
}
|
||||
|
||||
void command_uninit(struct MPContext *mpctx)
|
||||
|
|
Loading…
Reference in New Issue