summaryrefslogtreecommitdiffstats
path: root/player/core.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-13 01:14:07 +0200
committerwm4 <wm4@nowhere>2014-05-13 02:39:37 +0200
commit2279f718de746d5fed3b64df74e9c47af98975b5 (patch)
tree57aa74740fcd067a5e87cb9810b2888b0548aeee /player/core.h
parent2a2dd8aac2d68db1471bbb4fd852f85f3fcf9c24 (diff)
downloadmpv-2279f718de746d5fed3b64df74e9c47af98975b5.tar.bz2
mpv-2279f718de746d5fed3b64df74e9c47af98975b5.tar.xz
player: reorganize how lua scripts are loaded
Make loading of scripts independent of Lua. Move some of the loading code from lua.c to scripting.c, and make it easier to add new scripting backends.
Diffstat (limited to 'player/core.h')
-rw-r--r--player/core.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/player/core.h b/player/core.h
index 18a749376b..891c14792d 100644
--- a/player/core.h
+++ b/player/core.h
@@ -449,6 +449,13 @@ void idle_loop(struct MPContext *mpctx);
void handle_force_window(struct MPContext *mpctx, bool reconfig);
void add_frame_pts(struct MPContext *mpctx, double pts);
+// scripting.c
+struct mp_scripting {
+ const char *file_ext; // e.g. "lua"
+ int (*load)(struct mpv_handle *client, const char *filename);
+};
+void mp_load_scripts(struct MPContext *mpctx);
+
// sub.c
void reset_subtitles(struct MPContext *mpctx, int order);
void uninit_subs(struct demuxer *demuxer);