From d23ffd243f33ce5d6a5649c7909664b0ae1e858e Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 25 Sep 2014 20:25:24 +0200 Subject: player: rate-limit OSD text update There's no need to update OSD messages and the terminal status if nobody is going to see it. Since the player doesn't block on video display anymore, this update happens to often and probably burns slightly more CPU than necessary. (OSD redrawing is handled separately, so it's just mostly useless text processing and such.) Change it so that it's updated only on every video frame or all 50ms (whatever comes first). For VO OSD, we could in theory try to lock to the OSD redraw heuristic or the display refresh rate, but that's more complicated and doesn't work for the terminal status. --- player/core.h | 1 + 1 file changed, 1 insertion(+) (limited to 'player/core.h') diff --git a/player/core.h b/player/core.h index 11421ce485..a60e13a3e7 100644 --- a/player/core.h +++ b/player/core.h @@ -184,6 +184,7 @@ typedef struct MPContext { int osd_function; double osd_function_visible; double osd_last_update; + bool osd_force_update; struct osd_progbar_state osd_progbar; struct playlist *playlist; -- cgit v1.2.3