summaryrefslogtreecommitdiffstats
path: root/player/client.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-02-01 18:09:40 +0100
committerwm4 <wm4@nowhere>2020-02-01 18:09:40 +0100
commitda38caff9c0bec4745cef16b7904e26e51a4539b (patch)
tree39ea39729f109713d1871f0aed053a156f86c768 /player/client.c
parent66a979bd757f27739158023f44a943a406a59159 (diff)
downloadmpv-da38caff9c0bec4745cef16b7904e26e51a4539b.tar.bz2
mpv-da38caff9c0bec4745cef16b7904e26e51a4539b.tar.xz
scripting: load scripts from directories
The intention is to provide a slightly nicer way to distribute scripts. For example, you could put multiple source files into the directory, and then import them from the actual script file (this is still unimplemented). At first I wanted to require a config file (because you need to know at least which scripting backend it should use). This wouldn't have been too hard (could have reused/abused the mpv config file parsing mechanism, and I already had working code that was just 2 function calls). But probably better to do this without new config files, because it might become a pain in the distant future. So this just probes for "main.lua", "main.js", etc., until an existing file is found. Another important change is that this skips all directory entries whose name starts with ".". This automatically excludes the "." and ".." special directories, and is probably useful to exclude random crap that might be lying around in the directory (such as editor temporary files, or OSX, in its usual hrmful, annoying, and idiotic modus operandi, sharting all over any directories opened by "Finder"). Although the changelog mentions the docs, they're added only in a later commit.
Diffstat (limited to 'player/client.c')
-rw-r--r--player/client.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/player/client.c b/player/client.c
index 0a3f5491a7..14ee8fd7ee 100644
--- a/player/client.c
+++ b/player/client.c
@@ -316,16 +316,6 @@ struct mpv_global *mp_client_get_global(struct mpv_handle *ctx)
return ctx->mpctx->global;
}
-struct MPContext *mp_client_get_core(struct mpv_handle *ctx)
-{
- return ctx->mpctx;
-}
-
-struct MPContext *mp_client_api_get_core(struct mp_client_api *api)
-{
- return api->mpctx;
-}
-
static void wakeup_client(struct mpv_handle *ctx)
{
pthread_mutex_lock(&ctx->wakeup_lock);