From 92a9150cc253fb3ce21228d5b5afb6a06d7054fd Mon Sep 17 00:00:00 2001 From: Julian Date: Wed, 27 Sep 2017 01:17:47 +0200 Subject: lua: integrate stats.lua script Signed-off-by: wm4 Rename --stats to --load-stats-overlay and add an entry to options.rst over the original commit. Signed-off-by: wm4 --- options/m_option.h | 2 +- options/options.c | 2 ++ options/options.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'options') diff --git a/options/m_option.h b/options/m_option.h index ad6dfe6698..ac10ed9dd2 100644 --- a/options/m_option.h +++ b/options/m_option.h @@ -400,7 +400,7 @@ struct m_option { #define UPDATE_TERM (1 << 7) // terminal options #define UPDATE_DEINT (1 << 8) // --deinterlace #define UPDATE_OSD (1 << 10) // related to OSD rendering -#define UPDATE_BUILTIN_SCRIPTS (1 << 11) // osc/ytdl +#define UPDATE_BUILTIN_SCRIPTS (1 << 11) // osc/ytdl/stats #define UPDATE_IMGPAR (1 << 12) // video image params overrides #define UPDATE_INPUT (1 << 13) // mostly --input-* options #define UPDATE_AUDIO (1 << 14) // --audio-channels etc. diff --git a/options/options.c b/options/options.c index eae58a45a4..a0aa4a89f8 100644 --- a/options/options.c +++ b/options/options.c @@ -304,6 +304,7 @@ const m_option_t mp_opts[] = { OPT_FLAG("ytdl", lua_load_ytdl, UPDATE_BUILTIN_SCRIPTS), OPT_STRING("ytdl-format", lua_ytdl_format, 0), OPT_KEYVALUELIST("ytdl-raw-options", lua_ytdl_raw_options, 0), + OPT_FLAG("load-stats-overlay", lua_load_stats, UPDATE_BUILTIN_SCRIPTS), #endif // ------------------------- stream options -------------------- @@ -871,6 +872,7 @@ const struct MPOpts mp_default_opts = { .lua_load_ytdl = 1, .lua_ytdl_format = NULL, .lua_ytdl_raw_options = NULL, + .lua_load_stats = 1, #endif .auto_load_scripts = 1, .loop_times = 1, diff --git a/options/options.h b/options/options.h index d2d0ea3cf9..3bb2a0a311 100644 --- a/options/options.h +++ b/options/options.h @@ -90,6 +90,7 @@ typedef struct MPOpts { int lua_load_ytdl; char *lua_ytdl_format; char **lua_ytdl_raw_options; + int lua_load_stats; int auto_load_scripts; -- cgit v1.2.3