summaryrefslogtreecommitdiffstats
path: root/player/client.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-08-02 01:39:28 +0200
committerwm4 <wm4@nowhere>2014-08-02 01:53:22 +0200
commit733bdebcb94e485317e210cfd79ec058b097e12d (patch)
treebec9b4181e8e9ffdf7d74cabdd12dfad7295f93e /player/client.h
parent82a223e4e0bf45827c20592aaa7d5690593802ff (diff)
downloadmpv-733bdebcb94e485317e210cfd79ec058b097e12d.tar.bz2
mpv-733bdebcb94e485317e210cfd79ec058b097e12d.tar.xz
client API: minor optimizations for property notification
Internally, there are two mechanisms which can trigger property notification as used with "observed" properties in the client API. The first mechanism associates events with a group of properties that are potentially changed by a certain event. mp_event_property_change[] declares these associations, and maps each event to a set of strings. When an event happens, the set of strings is matched against the list of observed properties of each client. Make this more efficient by comparing bitsets of events instead. This way, only a bit-wise "and" is needed for each observed property. Even better, we can completely skip clients which have no observed properties that match. The second mechanism just updates individual properties explicitly by name. Optimize this by using the property index instead. It would be nice if we could reuse the first mechanism for the second one, but there are too many properties to fit into a 64 bit mask. (Though the limit on 64 events might get us into trouble later...)
Diffstat (limited to 'player/client.h')
-rw-r--r--player/client.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/client.h b/player/client.h
index af94778a55..b329ae6d7b 100644
--- a/player/client.h
+++ b/player/client.h
@@ -17,7 +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);
-void mp_client_property_change(struct MPContext *mpctx, const char *const *list);
+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);
struct mp_log *mp_client_get_log(struct mpv_handle *ctx);