From 88ae914b1ef2b76362c527985bd459b0d8226d45 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 10 Feb 2014 21:01:35 +0100 Subject: 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). --- player/core.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'player/core.h') diff --git a/player/core.h b/player/core.h index 556903b50d..d39ac64dab 100644 --- a/player/core.h +++ b/player/core.h @@ -140,12 +140,16 @@ enum { #define NUM_PTRACKS 2 typedef struct MPContext { + bool initialized; struct mpv_global *global; struct MPOpts *opts; struct mp_log *log; - struct mp_log *statusline; struct m_config *mconfig; struct input_ctx *input; + struct mp_client_api *clients; + struct mp_dispatch_queue *dispatch; + + struct mp_log *statusline; struct osd_state *osd; struct mp_osd_msg *osd_msg_stack; char *term_osd_text; @@ -385,6 +389,9 @@ void mp_set_playlist_entry(struct MPContext *mpctx, struct playlist_entry *e); void mp_play_files(struct MPContext *mpctx); // main.c +int mp_initialize(struct MPContext *mpctx); +struct MPContext *mp_create(void); +void mp_destroy(struct MPContext *mpctx); void mp_print_version(struct mp_log *log, int always); // misc.c -- cgit v1.2.3