Add the on-screen-controller

Signed-off-by: wm4 <wm4@nowhere>
This commit is contained in:
ChrisK2 2013-09-26 00:56:41 +02:00 committed by wm4
parent 6048f87e3c
commit 0a0d7f43a5
6 changed files with 1183 additions and 0 deletions

View File

@ -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.

View File

@ -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

1168
mpvcore/lua/osc.lua Normal file

File diff suppressed because it is too large Load Diff

View File

@ -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])

View File

@ -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 --------------------

View File

@ -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;