summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-09-13 14:10:10 +0200
committerwm4 <wm4@nowhere>2014-09-13 14:10:10 +0200
commit2dd819705dcbeb4a20c0d6123082f9662cfa2ae4 (patch)
tree070013e22ffc0d0fffc2378f20866c291d262ccf
parent7c77f0b803b85ad6b811f90755437fc42cbd4104 (diff)
downloadmpv-2dd819705dcbeb4a20c0d6123082f9662cfa2ae4.tar.bz2
mpv-2dd819705dcbeb4a20c0d6123082f9662cfa2ae4.tar.xz
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.)
-rw-r--r--DOCS/man/input.rst10
-rw-r--r--input/cmd_list.c2
2 files changed, 10 insertions, 2 deletions
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst
index 262cbafbe9..54d989c943 100644
--- a/DOCS/man/input.rst
+++ b/DOCS/man/input.rst
@@ -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
----------------------
diff --git a/input/cmd_list.c b/input/cmd_list.c
index 96e9d91f16..88e5b78f91 100644
--- a/input/cmd_list.c
+++ b/input/cmd_list.c
@@ -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;