summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorMartin Herkt <lachs0r@srsfckn.biz>2017-02-12 01:01:56 +0100
committerMartin Herkt <lachs0r@srsfckn.biz>2017-02-12 01:01:56 +0100
commit35aa705c3ece8293652ffcf449c71fe80b96e722 (patch)
tree7c0fb34ec96204cbcd867a973b2476689919a5b4 /options
parent10a005df0c981050afc35184a42173bea7ea2527 (diff)
parent3739d1318fdb658bb6037bfe06bb6cefb3b50a09 (diff)
downloadmpv-35aa705c3ece8293652ffcf449c71fe80b96e722.tar.bz2
mpv-35aa705c3ece8293652ffcf449c71fe80b96e722.tar.xz
Merge branch 'master' into release/current
Diffstat (limited to 'options')
-rw-r--r--options/options.c30
-rw-r--r--options/options.h11
-rw-r--r--options/parse_configfile.c3
3 files changed, 37 insertions, 7 deletions
diff --git a/options/options.c b/options/options.c
index f79df7d82f..b711156c18 100644
--- a/options/options.c
+++ b/options/options.c
@@ -40,6 +40,7 @@
#include "stream/stream.h"
#include "video/csputils.h"
#include "video/hwdec.h"
+#include "video/out/opengl/hwdec.h"
#include "video/image_writer.h"
#include "sub/osd.h"
#include "audio/filter/af.h"
@@ -87,6 +88,8 @@ extern const struct m_obj_list af_obj_list;
extern const struct m_obj_list vo_obj_list;
extern const struct m_obj_list ao_obj_list;
+extern const struct m_sub_options angle_conf;
+
const struct m_opt_choice_alternatives mp_hwdec_names[] = {
{"no", HWDEC_NONE},
{"auto", HWDEC_AUTO},
@@ -150,9 +153,9 @@ const struct m_sub_options stream_cache_conf = {
static const m_option_t mp_vo_opt_list[] = {
OPT_SETTINGSLIST("vo", video_driver_list, 0, &vo_obj_list, ),
- OPT_CHOICE_C("hwdec-preload", hwdec_preload_api, 0, mp_hwdec_names),
OPT_SUBSTRUCT("sws", sws_opts, sws_conf, 0),
OPT_FLAG("taskbar-progress", taskbar_progress, 0),
+ OPT_FLAG("snap-window", snap_window, 0),
OPT_FLAG("ontop", ontop, 0),
OPT_FLAG("border", border, 0),
OPT_FLAG("fit-border", fit_border, 0),
@@ -199,7 +202,11 @@ static const m_option_t mp_vo_opt_list[] = {
0, drm_validate_connector_opt),
OPT_INT("drm-mode", drm_mode_id, 0),
#endif
-
+#if HAVE_GL
+ OPT_STRING_VALIDATE("opengl-hwdec-interop", gl_hwdec_interop, 0,
+ gl_hwdec_validate_opt),
+ OPT_REPLACED("hwdec-preload", "opengl-hwdec-interop"),
+#endif
{0}
};
@@ -216,6 +223,7 @@ const struct m_sub_options vo_sub_opts = {
.keepaspect_window = 1,
.hidpi_window_scale = 1,
.taskbar_progress = 1,
+ .snap_window = 0,
.border = 1,
.fit_border = 1,
.WinID = -1,
@@ -379,6 +387,7 @@ const m_option_t mp_opts[] = {
OPT_STRING("audio-demuxer", audio_demuxer_name, 0),
OPT_STRING("sub-demuxer", sub_demuxer_name, 0),
OPT_FLAG("demuxer-thread", demuxer_thread, 0),
+ OPT_FLAG("prefetch-playlist", prefetch_open, 0),
OPT_FLAG("cache-pause", cache_pausing, 0),
OPT_DOUBLE("mf-fps", mf_fps, 0),
@@ -466,6 +475,7 @@ const m_option_t mp_opts[] = {
OPT_FLAG("sub-forced-only", forced_subs_only, UPDATE_OSD),
OPT_FLAG("stretch-dvd-subs", stretch_dvd_subs, UPDATE_OSD),
OPT_FLAG("stretch-image-subs-to-screen", stretch_image_subs, UPDATE_OSD),
+ OPT_FLAG("image-subs-video-resolution", image_subs_video_res, UPDATE_OSD),
OPT_FLAG("sub-fix-timing", sub_fix_timing, 0),
OPT_CHOICE("sub-auto", sub_auto, 0,
({"no", -1}, {"exact", 0}, {"fuzzy", 1}, {"all", 2})),
@@ -490,6 +500,7 @@ const m_option_t mp_opts[] = {
({"none", 0}, {"light", 1}, {"normal", 2}, {"native", 3})),
OPT_CHOICE("sub-ass-shaper", ass_shaper, UPDATE_OSD,
({"simple", 0}, {"complex", 1})),
+ OPT_FLAG("sub-ass-justify", ass_justify, 0),
OPT_CHOICE("sub-ass-style-override", ass_style_override, UPDATE_OSD,
({"no", 0}, {"yes", 1}, {"force", 3}, {"signfs", 4}, {"strip", 5})),
OPT_FLAG("sub-scale-by-window", sub_scale_by_window, UPDATE_OSD),
@@ -583,7 +594,6 @@ const m_option_t mp_opts[] = {
OPT_FLAG("untimed", untimed, 0),
- OPT_STRING("stream-capture", stream_capture, M_OPT_FILE),
OPT_STRING("stream-dump", stream_dump, M_OPT_FILE),
OPT_FLAG("stop-playback-on-init-failure", stop_playback_on_init_failure, 0),
@@ -671,6 +681,8 @@ const m_option_t mp_opts[] = {
OPT_STRING("screenshot-template", screenshot_template, 0),
OPT_STRING("screenshot-directory", screenshot_directory, 0),
+ OPT_STRING("record-file", record_file, M_OPT_FILE),
+
OPT_SUBSTRUCT("", input_opts, input_config, 0),
OPT_PRINT("list-protocols", stream_print_proto_list),
@@ -686,6 +698,15 @@ const m_option_t mp_opts[] = {
OPT_SUBSTRUCT("", gl_video_opts, gl_video_conf, 0),
#endif
+#if HAVE_EGL_ANGLE
+ OPT_SUBSTRUCT("", angle_opts, angle_conf, 0),
+#endif
+
+#if HAVE_GL_WIN32
+ OPT_CHOICE("opengl-dwmflush", wingl_dwm_flush, 0,
+ ({"no", -1}, {"auto", 0}, {"windowed", 1}, {"yes", 2})),
+#endif
+
#if HAVE_ENCODING
OPT_SUBSTRUCT("", encode_opts, encode_config, 0),
#endif
@@ -697,7 +718,8 @@ const m_option_t mp_opts[] = {
OPT_REPLACED("ass", "sub-ass"),
OPT_REPLACED("audiofile", "audio-file"),
OPT_REMOVED("benchmark", "use --untimed (no stats)"),
- OPT_REMOVED("capture", "use --stream-capture=<filename>"),
+ OPT_REMOVED("capture", NULL),
+ OPT_REMOVED("stream-capture", NULL),
OPT_REMOVED("channels", "use --audio-channels (changed semantics)"),
OPT_REPLACED("cursor-autohide-delay", "cursor-autohide"),
OPT_REPLACED("delay", "audio-delay"),
diff --git a/options/options.h b/options/options.h
index fc37e98f8a..f465c0f862 100644
--- a/options/options.h
+++ b/options/options.h
@@ -10,6 +10,7 @@ typedef struct mp_vo_opts {
struct m_obj_settings *video_driver_list;
int taskbar_progress;
+ int snap_window;
int ontop;
int fullscreen;
int border;
@@ -50,7 +51,7 @@ typedef struct mp_vo_opts {
// vo_wayland, vo_drm
struct sws_opts *sws_opts;
// vo_opengl, vo_opengl_cb
- int hwdec_preload_api;
+ char *gl_hwdec_interop;
// vo_drm
char *drm_connector_spec;
int drm_mode_id;
@@ -136,8 +137,8 @@ typedef struct MPOpts {
int video_osd;
int untimed;
- char *stream_capture;
char *stream_dump;
+ char *record_file;
int stop_playback_on_init_failure;
int loop_times;
int loop_file;
@@ -213,12 +214,14 @@ typedef struct MPOpts {
int forced_subs_only;
int stretch_dvd_subs;
int stretch_image_subs;
+ int image_subs_video_res;
int sub_fix_timing;
char **audio_files;
char *demuxer_name;
int demuxer_thread;
+ int prefetch_open;
char *audio_demuxer_name;
char *sub_demuxer_name;
@@ -279,6 +282,7 @@ typedef struct MPOpts {
int ass_style_override;
int ass_hinting;
int ass_shaper;
+ int ass_justify;
int sub_clear_on_seek;
int teletext_page;
@@ -318,7 +322,10 @@ typedef struct MPOpts {
char *ipc_path;
char *input_file;
+ int wingl_dwm_flush;
+
struct gl_video_opts *gl_video_opts;
+ struct angle_opts *angle_opts;
struct dvd_opts *dvd_opts;
} MPOpts;
diff --git a/options/parse_configfile.c b/options/parse_configfile.c
index e7c877349d..0ef80082d4 100644
--- a/options/parse_configfile.c
+++ b/options/parse_configfile.c
@@ -150,7 +150,8 @@ int m_config_parse(m_config_t *config, const char *location, bstr data,
}
}
- m_config_finish_default_profile(config, flags);
+ if (config->recursion_depth == 0)
+ m_config_finish_default_profile(config, flags);
talloc_free(tmp);
return 1;