diff options
author | wm4 <wm4@nowhere> | 2014-10-19 16:44:33 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-19 20:44:29 +0200 |
commit | f4c589418c7d8a7dbcfb2f25fd409f424d2ae805 (patch) | |
tree | 30f49928531bbd972a2d71dc8cec767f79baef9e /player | |
parent | c854ce934ec615bc04fe47f6c139a6a152aba8c1 (diff) | |
download | mpv-f4c589418c7d8a7dbcfb2f25fd409f424d2ae805.tar.bz2 mpv-f4c589418c7d8a7dbcfb2f25fd409f424d2ae805.tar.xz |
ipc: decouple from MPContext
Just a minor refactor to keep unneeded dependencies on the core low.
Diffstat (limited to 'player')
-rw-r--r-- | player/core.h | 6 | ||||
-rw-r--r-- | player/main.c | 8 |
2 files changed, 4 insertions, 10 deletions
diff --git a/player/core.h b/player/core.h index 2d4c22434b..4d4142000c 100644 --- a/player/core.h +++ b/player/core.h @@ -346,7 +346,7 @@ typedef struct MPContext { struct encode_lavc_context *encode_lavc_ctx; struct mp_nav_state *nav_state; - void *ipc_ctx; + struct mp_ipc_ctx *ipc_ctx; } MPContext; // audio.c @@ -378,10 +378,6 @@ void mp_nav_user_input(struct MPContext *mpctx, char *command); void mp_handle_nav(struct MPContext *mpctx); int mp_nav_in_menu(struct MPContext *mpctx); -// ipc.c -void mp_init_ipc(struct MPContext *mpctx); -void mp_uninit_ipc(struct MPContext *mpctx); - // loadfile.c void uninit_player(struct MPContext *mpctx, unsigned int mask); struct track *mp_add_subtitles(struct MPContext *mpctx, char *filename); diff --git a/player/main.c b/player/main.c index 3bed127de7..b54b59674b 100644 --- a/player/main.c +++ b/player/main.c @@ -132,7 +132,8 @@ void mp_destroy(struct MPContext *mpctx) shutdown_clients(mpctx); #if !defined(__MINGW32__) - mp_uninit_ipc(mpctx); + mp_uninit_ipc(mpctx->ipc_ctx); + mpctx->ipc_ctx = NULL; #endif command_uninit(mpctx); @@ -446,7 +447,7 @@ int mp_initialize(struct MPContext *mpctx) mp_load_scripts(mpctx); #if !defined(__MINGW32__) - mp_init_ipc(mpctx); + mpctx->ipc_ctx = mp_init_ipc(mpctx->clients, mpctx->global); #endif if (opts->shuffle) @@ -459,9 +460,6 @@ int mp_initialize(struct MPContext *mpctx) if (!mpctx->playlist->current) mpctx->playlist->current = mpctx->playlist->first; - //struct m_config *new = m_config_dup(NULL, mpctx->mconfig); - //talloc_free(new); - MP_STATS(mpctx, "end init"); return 0; |