diff options
author | wm4 <wm4@nowhere> | 2014-02-10 21:01:35 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-02-10 21:01:35 +0100 |
commit | 88ae914b1ef2b76362c527985bd459b0d8226d45 (patch) | |
tree | fbab27d01347c98fd36348821fafc47037193810 /player/client.h | |
parent | c6166ff448432dc74c300933e5c93838d06c420a (diff) | |
download | mpv-88ae914b1ef2b76362c527985bd459b0d8226d45.tar.bz2 mpv-88ae914b1ef2b76362c527985bd459b0d8226d45.tar.xz |
Add a client API
Add a client API, which is intended to be a stable API to get some rough
control over the player. Basically, it reflects what can be done with
input.conf commands or the old slavemode. It will replace the old
slavemode (and enable the implementation of a new slave protocol).
Diffstat (limited to 'player/client.h')
-rw-r--r-- | player/client.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/player/client.h b/player/client.h new file mode 100644 index 0000000000..4c0c23c614 --- /dev/null +++ b/player/client.h @@ -0,0 +1,24 @@ +#ifndef MP_CLIENT_H_ +#define MP_CLIENT_H_ + +#include <stdint.h> + +#include "libmpv/client.h" + +struct MPContext; +struct mpv_handle; +struct mp_client_api; +struct mp_log; + +void mp_clients_init(struct MPContext *mpctx); +void mp_clients_destroy(struct MPContext *mpctx); +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); + +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); + +#endif |