1
mirror of https://github.com/mpv-player/mpv synced 2024-11-14 22:48:35 +01:00

options: add M_OPT_FILE to some more options that take files

This commit is contained in:
Philip Sequeira 2017-11-20 16:18:54 -05:00 committed by wm4
parent 16d2ddb505
commit 21a5c416d5
3 changed files with 10 additions and 10 deletions

View File

@ -653,7 +653,7 @@ const struct ao_driver audio_out_oss = {
.oss_mixer_device = PATH_DEV_MIXER,
},
.options = (const struct m_option[]) {
OPT_STRING("mixer-device", oss_mixer_device, 0),
OPT_STRING("mixer-device", oss_mixer_device, M_OPT_FILE),
OPT_STRING("mixer-channel", cfg_oss_mixer_channel, 0),
{0}
},

View File

@ -356,7 +356,7 @@ const m_option_t mp_opts[] = {
OPT_FLAG("terminal", use_terminal, CONF_PRE_PARSE | UPDATE_TERM),
OPT_GENERAL(char**, "msg-level", msg_levels, CONF_PRE_PARSE | UPDATE_TERM,
.type = &m_option_type_msglevels),
OPT_STRING("dump-stats", dump_stats, UPDATE_TERM | CONF_PRE_PARSE),
OPT_STRING("dump-stats", dump_stats, UPDATE_TERM | CONF_PRE_PARSE | M_OPT_FILE),
OPT_FLAG("msg-color", msg_color, CONF_PRE_PARSE | UPDATE_TERM),
OPT_STRING("log-file", log_file, CONF_PRE_PARSE | M_OPT_FILE | UPDATE_TERM),
OPT_FLAG("msg-module", msg_module, UPDATE_TERM),
@ -377,7 +377,7 @@ const m_option_t mp_opts[] = {
OPT_STRINGLIST("reset-on-next-file", reset_options, 0),
#if HAVE_LUA || HAVE_JAVASCRIPT
OPT_PATHLIST("scripts", script_files, M_OPT_FIXED),
OPT_PATHLIST("scripts", script_files, M_OPT_FIXED | M_OPT_FILE),
OPT_CLI_ALIAS("script", "scripts-append"),
OPT_KEYVALUELIST("script-opts", script_opts, 0),
OPT_FLAG("load-scripts", auto_load_scripts, 0),
@ -462,7 +462,7 @@ const m_option_t mp_opts[] = {
#endif
// demuxer.c - select audio/sub file/demuxer
OPT_PATHLIST("audio-files", audio_files, 0),
OPT_PATHLIST("audio-files", audio_files, M_OPT_FILE),
OPT_CLI_ALIAS("audio-file", "audio-files-append"),
OPT_STRING("demuxer", demuxer_name, 0),
OPT_STRING("audio-demuxer", audio_demuxer_name, 0),
@ -532,11 +532,11 @@ const m_option_t mp_opts[] = {
// ------------------------- subtitles options --------------------
OPT_PATHLIST("sub-files", sub_name, 0),
OPT_PATHLIST("sub-files", sub_name, M_OPT_FILE),
OPT_CLI_ALIAS("sub-file", "sub-files-append"),
OPT_PATHLIST("sub-file-paths", sub_paths, 0),
OPT_PATHLIST("audio-file-paths", audiofile_paths, 0),
OPT_PATHLIST("external-files", external_files, 0),
OPT_PATHLIST("sub-file-paths", sub_paths, M_OPT_FILE),
OPT_PATHLIST("audio-file-paths", audiofile_paths, M_OPT_FILE),
OPT_PATHLIST("external-files", external_files, M_OPT_FILE),
OPT_CLI_ALIAS("external-file", "external-files-append"),
OPT_FLAG("autoload-files", autoload_files, 0),
OPT_CHOICE("sub-auto", sub_auto, 0,

View File

@ -428,7 +428,7 @@ const struct m_sub_options gl_video_conf = {
({"no", BLEND_SUBS_NO},
{"yes", BLEND_SUBS_YES},
{"video", BLEND_SUBS_VIDEO})),
OPT_PATHLIST("glsl-shaders", user_shaders, 0),
OPT_PATHLIST("glsl-shaders", user_shaders, M_OPT_FILE),
OPT_CLI_ALIAS("glsl-shader", "glsl-shaders-append"),
OPT_FLAG("deband", deband, 0),
OPT_SUBSTRUCT("deband", deband_opts, deband_conf, 0),
@ -436,7 +436,7 @@ const struct m_sub_options gl_video_conf = {
OPT_INTRANGE("gpu-tex-pad-x", tex_pad_x, 0, 0, 4096),
OPT_INTRANGE("gpu-tex-pad-y", tex_pad_y, 0, 0, 4096),
OPT_SUBSTRUCT("", icc_opts, mp_icc_conf, 0),
OPT_STRING("gpu-shader-cache-dir", shader_cache_dir, 0),
OPT_STRING("gpu-shader-cache-dir", shader_cache_dir, M_OPT_FILE),
OPT_STRING_VALIDATE("gpu-hwdec-interop", hwdec_interop, 0,
ra_hwdec_validate_opt),
OPT_REPLACED("opengl-hwdec-interop", "gpu-hwdec-interop"),