summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-21 13:32:30 +0200
committerwm4 <wm4@nowhere>2014-10-21 13:38:41 +0200
commit0fa9e2bff0a40e077bc05dd3be70ce12ddaf6317 (patch)
tree9792434b9c01c02ab63b71408bde892a22042262 /player
parentcdbc865ad09531f733e95eb3e6a18b273910e0e7 (diff)
downloadmpv-0fa9e2bff0a40e077bc05dd3be70ce12ddaf6317.tar.bz2
mpv-0fa9e2bff0a40e077bc05dd3be70ce12ddaf6317.tar.xz
command: add playback-abort property
Now this is obscure.
Diffstat (limited to 'player')
-rw-r--r--player/command.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c
index 60ce915a9a..f811a8ea06 100644
--- a/player/command.c
+++ b/player/command.c
@@ -1157,6 +1157,13 @@ static int mp_property_seeking(void *ctx, struct m_property *prop,
return m_property_flag_ro(action, arg, !mpctx->restart_complete);
}
+static int mp_property_playback_abort(void *ctx, struct m_property *prop,
+ int action, void *arg)
+{
+ MPContext *mpctx = ctx;
+ return m_property_flag_ro(action, arg, !mpctx->playing || mpctx->stop_play);
+}
+
static int mp_property_cache(void *ctx, struct m_property *prop,
int action, void *arg)
{
@@ -2957,6 +2964,7 @@ static const struct m_property mp_properties[] = {
{"core-idle", mp_property_core_idle},
{"eof-reached", mp_property_eof_reached},
{"seeking", mp_property_seeking},
+ {"playback-abort", mp_property_playback_abort},
{"cache", mp_property_cache},
{"cache-free", mp_property_cache_free},
{"cache-used", mp_property_cache_used},