mirror of https://github.com/mpv-player/mpv
Add the on-screen-controller
Signed-off-by: wm4 <wm4@nowhere>
This commit is contained in:
parent
6048f87e3c
commit
0a0d7f43a5
|
@ -1396,6 +1396,9 @@
|
|||
search for video segments from other files, and will also ignore any
|
||||
chapter order specified for the main file.
|
||||
|
||||
``--osc``, ``--no-osc``
|
||||
Whether to load the on-screen-controller (default: no).
|
||||
|
||||
``--no-osd-bar``, ``--osd-bar``
|
||||
Disable display of the OSD bar. This will make some things (like seeking)
|
||||
use OSD text messages instead of the bar.
|
||||
|
|
5
Makefile
5
Makefile
|
@ -407,6 +407,10 @@ mpvcore/mp_lua.c: mpvcore/lua/assdraw.inc
|
|||
mpvcore/lua/assdraw.inc: TOOLS/file2string.pl mpvcore/lua/assdraw.lua
|
||||
./$^ >$@
|
||||
|
||||
mpvcore/mp_lua.c: mpvcore/lua/osc.inc
|
||||
mpvcore/lua/osc.inc: TOOLS/file2string.pl mpvcore/lua/osc.lua
|
||||
./$^ >$@
|
||||
|
||||
# ./configure must be rerun if it changed
|
||||
config.mak: configure
|
||||
@echo "############################################################"
|
||||
|
@ -507,6 +511,7 @@ clean:
|
|||
-$(RM) sub/osd_font.h
|
||||
-$(RM) mpvcore/lua/defaults.inc
|
||||
-$(RM) mpvcore/lua/assdraw.inc
|
||||
-$(RM) mpvcore/lua/osc.inc
|
||||
|
||||
distclean: clean
|
||||
-$(RM) config.log config.mak config.h TAGS tags
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -28,6 +28,9 @@ static const char *builtin_lua_scripts[][2] = {
|
|||
},
|
||||
{"mp.assdraw",
|
||||
# include "lua/assdraw.inc"
|
||||
},
|
||||
{"@osc",
|
||||
# include "lua/osc.inc"
|
||||
},
|
||||
{0}
|
||||
};
|
||||
|
@ -660,6 +663,8 @@ void mp_lua_init(struct MPContext *mpctx)
|
|||
{
|
||||
mpctx->lua_ctx = talloc_zero(NULL, struct lua_ctx);
|
||||
// Load scripts from options
|
||||
if (mpctx->opts->lua_load_osc)
|
||||
mp_lua_load_script(mpctx, "@osc");
|
||||
char **files = mpctx->opts->lua_files;
|
||||
for (int n = 0; files && files[n]; n++) {
|
||||
if (files[n][0])
|
||||
|
|
|
@ -346,6 +346,7 @@ const m_option_t mp_opts[] = {
|
|||
|
||||
#ifdef CONFIG_LUA
|
||||
OPT_STRINGLIST("lua", lua_files, CONF_GLOBAL),
|
||||
OPT_FLAG("osc", lua_load_osc, CONF_GLOBAL),
|
||||
#endif
|
||||
|
||||
// ------------------------- stream options --------------------
|
||||
|
|
|
@ -46,6 +46,7 @@ typedef struct mp_vo_opts {
|
|||
typedef struct MPOpts {
|
||||
char **reset_options;
|
||||
char **lua_files;
|
||||
int lua_load_osc;
|
||||
|
||||
struct m_obj_settings *audio_driver_list;
|
||||
int fixed_vo;
|
||||
|
|
Loading…
Reference in New Issue