summaryrefslogtreecommitdiffstats
path: root/player/lua.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-11-22 14:47:50 +0100
committerwm4 <wm4@nowhere>2016-11-22 15:54:44 +0100
commitf30c5d09f4478ca40ceabc90d57fea68965778df (patch)
tree13ee64c5b6554cb2c46d0998185f51f4a7c30a25 /player/lua.c
parent745862131f2e03bfb7b8fae4499d84522f0cc1a2 (diff)
downloadmpv-f30c5d09f4478ca40ceabc90d57fea68965778df.tar.bz2
mpv-f30c5d09f4478ca40ceabc90d57fea68965778df.tar.xz
client API: turn mpv_suspend() and mpv_resume() into stubs
As threatened by the API changes document. This commit also removes or stubs equivalent calls in IPC and Lua scripting. The stubs are left to maintain ABI compatibility. The semantics of the API functions have been close enough to doing nothing that this probably won't even break existing API users. Probably.
Diffstat (limited to 'player/lua.c')
-rw-r--r--player/lua.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/player/lua.c b/player/lua.c
index 442a2ba073..e76dc46fca 100644
--- a/player/lua.c
+++ b/player/lua.c
@@ -393,7 +393,6 @@ static int load_lua(struct mpv_handle *client, const char *fname)
r = 0;
error_out:
- mp_resume_all(client);
if (ctx->state)
lua_close(ctx->state);
talloc_free(ctx);
@@ -451,22 +450,17 @@ static int script_find_config_file(lua_State *L)
static int script_suspend(lua_State *L)
{
struct script_ctx *ctx = get_ctx(L);
- MP_WARN(ctx, "mp.suspend() (possibly triggered by mp.use_suspend) is "
- "deprecated.\n");
- mpv_suspend(ctx->client);
+ MP_ERR(ctx, "mp.suspend() is deprecated and does nothing.\n");
return 0;
}
static int script_resume(lua_State *L)
{
- struct script_ctx *ctx = get_ctx(L);
- mpv_resume(ctx->client);
return 0;
}
static int script_resume_all(lua_State *L)
{
- mp_resume_all(get_ctx(L)->client);
return 0;
}
@@ -1134,8 +1128,6 @@ static int script_subprocess(lua_State *L)
luaL_checktype(L, 1, LUA_TTABLE);
void *tmp = mp_lua_PITA(L);
- mp_resume_all(ctx->client);
-
lua_getfield(L, 1, "args"); // args
int num_args = mp_lua_len(L, -1);
char *args[256];
@@ -1193,8 +1185,6 @@ static int script_subprocess_detached(lua_State *L)
luaL_checktype(L, 1, LUA_TTABLE);
void *tmp = mp_lua_PITA(L);
- mp_resume_all(ctx->client);
-
lua_getfield(L, 1, "args"); // args
int num_args = mp_lua_len(L, -1);
char *args[256];