diff options
author | wm4 <wm4@nowhere> | 2017-04-14 18:56:03 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-04-14 18:58:48 +0200 |
commit | b586bc2dbec6495e65ef1a34045f6d66a7112d9d (patch) | |
tree | 1696ea19a63d34516b3a9538659094119c51be63 /player/command.c | |
parent | 419624fb068ed4e7f449fa4fd0dda8edf161ac1c (diff) | |
download | mpv-b586bc2dbec6495e65ef1a34045f6d66a7112d9d.tar.bz2 mpv-b586bc2dbec6495e65ef1a34045f6d66a7112d9d.tar.xz |
player: fix core-idle and eof-reached update notifcations
Make mpv_observe_property() work correctly on them even with
--keep-open-pause=no.
This also changes the situations in which the screensaver is
enabled/disabled subtly.
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/player/command.c b/player/command.c index ab2d43984a..73081e89f9 100644 --- a/player/command.c +++ b/player/command.c @@ -1503,8 +1503,7 @@ static int mp_property_core_idle(void *ctx, struct m_property *prop, int action, void *arg) { MPContext *mpctx = ctx; - bool idle = mpctx->paused || !mpctx->restart_complete || !mpctx->playing; - return m_property_flag_ro(action, arg, idle); + return m_property_flag_ro(action, arg, !mpctx->playback_active); } static int mp_property_idle(void *ctx, struct m_property *prop, @@ -4093,8 +4092,8 @@ static const char *const *const mp_event_property_change[] = { E(MPV_EVENT_TRACK_SWITCHED, "vid", "video", "aid", "audio", "sid", "sub", "secondary-sid"), E(MPV_EVENT_IDLE, "*"), - E(MPV_EVENT_PAUSE, "pause", "paused-on-cache", "core-idle", "eof-reached"), - E(MPV_EVENT_UNPAUSE, "pause", "paused-on-cache", "core-idle", "eof-reached"), + E(MPV_EVENT_PAUSE, "pause"), + E(MPV_EVENT_UNPAUSE, "pause"), E(MPV_EVENT_TICK, "time-pos", "audio-pts", "stream-pos", "avsync", "percent-pos", "time-remaining", "playtime-remaining", "playback-time", "estimated-vf-fps", "drop-frame-count", "vo-drop-frame-count", @@ -4126,6 +4125,7 @@ static const char *const *const mp_event_property_change[] = { "fullscreen"), E(MP_EVENT_CHANGE_PLAYLIST, "playlist", "playlist-pos", "playlist-pos-1", "playlist-count", "playlist/count"), + E(MP_EVENT_CORE_IDLE, "core-idle", "eof-reached"), }; #undef E |