diff options
author | xylosper <darklin20@gmail.com> | 2015-01-23 09:28:21 +0900 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-01-25 17:00:21 +0900 |
commit | a4b21b5a13a3caa883003a3c9f798e0b0eb8d9bd (patch) | |
tree | 373f595dc5959813fb5ae013d3fd5d98ef14562e | |
parent | 799458a5b121b4a37fa71de8c436f68f3cc61603 (diff) | |
download | mpv-a4b21b5a13a3caa883003a3c9f798e0b0eb8d9bd.tar.bz2 mpv-a4b21b5a13a3caa883003a3c9f798e0b0eb8d9bd.tar.xz |
player: some fixes for property notification
`core-idle` depends on seeking state `mpctx->restart_complete`,
so make `core-idle` notified whenever `seeking` is notified, too.
`paused-for-cache` can be changed on MPV_EVENT_CACHE_UPDATE obviously.
Finally, `MPV_EVENT_PLAYBACK_RESTART` should be notified after
`mpctx->restart_complete` changed.
Conflicts:
player/command.c
-rw-r--r-- | player/command.c | 6 | ||||
-rw-r--r-- | player/playloop.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/player/command.c b/player/command.c index fbf54d2fd3..0a0cb4fd8b 100644 --- a/player/command.c +++ b/player/command.c @@ -3350,12 +3350,12 @@ static const char *const *const mp_event_property_change[] = { "width", "height", "fps", "aspect", "vo-configured"), E(MPV_EVENT_AUDIO_RECONFIG, "audio-format", "audio-codec", "audio-bitrate", "samplerate", "channels", "audio"), - E(MPV_EVENT_SEEK, "seeking"), - E(MPV_EVENT_PLAYBACK_RESTART, "seeking"), + E(MPV_EVENT_SEEK, "seeking", "core-idle"), + E(MPV_EVENT_PLAYBACK_RESTART, "seeking", "core-idle"), E(MPV_EVENT_METADATA_UPDATE, "metadata"), E(MPV_EVENT_CHAPTER_CHANGE, "chapter", "chapter-metadata"), E(MP_EVENT_CACHE_UPDATE, "cache", "cache-free", "cache-used", "cache-idle", - "demuxer-cache-duration", "demuxer-cache-idle"), + "demuxer-cache-duration", "demuxer-cache-idle", "paused-for-cache"), E(MP_EVENT_WIN_RESIZE, "window-scale"), E(MP_EVENT_WIN_STATE, "window-minimized", "display-names"), }; diff --git a/player/playloop.c b/player/playloop.c index 649ccdb7ce..55ff59fa10 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -902,8 +902,8 @@ void run_playloop(struct MPContext *mpctx) fill_audio_out_buffers(mpctx, endpts); // actually play prepared buffer if (!mpctx->restart_complete) { mpctx->hrseek_active = false; - mp_notify(mpctx, MPV_EVENT_PLAYBACK_RESTART, NULL); mpctx->restart_complete = true; + mp_notify(mpctx, MPV_EVENT_PLAYBACK_RESTART, NULL); if (!mpctx->playing_msg_shown) { if (opts->playing_msg) { char *msg = |