player: move builtin profiles to a separate file

Move the embedded string with the builtin profiles to a separate
builtin.conf file. This makes it easier to read and edit, and you can
also check it for errors with --include=etc/builtin.conf. (Normally
errors are hidden intentionally, because there's no way to output error
messages this early, and because some options might not be present on
all platforms or with all configurations.)
This commit is contained in:
wm4 committed 2016-09-15 14:50:38 +02:00
1 parent 98f1b5fb98
commit 2b0c620b22
5 files changed
+51 -50

No files matched your search

+1
View File
@@ -19,6 +19,7 @@
/demux/ebml_types.h
/sub/osd_font.h
/player/lua/*.inc
/player/builtin_conf.inc
/DOCS/man/mpv.1
/DOCS/man/mpv.aux
/DOCS/man/mpv.log
+40
View File
@@ -0,0 +1,40 @@
[pseudo-gui]
terminal=no
force-window=yes
idle=once
screenshot-directory=~~desktop/
[libmpv]
config=no
idle=yes
terminal=no
input-terminal=no
osc=no
ytdl=no
input-default-bindings=no
input-vo-keyboard=no
input-lirc=no
input-appleremote=no
input-media-keys=no
input-app-events=no
stop-playback-on-init-failure=yes
[encoding]
vo=lavc
ao=lavc
keep-open=no
force-window=no
gapless-audio=yes
resume-playback=no
load-scripts=no
osc=no
framedrop=no
[opengl-hq]
scale=spline36
cscale=spline36
dscale=mitchell
dither-depth=auto
correct-downscaling=yes
sigmoid-upscaling=yes
deband=yes
+2
View File
@@ -210,6 +210,7 @@ const struct m_sub_options vo_sub_opts = {
.window_scale = 1.0,
.x11_bypass_compositor = 2,
.mmcss_profile = "Playback",
.fullscreen = HAVE_RPI ? 1 : 0,
},
};
@@ -865,6 +866,7 @@ const struct MPOpts mp_default_opts = {
.sub_fix_timing = 1,
.screenshot_template = "mpv-shot%n",
.hwdec_api = HAVE_RPI ? HWDEC_RPI : 0,
.hwdec_codecs = "h264,vc1,wmv3,hevc,mpeg2video,vp9",
.videotoolbox_format = IMGFMT_NV12,
+4 -50
View File
@@ -62,6 +62,10 @@
#include "command.h"
#include "screenshot.h"
static const char def_config[] =
#include "player/builtin_conf.inc"
;
#ifdef _WIN32
#include <windows.h>
#endif
@@ -99,56 +103,6 @@ const char mp_help_text[] =
" --h=<pat> print options which match the given shell pattern\n"
"\n";
static const char def_config[] =
#if HAVE_RPI
"hwdec=rpi\n"
"fullscreen=yes\n"
#endif
"\n"
"[pseudo-gui]\n"
"terminal=no\n"
"force-window=yes\n"
"idle=once\n"
"screenshot-directory=~~desktop/\n"
"\n"
"[libmpv]\n"
"config=no\n"
"idle=yes\n"
"terminal=no\n"
"input-terminal=no\n"
"osc=no\n"
"ytdl=no\n"
"input-default-bindings=no\n"
"input-vo-keyboard=no\n"
"input-lirc=no\n"
"input-appleremote=no\n"
"input-media-keys=no\n"
"input-app-events=no\n"
"stop-playback-on-init-failure=yes\n"
#if HAVE_ENCODING
"\n"
"[encoding]\n"
"vo=lavc\n"
"ao=lavc\n"
"keep-open=no\n"
"force-window=no\n"
"gapless-audio=yes\n"
"resume-playback=no\n"
"load-scripts=no\n"
"osc=no\n"
"framedrop=no\n"
#endif
"\n"
"[opengl-hq]\n"
"scale=spline36\n"
"cscale=spline36\n"
"dscale=mitchell\n"
"dither-depth=auto\n"
"correct-downscaling=yes\n"
"sigmoid-upscaling=yes\n"
"deband=yes\n"
;
static pthread_mutex_t terminal_owner_lock = PTHREAD_MUTEX_INITIALIZER;
static struct MPContext *terminal_owner;
+4
View File
@@ -63,6 +63,10 @@ def build(ctx):
source = "etc/input.conf",
target = "input/input_conf.h")
ctx.file2string(
source = "etc/builtin.conf",
target = "player/builtin_conf.inc")
ctx.file2string(
source = "sub/osd_font.otf",
target = "sub/osd_font.h")