From fb1266c98b409e0ff9a2c6bb2422879132b3922d Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 28 Aug 2014 17:35:50 +0200 Subject: player: update cache state only if requested Add a mechanism to the client API code, which allows the player core to query whether a client API event is needed at all. Use it for the cache update. In this case, this is probably a pure microoptimization; but the mechanism will be useful for other things too. --- player/client.h | 1 + 1 file changed, 1 insertion(+) (limited to 'player/client.h') diff --git a/player/client.h b/player/client.h index b329ae6d7b..a8804dbf82 100644 --- a/player/client.h +++ b/player/client.h @@ -17,6 +17,7 @@ int mp_clients_num(struct MPContext *mpctx); void mp_client_broadcast_event(struct MPContext *mpctx, int event, void *data); int mp_client_send_event(struct MPContext *mpctx, const char *client_name, int event, void *data); +bool mp_client_event_is_registered(struct MPContext *mpctx, int event); void mp_client_property_change(struct MPContext *mpctx, const char *name); struct mpv_handle *mp_new_client(struct mp_client_api *clients, const char *name); -- cgit v1.2.3