From 03fec24e192ea1b5c0cf957a5a64c0db9d33e67a Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 16 Sep 2016 14:24:15 +0200 Subject: player: litter code with explicit wakeup calls This does 3 kinds of changes: - change sleeptime=x to mp_set_timeout() - change sleeptime=0 to mp_wakeup_core() calls (to be more explicit) - change commands etc. to call mp_wakeup_core() if they do changes that require the playloop to be rerun This is preparation for the following changes. The goal is to process client API requests without having to rerun the playloop every time. As of this commit, the changes should not change behavior. In particular, the playloop is still implicitly woken up on every command. --- 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 3fa2c102b4..c39f316276 100644 --- a/player/core.h +++ b/player/core.h @@ -511,6 +511,7 @@ void set_osd_bar_chapters(struct MPContext *mpctx, int type); // playloop.c void mp_wait_events(struct MPContext *mpctx, double sleeptime); +void mp_set_timeout(struct MPContext *mpctx, double sleeptime); void mp_wakeup_core(struct MPContext *mpctx); void mp_wakeup_core_cb(void *ctx); void mp_process_input(struct MPContext *mpctx); -- cgit v1.2.3