input: "quit_watch_later" and "stop" are abort commands

This means they get special handling for asynchronously aborting
playback, even if the player is "stuck".

Also document "stop". It seems somewhat useful for client API users
(although that will be implemented properly only in the following
commits.)
This commit is contained in:
wm4 2014-09-13 14:10:10 +02:00
parent 7c77f0b803
commit 2dd819705d
2 changed files with 10 additions and 2 deletions

View File

@ -327,6 +327,12 @@ List of Input Commands
Write the resume config file that the ``quit_watch_later`` command writes,
but continue playback normally.
``stop``
Stop playback and clear playlist. With default settings, this is
essentially like ``quit``. Useful for the client API: playback can be
stopped without terminating the player.
Input Commands that are Possibly Subject to Change
--------------------------------------------------
@ -503,8 +509,8 @@ Input Commands that are Possibly Subject to Change
be used in input.conf to reassign such bindings.)
Undocumented commands: ``tv_last_channel`` (TV/DVB only), ``stop`` (questionable
use), ``get_property`` (?), ``vo_cmdline`` (experimental).
Undocumented commands: ``tv_last_channel`` (TV/DVB only), ``get_property`` (?),
``vo_cmdline`` (experimental).
Input Command Prefixes
----------------------

View File

@ -255,6 +255,8 @@ static bool is_abort_cmd(int cmd_id)
{
switch (cmd_id) {
case MP_CMD_QUIT:
case MP_CMD_QUIT_WATCH_LATER:
case MP_CMD_STOP:
case MP_CMD_PLAYLIST_NEXT:
case MP_CMD_PLAYLIST_PREV:
return true;