diff options
author | wm4 <wm4@nowhere> | 2016-06-11 18:40:08 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-06-11 18:40:08 +0200 |
commit | bb9aad097a0e9eaa71ac92890fc9d2176f74911d (patch) | |
tree | ce9d5c44b098631a4d72162738940dd531dabd76 /player/core.h | |
parent | 9fcc517cee13ad446ddbf40cd63c013d50fd14d0 (diff) | |
download | mpv-bb9aad097a0e9eaa71ac92890fc9d2176f74911d.tar.bz2 mpv-bb9aad097a0e9eaa71ac92890fc9d2176f74911d.tar.xz |
player: do not update OSD all the time when paused
Normally, OSD is updated every time the playloop is run. This has to be
done, because the OSD may implicitly reference various properties,
without knowing whether they really need to be updated or not. (There's
a property update mechanism, but it's mostly unavailable, because OSD is
special-cased and can not use the client API mechanism properly.)
Normally, these updates are no problem, because the OSD is only actually
printed when the OSD text actually changes.
But commit d23ffd24 added a rate-limiting mechanism, which tries to
limit OSD updates at most every 50ms (or the next video frame). Since it
can't know in advance whether the OSD is going to change or not, this
simply waked up the player every 50ms.
Change this so that the player is updated only as part of general
updates determined through mp_notify(). (This function also notifies the
client API of changed properties.) The desired result is that the player
will not wake up at all in normal idle mode, but still update properties
that can change when paused, such as the cache.
This is mostly a cosmetic change (in the sense of making runtime
behavior just slightly better). It has the slightly more negative
consequence that properties which update implicitly (such as "clock")
will not update periodically anymore.
Diffstat (limited to 'player/core.h')
-rw-r--r-- | player/core.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/player/core.h b/player/core.h index 3a5689b9f3..61360b726e 100644 --- a/player/core.h +++ b/player/core.h @@ -243,7 +243,7 @@ typedef struct MPContext { double osd_msg_visible; double osd_msg_next_duration; double osd_last_update; - bool osd_force_update; + bool osd_force_update, osd_idle_update; char *osd_msg_text; bool osd_show_pos; struct osd_progbar_state osd_progbar; |