diff options
author | wm4 <wm4@nowhere> | 2014-08-28 17:35:50 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-08-28 17:49:09 +0200 |
commit | fb1266c98b409e0ff9a2c6bb2422879132b3922d (patch) | |
tree | 32b39734b2daf8750ee94d762f3c01b35f3735d5 /player/client.h | |
parent | f9f436a49093bed07e9a14ad2c7b974bb7e32f36 (diff) | |
download | mpv-fb1266c98b409e0ff9a2c6bb2422879132b3922d.tar.bz2 mpv-fb1266c98b409e0ff9a2c6bb2422879132b3922d.tar.xz |
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.
Diffstat (limited to 'player/client.h')
-rw-r--r-- | player/client.h | 1 |
1 files changed, 1 insertions, 0 deletions
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); |