summaryrefslogtreecommitdiffstats
path: root/options/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'options/options.c')
-rw-r--r--options/options.c764
1 files changed, 434 insertions, 330 deletions
diff --git a/options/options.c b/options/options.c
index a11c1114b9..8233b1a17f 100644
--- a/options/options.c
+++ b/options/options.c
@@ -32,24 +32,24 @@
#ifdef _WIN32
#include <windows.h>
+#include <dwmapi.h>
#endif
#include "options.h"
#include "m_config.h"
#include "m_option.h"
#include "common/common.h"
+#include "input/event.h"
#include "stream/stream.h"
#include "video/csputils.h"
+#include "video/filter/refqueue.h"
#include "video/hwdec.h"
#include "video/image_writer.h"
#include "sub/osd.h"
#include "player/core.h"
#include "player/command.h"
#include "stream/stream.h"
-
-#if HAVE_DRM
-#include "video/out/drm_common.h"
-#endif
+#include "demux/demux.h"
static void print_version(struct mp_log *log)
{
@@ -57,6 +57,7 @@ static void print_version(struct mp_log *log)
}
extern const struct m_sub_options tv_params_conf;
+extern const struct m_sub_options stream_bluray_conf;
extern const struct m_sub_options stream_cdda_conf;
extern const struct m_sub_options stream_dvb_conf;
extern const struct m_sub_options stream_lavf_conf;
@@ -65,6 +66,7 @@ extern const struct m_sub_options zimg_conf;
extern const struct m_sub_options drm_conf;
extern const struct m_sub_options demux_rawaudio_conf;
extern const struct m_sub_options demux_rawvideo_conf;
+extern const struct m_sub_options demux_playlist_conf;
extern const struct m_sub_options demux_lavf_conf;
extern const struct m_sub_options demux_mkv_conf;
extern const struct m_sub_options demux_cue_conf;
@@ -72,7 +74,9 @@ extern const struct m_sub_options vd_lavc_conf;
extern const struct m_sub_options ad_lavc_conf;
extern const struct m_sub_options input_config;
extern const struct m_sub_options encode_config;
+extern const struct m_sub_options ra_ctx_conf;
extern const struct m_sub_options gl_video_conf;
+extern const struct m_sub_options gl_next_conf;
extern const struct m_sub_options ao_alsa_conf;
extern const struct m_sub_options demux_conf;
@@ -86,13 +90,14 @@ extern const struct m_sub_options ao_conf;
extern const struct m_sub_options opengl_conf;
extern const struct m_sub_options vulkan_conf;
+extern const struct m_sub_options vulkan_display_conf;
extern const struct m_sub_options spirv_conf;
extern const struct m_sub_options d3d11_conf;
extern const struct m_sub_options d3d11va_conf;
extern const struct m_sub_options angle_conf;
-extern const struct m_sub_options cocoa_conf;
extern const struct m_sub_options macos_conf;
extern const struct m_sub_options wayland_conf;
+extern const struct m_sub_options wingl_conf;
extern const struct m_sub_options vaapi_conf;
static const struct m_sub_options screenshot_conf = {
@@ -106,23 +111,30 @@ static const struct m_sub_options screenshot_conf = {
static const m_option_t mp_vo_opt_list[] = {
{"vo", OPT_SETTINGSLIST(video_driver_list, &vo_obj_list)},
- {"taskbar-progress", OPT_FLAG(taskbar_progress)},
- {"snap-window", OPT_FLAG(snap_window)},
- {"ontop", OPT_FLAG(ontop)},
+ {"taskbar-progress", OPT_BOOL(taskbar_progress)},
+ {"drag-and-drop", OPT_CHOICE(drag_and_drop, {"no", -2}, {"auto", -1},
+ {"replace", DND_REPLACE},
+ {"append", DND_APPEND},
+ {"insert-next", DND_INSERT_NEXT})},
+ {"snap-window", OPT_BOOL(snap_window)},
+ {"ontop", OPT_BOOL(ontop)},
{"ontop-level", OPT_CHOICE(ontop_level, {"window", -1}, {"system", -2},
{"desktop", -3}), M_RANGE(0, INT_MAX)},
- {"border", OPT_FLAG(border)},
- {"fit-border", OPT_FLAG(fit_border)},
- {"on-all-workspaces", OPT_FLAG(all_workspaces)},
- {"geometry", OPT_GEOMETRY(geometry)},
- {"autofit", OPT_SIZE_BOX(autofit)},
- {"autofit-larger", OPT_SIZE_BOX(autofit_larger)},
- {"autofit-smaller", OPT_SIZE_BOX(autofit_smaller)},
- {"window-scale", OPT_DOUBLE(window_scale), M_RANGE(0.001, 100)},
- {"window-minimized", OPT_FLAG(window_minimized)},
- {"window-maximized", OPT_FLAG(window_maximized)},
- {"focus-on-open", OPT_BOOL(focus_on_open)},
- {"force-window-position", OPT_FLAG(force_window_position)},
+ {"border", OPT_BOOL(border)},
+ {"title-bar", OPT_BOOL(title_bar)},
+ {"on-all-workspaces", OPT_BOOL(all_workspaces)},
+ {"geometry", OPT_GEOMETRY(geometry), .force_update = true},
+ {"autofit", OPT_SIZE_BOX(autofit), .force_update = true},
+ {"autofit-larger", OPT_SIZE_BOX(autofit_larger), .force_update = true},
+ {"autofit-smaller", OPT_SIZE_BOX(autofit_smaller), .force_update = true},
+ {"auto-window-resize", OPT_BOOL(auto_window_resize)},
+ {"window-scale", OPT_DOUBLE(window_scale), M_RANGE(0.001, 100), .force_update = true},
+ {"window-minimized", OPT_BOOL(window_minimized)},
+ {"window-maximized", OPT_BOOL(window_maximized)},
+ {"focus-on-open", OPT_REMOVED("Replaced by --focus-on")},
+ {"focus-on", OPT_CHOICE(focus_on, {"never", 0}, {"open", 1}, {"all", 2})},
+ {"force-render", OPT_BOOL(force_render)},
+ {"force-window-position", OPT_BOOL(force_window_position)},
{"x11-name", OPT_STRING(winname)},
{"wayland-app-id", OPT_STRING(appid)},
{"monitoraspect", OPT_FLOAT(force_monitor_aspect), M_RANGE(0.0, 9.0)},
@@ -130,11 +142,12 @@ static const m_option_t mp_vo_opt_list[] = {
M_RANGE(1.0/32.0, 32.0)},
{"fullscreen", OPT_BOOL(fullscreen)},
{"fs", OPT_ALIAS("fullscreen")},
- {"native-keyrepeat", OPT_FLAG(native_keyrepeat)},
+ {"input-cursor-passthrough", OPT_BOOL(cursor_passthrough)},
+ {"native-keyrepeat", OPT_BOOL(native_keyrepeat)},
{"panscan", OPT_FLOAT(panscan), M_RANGE(0.0, 1.0)},
{"video-zoom", OPT_FLOAT(zoom), M_RANGE(-20.0, 20.0)},
- {"video-pan-x", OPT_FLOAT(pan_x), M_RANGE(-3.0, 3.0)},
- {"video-pan-y", OPT_FLOAT(pan_y), M_RANGE(-3.0, 3.0)},
+ {"video-pan-x", OPT_FLOAT(pan_x)},
+ {"video-pan-y", OPT_FLOAT(pan_y)},
{"video-align-x", OPT_FLOAT(align_x), M_RANGE(-1.0, 1.0)},
{"video-align-y", OPT_FLOAT(align_y), M_RANGE(-1.0, 1.0)},
{"video-scale-x", OPT_FLOAT(scale_x), M_RANGE(0, 10000.0)},
@@ -143,34 +156,74 @@ static const m_option_t mp_vo_opt_list[] = {
{"video-margin-ratio-right", OPT_FLOAT(margin_x[1]), M_RANGE(0.0, 1.0)},
{"video-margin-ratio-top", OPT_FLOAT(margin_y[0]), M_RANGE(0.0, 1.0)},
{"video-margin-ratio-bottom", OPT_FLOAT(margin_y[1]), M_RANGE(0.0, 1.0)},
+ {"video-crop", OPT_RECT(video_crop), .flags = UPDATE_IMGPAR},
{"video-unscaled", OPT_CHOICE(unscaled,
{"no", 0}, {"yes", 1}, {"downscale-big", 2})},
{"wid", OPT_INT64(WinID)},
{"screen", OPT_CHOICE(screen_id, {"default", -1}), M_RANGE(0, 32)},
+ {"screen-name", OPT_STRING(screen_name)},
{"fs-screen", OPT_CHOICE(fsscreen_id, {"all", -2}, {"current", -1}),
M_RANGE(0, 32)},
- {"keepaspect", OPT_FLAG(keepaspect)},
- {"keepaspect-window", OPT_FLAG(keepaspect_window)},
- {"hidpi-window-scale", OPT_FLAG(hidpi_window_scale)},
- {"native-fs", OPT_FLAG(native_fs)},
- {"override-display-fps", OPT_DOUBLE(override_display_fps),
+ {"fs-screen-name", OPT_STRING(fsscreen_name)},
+ {"keepaspect", OPT_BOOL(keepaspect)},
+ {"keepaspect-window", OPT_BOOL(keepaspect_window)},
+ {"hidpi-window-scale", OPT_BOOL(hidpi_window_scale)},
+ {"native-fs", OPT_BOOL(native_fs)},
+ {"show-in-taskbar", OPT_BOOL(show_in_taskbar)},
+ {"display-fps-override", OPT_DOUBLE(display_fps_override),
M_RANGE(0, DBL_MAX)},
{"video-timing-offset", OPT_DOUBLE(timing_offset), M_RANGE(0.0, 1.0)},
+ {"video-sync", OPT_CHOICE(video_sync,
+ {"audio", VS_DEFAULT},
+ {"display-resample", VS_DISP_RESAMPLE},
+ {"display-resample-vdrop", VS_DISP_RESAMPLE_VDROP},
+ {"display-resample-desync", VS_DISP_RESAMPLE_NONE},
+ {"display-tempo", VS_DISP_TEMPO},
+ {"display-adrop", VS_DISP_ADROP},
+ {"display-vdrop", VS_DISP_VDROP},
+ {"display-desync", VS_DISP_NONE},
+ {"desync", VS_NONE})},
#if HAVE_X11
{"x11-netwm", OPT_CHOICE(x11_netwm, {"auto", 0}, {"no", -1}, {"yes", 1})},
{"x11-bypass-compositor", OPT_CHOICE(x11_bypass_compositor,
{"no", 0}, {"yes", 1}, {"fs-only", 2}, {"never", 3})},
+ {"x11-present", OPT_CHOICE(x11_present,
+ {"no", 0}, {"auto", 1}, {"yes", 2})},
+ {"x11-wid-title", OPT_BOOL(x11_wid_title)},
+#endif
+#if HAVE_WAYLAND
+ {"wayland-content-type", OPT_CHOICE(content_type, {"auto", -1}, {"none", 0},
+ {"photo", 1}, {"video", 2}, {"game", 3})},
#endif
#if HAVE_WIN32_DESKTOP
+// For old MinGW-w64 compatibility
+#define DWMWCP_DEFAULT 0
+#define DWMWCP_DONOTROUND 1
+#define DWMWCP_ROUND 2
+#define DWMWCP_ROUNDSMALL 3
+
+#define DWMSBT_AUTO 0
+#define DWMSBT_NONE 1
+#define DWMSBT_MAINWINDOW 2
+#define DWMSBT_TRANSIENTWINDOW 3
+#define DWMSBT_TABBEDWINDOW 4
+
+ {"backdrop-type", OPT_CHOICE(backdrop_type, {"auto", DWMSBT_AUTO}, {"none", DWMSBT_NONE},
+ {"mica", DWMSBT_MAINWINDOW}, {"acrylic", DWMSBT_TRANSIENTWINDOW}, {"mica-alt", DWMSBT_TABBEDWINDOW})},
+ {"window-affinity", OPT_CHOICE(window_affinity, {"default", WDA_NONE},
+ {"excludefromcapture", WDA_EXCLUDEFROMCAPTURE}, {"monitor", WDA_MONITOR})},
{"vo-mmcss-profile", OPT_STRING(mmcss_profile)},
-#endif
-#if HAVE_DRM
- {"", OPT_SUBSTRUCT(drm_opts, drm_conf)},
+ {"window-corners", OPT_CHOICE(window_corners,
+ {"default", DWMWCP_DEFAULT},
+ {"donotround", DWMWCP_DONOTROUND},
+ {"round", DWMWCP_ROUND},
+ {"roundsmall", DWMWCP_ROUNDSMALL})},
#endif
#if HAVE_EGL_ANDROID
{"android-surface-size", OPT_SIZE_BOX(android_surface_size)},
#endif
- {"swapchain-depth", OPT_INT(swapchain_depth), M_RANGE(1, 8)},
+ {"swapchain-depth", OPT_INT(swapchain_depth), M_RANGE(1, VO_MAX_SWAPCHAIN_DEPTH)},
+ {"override-display-fps", OPT_REPLACED("display-fps-override")},
{0}
};
@@ -179,28 +232,32 @@ const struct m_sub_options vo_sub_opts = {
.size = sizeof(struct mp_vo_opts),
.defaults = &(const struct mp_vo_opts){
.video_driver_list = NULL,
+ .drag_and_drop = -1,
.monitor_pixel_aspect = 1.0,
.screen_id = -1,
.fsscreen_id = -1,
.panscan = 0.0f,
.scale_x = 1.0f,
.scale_y = 1.0f,
- .keepaspect = 1,
- .keepaspect_window = 1,
- .hidpi_window_scale = 1,
- .native_fs = 1,
- .taskbar_progress = 1,
- .snap_window = 0,
- .border = 1,
- .fit_border = 1,
+ .auto_window_resize = true,
+ .keepaspect = true,
+ .keepaspect_window = true,
+ .native_fs = true,
+ .taskbar_progress = true,
+ .show_in_taskbar = true,
+ .border = true,
+ .title_bar = true,
+ .appid = "mpv",
+ .content_type = -1,
.WinID = -1,
.window_scale = 1.0,
.x11_bypass_compositor = 2,
+ .x11_present = 1,
.mmcss_profile = "Playback",
.ontop_level = -1,
.timing_offset = 0.050,
.swapchain_depth = 3,
- .focus_on_open = true,
+ .focus_on = 1,
},
};
@@ -209,16 +266,20 @@ const struct m_sub_options vo_sub_opts = {
const struct m_sub_options mp_sub_filter_opts = {
.opts = (const struct m_option[]){
- {"sub-filter-sdh", OPT_FLAG(sub_filter_SDH)},
- {"sub-filter-sdh-harder", OPT_FLAG(sub_filter_SDH_harder)},
- {"sub-filter-regex-enable", OPT_FLAG(rf_enable)},
+ {"sub-filter-sdh", OPT_BOOL(sub_filter_SDH)},
+ {"sub-filter-sdh-harder", OPT_BOOL(sub_filter_SDH_harder)},
+ {"sub-filter-sdh-enclosures", OPT_STRING(sub_filter_SDH_enclosures)},
+ {"sub-filter-regex-enable", OPT_BOOL(rf_enable)},
+ {"sub-filter-regex-plain", OPT_BOOL(rf_plain)},
{"sub-filter-regex", OPT_STRINGLIST(rf_items)},
- {"sub-filter-regex-warn", OPT_FLAG(rf_warn)},
+ {"sub-filter-jsre", OPT_STRINGLIST(jsre_items)},
+ {"sub-filter-regex-warn", OPT_BOOL(rf_warn)},
{0}
},
.size = sizeof(OPT_BASE_STRUCT),
.defaults = &(OPT_BASE_STRUCT){
- .rf_enable = 1,
+ .sub_filter_SDH_enclosures = "([\uFF08",
+ .rf_enable = true,
},
.change_flags = UPDATE_SUB_FILT,
};
@@ -228,31 +289,29 @@ const struct m_sub_options mp_sub_filter_opts = {
const struct m_sub_options mp_subtitle_sub_opts = {
.opts = (const struct m_option[]){
- {"sub-delay", OPT_FLOAT(sub_delay)},
{"sub-fps", OPT_FLOAT(sub_fps)},
{"sub-speed", OPT_FLOAT(sub_speed)},
- {"sub-visibility", OPT_FLAG(sub_visibility)},
- {"sub-forced-only", OPT_CHOICE(forced_subs_only,
- {"auto", -1}, {"no", 0}, {"yes", 1})},
- {"stretch-dvd-subs", OPT_FLAG(stretch_dvd_subs)},
- {"stretch-image-subs-to-screen", OPT_FLAG(stretch_image_subs)},
- {"image-subs-video-resolution", OPT_FLAG(image_subs_video_res)},
- {"sub-fix-timing", OPT_FLAG(sub_fix_timing)},
- {"sub-pos", OPT_INT(sub_pos), M_RANGE(0, 150)},
+ {"sub-forced-events-only", OPT_BOOL(sub_forced_events_only)},
+ {"stretch-dvd-subs", OPT_BOOL(stretch_dvd_subs)},
+ {"stretch-image-subs-to-screen", OPT_BOOL(stretch_image_subs)},
+ {"image-subs-video-resolution", OPT_BOOL(image_subs_video_res)},
+ {"sub-fix-timing", OPT_BOOL(sub_fix_timing)},
+ {"sub-stretch-durations", OPT_BOOL(sub_stretch_durations)},
{"sub-gauss", OPT_FLOAT(sub_gauss), M_RANGE(0.0, 3.0)},
- {"sub-gray", OPT_FLAG(sub_gray)},
- {"sub-ass", OPT_FLAG(ass_enabled), .flags = UPDATE_SUB_HARD},
+ {"sub-gray", OPT_BOOL(sub_gray)},
+ {"sub-ass", OPT_BOOL(ass_enabled), .flags = UPDATE_SUB_HARD},
{"sub-scale", OPT_FLOAT(sub_scale), M_RANGE(0, 100)},
{"sub-ass-line-spacing", OPT_FLOAT(ass_line_spacing),
M_RANGE(-1000, 1000)},
- {"sub-use-margins", OPT_FLAG(sub_use_margins)},
- {"sub-ass-force-margins", OPT_FLAG(ass_use_margins)},
- {"sub-ass-vsfilter-aspect-compat", OPT_FLAG(ass_vsfilter_aspect_compat)},
+ {"sub-use-margins", OPT_BOOL(sub_use_margins)},
+ {"sub-ass-force-margins", OPT_BOOL(ass_use_margins)},
+ {"sub-ass-vsfilter-aspect-compat", OPT_BOOL(ass_vsfilter_aspect_compat)},
{"sub-ass-vsfilter-color-compat", OPT_CHOICE(ass_vsfilter_color_compat,
{"no", 0}, {"basic", 1}, {"full", 2}, {"force-601", 3})},
- {"sub-ass-vsfilter-blur-compat", OPT_FLAG(ass_vsfilter_blur_compat)},
- {"embeddedfonts", OPT_FLAG(use_embedded_fonts), .flags = UPDATE_SUB_HARD},
- {"sub-ass-force-style", OPT_STRINGLIST(ass_force_style_list),
+ {"sub-ass-vsfilter-blur-compat", OPT_BOOL(ass_vsfilter_blur_compat)},
+ {"sub-vsfilter-bidi-compat", OPT_BOOL(sub_vsfilter_bidi_compat)},
+ {"embeddedfonts", OPT_BOOL(use_embedded_fonts), .flags = UPDATE_SUB_HARD},
+ {"sub-ass-style-overrides", OPT_STRINGLIST(ass_style_override_list),
.flags = UPDATE_SUB_HARD},
{"sub-ass-styles", OPT_STRING(ass_styles_file),
.flags = M_OPT_FILE | UPDATE_SUB_HARD},
@@ -260,37 +319,62 @@ const struct m_sub_options mp_subtitle_sub_opts = {
{"none", 0}, {"light", 1}, {"normal", 2}, {"native", 3})},
{"sub-ass-shaper", OPT_CHOICE(ass_shaper,
{"simple", 0}, {"complex", 1})},
- {"sub-ass-justify", OPT_FLAG(ass_justify)},
- {"sub-ass-override", OPT_CHOICE(ass_style_override,
- {"no", 0}, {"yes", 1}, {"force", 3}, {"scale", 4}, {"strip", 5})},
- {"sub-scale-by-window", OPT_FLAG(sub_scale_by_window)},
- {"sub-scale-with-window", OPT_FLAG(sub_scale_with_window)},
- {"sub-ass-scale-with-window", OPT_FLAG(ass_scale_with_window)},
+ {"sub-ass-justify", OPT_BOOL(ass_justify)},
+ {"sub-scale-by-window", OPT_BOOL(sub_scale_by_window)},
+ {"sub-scale-with-window", OPT_BOOL(sub_scale_with_window)},
+ {"sub-ass-scale-with-window", OPT_BOOL(ass_scale_with_window)},
{"sub", OPT_SUBSTRUCT(sub_style, sub_style_conf)},
- {"sub-clear-on-seek", OPT_FLAG(sub_clear_on_seek)},
- {"teletext-page", OPT_INT(teletext_page), M_RANGE(1, 999)},
+ {"sub-clear-on-seek", OPT_BOOL(sub_clear_on_seek)},
+ {"teletext-page", OPT_INT(teletext_page), M_RANGE(-1, 999), .flags = UPDATE_SUB_FILT},
+ {"sub-past-video-end", OPT_BOOL(sub_past_video_end)},
+ {"sub-ass-force-style", OPT_REPLACED("sub-ass-style-overrides")},
+ {"sub-lavc-o", OPT_KEYVALUELIST(sub_avopts)},
{0}
},
.size = sizeof(OPT_BASE_STRUCT),
.defaults = &(OPT_BASE_STRUCT){
- .sub_visibility = 1,
- .forced_subs_only = -1,
- .sub_pos = 100,
.sub_speed = 1.0,
- .ass_enabled = 1,
- .sub_scale_by_window = 1,
- .ass_use_margins = 0,
- .sub_use_margins = 1,
- .ass_scale_with_window = 0,
- .sub_scale_with_window = 1,
- .teletext_page = 100,
+ .ass_enabled = true,
+ .sub_scale_by_window = true,
+ .sub_use_margins = true,
+ .sub_scale_with_window = true,
+ .teletext_page = 0,
.sub_scale = 1,
- .ass_vsfilter_aspect_compat = 1,
+ .ass_vsfilter_aspect_compat = true,
.ass_vsfilter_color_compat = 1,
- .ass_vsfilter_blur_compat = 1,
- .ass_style_override = 1,
+ .ass_vsfilter_blur_compat = true,
.ass_shaper = 1,
- .use_embedded_fonts = 1,
+ .use_embedded_fonts = true,
+ },
+ .change_flags = UPDATE_OSD,
+};
+
+#undef OPT_BASE_STRUCT
+#define OPT_BASE_STRUCT struct mp_subtitle_shared_opts
+
+const struct m_sub_options mp_subtitle_shared_sub_opts = {
+ .opts = (const struct m_option[]){
+ {"sub-delay", OPT_FLOAT(sub_delay[0])},
+ {"secondary-sub-delay", OPT_FLOAT(sub_delay[1])},
+ {"sub-pos", OPT_FLOAT(sub_pos[0]), M_RANGE(0.0, 150.0)},
+ {"secondary-sub-pos", OPT_FLOAT(sub_pos[1]), M_RANGE(0.0, 150.0)},
+ {"sub-visibility", OPT_BOOL(sub_visibility[0])},
+ {"secondary-sub-visibility", OPT_BOOL(sub_visibility[1])},
+ {"sub-ass-override", OPT_CHOICE(ass_style_override[0],
+ {"no", 0}, {"yes", 1}, {"force", 3}, {"scale", 4}, {"strip", 5}),
+ .flags = UPDATE_SUB_HARD},
+ {"secondary-sub-ass-override", OPT_CHOICE(ass_style_override[1],
+ {"no", 0}, {"yes", 1}, {"force", 3}, {"scale", 4}, {"strip", 5}),
+ .flags = UPDATE_SUB_HARD},
+ {0}
+ },
+ .size = sizeof(OPT_BASE_STRUCT),
+ .defaults = &(OPT_BASE_STRUCT){
+ .sub_visibility[0] = true,
+ .sub_visibility[1] = true,
+ .sub_pos[0] = 100,
+ .ass_style_override[0] = 1,
+ .ass_style_override[1] = 5,
},
.change_flags = UPDATE_OSD,
};
@@ -304,10 +388,11 @@ const struct m_sub_options mp_osd_render_sub_opts = {
{"osd-bar-align-y", OPT_FLOAT(osd_bar_align_y), M_RANGE(-1.0, +1.0)},
{"osd-bar-w", OPT_FLOAT(osd_bar_w), M_RANGE(1, 100)},
{"osd-bar-h", OPT_FLOAT(osd_bar_h), M_RANGE(0.1, 50)},
+ {"osd-bar-border-size", OPT_FLOAT(osd_bar_border_size), M_RANGE(0, 1000.0)},
{"osd", OPT_SUBSTRUCT(osd_style, osd_style_conf)},
{"osd-scale", OPT_FLOAT(osd_scale), M_RANGE(0, 100)},
- {"osd-scale-by-window", OPT_FLAG(osd_scale_by_window)},
- {"force-rgba-osd-rendering", OPT_FLAG(force_rgba_osd)},
+ {"osd-scale-by-window", OPT_BOOL(osd_scale_by_window)},
+ {"force-rgba-osd-rendering", OPT_BOOL(force_rgba_osd)},
{0}
},
.size = sizeof(OPT_BASE_STRUCT),
@@ -315,13 +400,29 @@ const struct m_sub_options mp_osd_render_sub_opts = {
.osd_bar_align_y = 0.5,
.osd_bar_w = 75.0,
.osd_bar_h = 3.125,
+ .osd_bar_border_size = 0.5,
.osd_scale = 1,
- .osd_scale_by_window = 1,
+ .osd_scale_by_window = true,
},
.change_flags = UPDATE_OSD,
};
#undef OPT_BASE_STRUCT
+#define OPT_BASE_STRUCT struct cuda_opts
+
+const struct m_sub_options cuda_conf = {
+ .opts = (const struct m_option[]){
+ {"decode-device", OPT_CHOICE(cuda_device, {"auto", -1}),
+ M_RANGE(0, INT_MAX)},
+ {0}
+ },
+ .size = sizeof(struct cuda_opts),
+ .defaults = &(const struct cuda_opts){
+ .cuda_device = -1,
+ },
+};
+
+#undef OPT_BASE_STRUCT
#define OPT_BASE_STRUCT struct dvd_opts
const struct m_sub_options dvd_conf = {
@@ -342,10 +443,18 @@ const struct m_sub_options dvd_conf = {
const struct m_sub_options filter_conf = {
.opts = (const struct m_option[]){
- {"deinterlace", OPT_FLAG(deinterlace)},
+ {"deinterlace", OPT_CHOICE(deinterlace,
+ {"no", 0}, {"yes", 1}, {"auto", -1})},
+ {"deinterlace-field-parity", OPT_CHOICE(field_parity,
+ {"tff", MP_FIELD_PARITY_TFF},
+ {"bff", MP_FIELD_PARITY_BFF},
+ {"auto", MP_FIELD_PARITY_AUTO})},
{0}
},
.size = sizeof(OPT_BASE_STRUCT),
+ .defaults = &(const struct filter_opts){
+ .field_parity = MP_FIELD_PARITY_AUTO,
+ },
.change_flags = UPDATE_IMGPAR,
};
@@ -369,7 +478,7 @@ static const m_option_t mp_opts[] = {
M_OPT_OPTIONAL_PARAM, .offset = -1},
{ "list-options", &m_option_type_dummy_flag, CONF_NOCFG | M_OPT_NOPROP,
.offset = -1},
- {"list-properties", OPT_FLAG(property_print_help),
+ {"list-properties", OPT_BOOL(property_print_help),
.flags = CONF_NOCFG | M_OPT_NOPROP},
{ "help", CONF_TYPE_STRING, CONF_NOCFG | M_OPT_NOPROP | M_OPT_OPTIONAL_PARAM,
.offset = -1},
@@ -380,30 +489,26 @@ static const m_option_t mp_opts[] = {
{"version", OPT_PRINT(print_version)},
{"V", OPT_PRINT(print_version)},
-#if HAVE_TESTS
- {"unittest", OPT_STRING(test_mode), .flags = CONF_NOCFG | M_OPT_NOPROP},
-#endif
-
{"player-operation-mode", OPT_CHOICE(operation_mode,
{"cplayer", 0}, {"pseudo-gui", 1}),
.flags = M_OPT_PRE_PARSE | M_OPT_NOPROP},
- {"shuffle", OPT_FLAG(shuffle)},
+ {"shuffle", OPT_BOOL(shuffle)},
// ------------------------- common options --------------------
- {"quiet", OPT_FLAG(quiet)},
- {"really-quiet", OPT_FLAG(msg_really_quiet),
+ {"quiet", OPT_BOOL(quiet)},
+ {"really-quiet", OPT_BOOL(msg_really_quiet),
.flags = CONF_PRE_PARSE | UPDATE_TERM},
- {"terminal", OPT_FLAG(use_terminal), .flags = CONF_PRE_PARSE | UPDATE_TERM},
+ {"terminal", OPT_BOOL(use_terminal), .flags = CONF_PRE_PARSE | UPDATE_TERM},
{"msg-level", OPT_MSGLEVELS(msg_levels),
.flags = CONF_PRE_PARSE | UPDATE_TERM},
{"dump-stats", OPT_STRING(dump_stats),
.flags = UPDATE_TERM | CONF_PRE_PARSE | M_OPT_FILE},
- {"msg-color", OPT_FLAG(msg_color), .flags = CONF_PRE_PARSE | UPDATE_TERM},
+ {"msg-color", OPT_BOOL(msg_color), .flags = CONF_PRE_PARSE | UPDATE_TERM},
{"log-file", OPT_STRING(log_file),
.flags = CONF_PRE_PARSE | M_OPT_FILE | UPDATE_TERM},
- {"msg-module", OPT_FLAG(msg_module), .flags = UPDATE_TERM},
- {"msg-time", OPT_FLAG(msg_time), .flags = UPDATE_TERM},
+ {"msg-module", OPT_BOOL(msg_module), .flags = UPDATE_TERM},
+ {"msg-time", OPT_BOOL(msg_time), .flags = UPDATE_TERM},
#if HAVE_WIN32_DESKTOP
{"priority", OPT_CHOICE(w32_priority,
{"no", 0},
@@ -415,25 +520,28 @@ static const m_option_t mp_opts[] = {
{"idle", IDLE_PRIORITY_CLASS}),
.flags = UPDATE_PRIORITY},
#endif
- {"config", OPT_FLAG(load_config), .flags = CONF_PRE_PARSE},
+ {"config", OPT_BOOL(load_config), .flags = CONF_PRE_PARSE},
{"config-dir", OPT_STRING(force_configdir),
.flags = CONF_NOCFG | CONF_PRE_PARSE | M_OPT_FILE},
{"reset-on-next-file", OPT_STRINGLIST(reset_options)},
-#if HAVE_LUA || HAVE_JAVASCRIPT
+#if HAVE_LUA || HAVE_JAVASCRIPT || HAVE_CPLUGINS
{"scripts", OPT_PATHLIST(script_files), .flags = M_OPT_FILE},
{"script", OPT_CLI_ALIAS("scripts-append")},
{"script-opts", OPT_KEYVALUELIST(script_opts)},
- {"load-scripts", OPT_FLAG(auto_load_scripts)},
+ {"load-scripts", OPT_BOOL(auto_load_scripts)},
+#endif
+#if HAVE_JAVASCRIPT
+ {"js-memory-report", OPT_BOOL(js_memory_report)},
#endif
#if HAVE_LUA
- {"osc", OPT_FLAG(lua_load_osc), .flags = UPDATE_BUILTIN_SCRIPTS},
- {"ytdl", OPT_FLAG(lua_load_ytdl), .flags = UPDATE_BUILTIN_SCRIPTS},
+ {"osc", OPT_BOOL(lua_load_osc), .flags = UPDATE_BUILTIN_SCRIPTS},
+ {"ytdl", OPT_BOOL(lua_load_ytdl), .flags = UPDATE_BUILTIN_SCRIPTS},
{"ytdl-format", OPT_STRING(lua_ytdl_format)},
{"ytdl-raw-options", OPT_KEYVALUELIST(lua_ytdl_raw_options)},
- {"load-stats-overlay", OPT_FLAG(lua_load_stats),
+ {"load-stats-overlay", OPT_BOOL(lua_load_stats),
.flags = UPDATE_BUILTIN_SCRIPTS},
- {"load-osd-console", OPT_FLAG(lua_load_console),
+ {"load-osd-console", OPT_BOOL(lua_load_console),
.flags = UPDATE_BUILTIN_SCRIPTS},
{"load-auto-profiles",
OPT_CHOICE(lua_load_auto_profiles, {"no", 0}, {"yes", 1}, {"auto", -1}),
@@ -447,7 +555,7 @@ static const m_option_t mp_opts[] = {
#endif
{"edition", OPT_CHOICE(edition_id, {"auto", -1}), M_RANGE(0, 8190)},
#if HAVE_LIBBLURAY
- {"bluray-device", OPT_STRING(bluray_device), .flags = M_OPT_FILE},
+ {"bluray", OPT_SUBSTRUCT(stream_bluray_opts, stream_bluray_conf)},
#endif /* HAVE_LIBBLURAY */
// ------------------------- demuxer options --------------------
@@ -458,10 +566,10 @@ static const m_option_t mp_opts[] = {
{"end", OPT_REL_TIME(play_end)},
{"length", OPT_REL_TIME(play_length)},
- {"play-dir", OPT_CHOICE(play_dir,
+ {"play-direction", OPT_CHOICE(play_dir,
{"forward", 1}, {"+", 1}, {"backward", -1}, {"-", -1})},
- {"rebase-start-time", OPT_FLAG(rebase_start_time)},
+ {"rebase-start-time", OPT_BOOL(rebase_start_time)},
{"ab-loop-a", OPT_TIME(ab_loop[0]), .flags = M_OPT_ALLOW_NO},
{"ab-loop-b", OPT_TIME(ab_loop[1]), .flags = M_OPT_ALLOW_NO},
@@ -471,17 +579,15 @@ static const m_option_t mp_opts[] = {
{"playlist-start", OPT_CHOICE(playlist_pos, {"auto", -1}, {"no", -1}),
M_RANGE(0, INT_MAX)},
- {"pause", OPT_FLAG(pause)},
+ {"pause", OPT_BOOL(pause)},
{"keep-open", OPT_CHOICE(keep_open,
{"no", 0},
{"yes", 1},
{"always", 2})},
- {"keep-open-pause", OPT_FLAG(keep_open_pause)},
+ {"keep-open-pause", OPT_BOOL(keep_open_pause)},
{"image-display-duration", OPT_DOUBLE(image_display_duration),
M_RANGE(0, INFINITY)},
- {"index", OPT_CHOICE(index_mode, {"default", 1}, {"recreate", 0})},
-
// select audio/video/subtitle stream
// keep in sync with num_ptracks[] and MAX_PTRACKS
{"aid", OPT_TRACKCHOICE(stream_id[0][STREAM_AUDIO])},
@@ -494,12 +600,18 @@ static const m_option_t mp_opts[] = {
{"alang", OPT_STRINGLIST(stream_lang[STREAM_AUDIO])},
{"slang", OPT_STRINGLIST(stream_lang[STREAM_SUB])},
{"vlang", OPT_STRINGLIST(stream_lang[STREAM_VIDEO])},
- {"track-auto-selection", OPT_FLAG(stream_auto_sel)},
- {"subs-with-matching-audio", OPT_FLAG(subs_with_matching_audio)},
+ {"track-auto-selection", OPT_BOOL(stream_auto_sel)},
+ {"subs-with-matching-audio", OPT_CHOICE(subs_with_matching_audio, {"no", 0},
+ {"forced", 1}, {"yes", 2})},
+ {"subs-match-os-language", OPT_BOOL(subs_match_os_language)},
+ {"subs-fallback", OPT_CHOICE(subs_fallback, {"no", 0}, {"default", 1}, {"yes", 2})},
+ {"subs-fallback-forced", OPT_CHOICE(subs_fallback_forced, {"no", 0},
+ {"yes", 1}, {"always", 2})},
{"lavfi-complex", OPT_STRING(lavfi_complex), .flags = UPDATE_LAVFI_COMPLEX},
- {"audio-display", OPT_CHOICE(audio_display, {"no", 0}, {"attachment", 1})},
+ {"audio-display", OPT_CHOICE(audio_display, {"no", 0},
+ {"embedded-first", 1}, {"external-first", 2})},
{"hls-bitrate", OPT_CHOICE(hls_bitrate,
{"no", -1}, {"min", 0}, {"max", INT_MAX}), M_RANGE(0, INT_MAX)},
@@ -508,23 +620,21 @@ static const m_option_t mp_opts[] = {
#if HAVE_CDDA
{"cdda", OPT_SUBSTRUCT(stream_cdda_opts, stream_cdda_conf)},
- {"cdrom-device", OPT_STRING(cdrom_device), .flags = M_OPT_FILE},
+ {"cdrom-device", OPT_REPLACED("cdda-device")},
#endif
// demuxer.c - select audio/sub file/demuxer
- {"demuxer", OPT_STRING(demuxer_name)},
- {"audio-demuxer", OPT_STRING(audio_demuxer_name)},
- {"sub-demuxer", OPT_STRING(sub_demuxer_name)},
- {"demuxer-thread", OPT_FLAG(demuxer_thread)},
+ {"demuxer", OPT_STRING(demuxer_name), .help = demuxer_help},
+ {"audio-demuxer", OPT_STRING(audio_demuxer_name), .help = demuxer_help},
+ {"sub-demuxer", OPT_STRING(sub_demuxer_name), .help = demuxer_help},
+ {"demuxer-thread", OPT_BOOL(demuxer_thread)},
{"demuxer-termination-timeout", OPT_DOUBLE(demux_termination_timeout)},
- {"demuxer-cache-wait", OPT_FLAG(demuxer_cache_wait)},
- {"prefetch-playlist", OPT_FLAG(prefetch_open)},
- {"cache-pause", OPT_FLAG(cache_pause)},
- {"cache-pause-initial", OPT_FLAG(cache_pause_initial)},
+ {"demuxer-cache-wait", OPT_BOOL(demuxer_cache_wait)},
+ {"prefetch-playlist", OPT_BOOL(prefetch_open)},
+ {"cache-pause", OPT_BOOL(cache_pause)},
+ {"cache-pause-initial", OPT_BOOL(cache_pause_initial)},
{"cache-pause-wait", OPT_FLOAT(cache_pause_wait), M_RANGE(0, DBL_MAX)},
- {"mf-fps", OPT_DOUBLE(mf_fps)},
- {"mf-type", OPT_STRING(mf_type)},
#if HAVE_DVBIN
{"dvbin", OPT_SUBSTRUCT(stream_dvb_opts, stream_dvb_conf)},
#endif
@@ -541,18 +651,14 @@ static const m_option_t mp_opts[] = {
{"audio-format", OPT_AUDIOFORMAT(audio_output_format), .flags = UPDATE_AUDIO},
{"speed", OPT_DOUBLE(playback_speed), M_RANGE(0.01, 100.0)},
- {"audio-pitch-correction", OPT_FLAG(pitch_correction)},
+ {"audio-pitch-correction", OPT_BOOL(pitch_correction)},
// set a-v distance
{"audio-delay", OPT_FLOAT(audio_delay)},
// ------------------------- codec/vfilter options --------------------
- {"af-defaults", OPT_SETTINGSLIST(af_defs, &af_obj_list),
- .deprecation_message = "use --af + enable/disable flags"},
{"af", OPT_SETTINGSLIST(af_settings, &af_obj_list)},
- {"vf-defaults", OPT_SETTINGSLIST(vf_defs, &vf_obj_list),
- .deprecation_message = "use --vf + enable/disable flags"},
{"vf", OPT_SETTINGSLIST(vf_settings, &vf_obj_list)},
{"", OPT_SUBSTRUCT(filter_opts, filter_conf)},
@@ -564,6 +670,7 @@ static const m_option_t mp_opts[] = {
{"", OPT_SUBSTRUCT(demux_lavf, demux_lavf_conf)},
{"demuxer-rawaudio", OPT_SUBSTRUCT(demux_rawaudio, demux_rawaudio_conf)},
{"demuxer-rawvideo", OPT_SUBSTRUCT(demux_rawvideo, demux_rawvideo_conf)},
+ {"", OPT_SUBSTRUCT(demux_playlist, demux_playlist_conf)},
{"demuxer-mkv", OPT_SUBSTRUCT(demux_mkv, demux_mkv_conf)},
{"demuxer-cue", OPT_SUBSTRUCT(demux_cue, demux_cue_conf)},
@@ -581,26 +688,31 @@ static const m_option_t mp_opts[] = {
{"external-files", OPT_PATHLIST(external_files), .flags = M_OPT_FILE},
{"external-file", OPT_CLI_ALIAS("external-files-append")},
- {"autoload-files", OPT_FLAG(autoload_files)},
+ {"autoload-files", OPT_BOOL(autoload_files)},
{"sub-auto", OPT_CHOICE(sub_auto,
{"no", -1}, {"exact", 0}, {"fuzzy", 1}, {"all", 2})},
+ {"sub-auto-exts", OPT_STRINGLIST(sub_auto_exts), .flags = UPDATE_SUB_EXTS},
{"audio-file-auto", OPT_CHOICE(audiofile_auto,
{"no", -1}, {"exact", 0}, {"fuzzy", 1}, {"all", 2})},
+ {"audio-file-auto-exts", OPT_STRINGLIST(audiofile_auto_exts)},
{"cover-art-auto", OPT_CHOICE(coverart_auto,
- {"no", -1}, {"fuzzy", 1})},
+ {"no", -1}, {"exact", 0}, {"fuzzy", 1}, {"all", 2})},
+ {"cover-art-auto-exts", OPT_STRINGLIST(coverart_auto_exts)},
+ {"cover-art-whitelist", OPT_BOOL(coverart_whitelist)},
{"", OPT_SUBSTRUCT(subs_rend, mp_subtitle_sub_opts)},
+ {"", OPT_SUBSTRUCT(subs_shared, mp_subtitle_shared_sub_opts)},
{"", OPT_SUBSTRUCT(subs_filt, mp_sub_filter_opts)},
{"", OPT_SUBSTRUCT(osd_rend, mp_osd_render_sub_opts)},
- {"osd-bar", OPT_FLAG(osd_bar_visible), .flags = UPDATE_OSD},
+ {"osd-bar", OPT_BOOL(osd_bar_visible), .flags = UPDATE_OSD},
//---------------------- libao/libvo options ------------------------
{"", OPT_SUBSTRUCT(ao_opts, ao_conf)},
- {"audio-exclusive", OPT_FLAG(audio_exclusive), .flags = UPDATE_AUDIO},
- {"audio-fallback-to-null", OPT_FLAG(ao_null_fallback)},
- {"audio-stream-silence", OPT_FLAG(audio_stream_silence)},
+ {"audio-exclusive", OPT_BOOL(audio_exclusive), .flags = UPDATE_AUDIO},
+ {"audio-fallback-to-null", OPT_BOOL(ao_null_fallback)},
+ {"audio-stream-silence", OPT_BOOL(audio_stream_silence)},
{"audio-wait-open", OPT_FLOAT(audio_wait_open), M_RANGE(0, 60)},
{"force-window", OPT_CHOICE(force_vo,
{"no", 0}, {"yes", 1}, {"immediate", 2})},
@@ -609,6 +721,10 @@ static const m_option_t mp_opts[] = {
// values <0 for volume and mute are legacy and ignored
{"volume", OPT_FLOAT(softvol_volume), .flags = UPDATE_VOL,
M_RANGE(-1, 1000)},
+ {"volume-gain-max", OPT_FLOAT(softvol_gain_max), M_RANGE(0, 150)},
+ {"volume-gain-min", OPT_FLOAT(softvol_gain_min), M_RANGE(-150, 0)},
+ {"volume-gain", OPT_FLOAT(softvol_gain), .flags = UPDATE_VOL,
+ M_RANGE(-150, 150)},
{"mute", OPT_CHOICE(softvol_mute,
{"no", 0},
{"auto", 0},
@@ -620,8 +736,8 @@ static const m_option_t mp_opts[] = {
{"album", 2}),
.flags = UPDATE_VOL},
{"replaygain-preamp", OPT_FLOAT(rgain_preamp), .flags = UPDATE_VOL,
- M_RANGE(-15, 15)},
- {"replaygain-clip", OPT_FLAG(rgain_clip), .flags = UPDATE_VOL},
+ M_RANGE(-150, 150)},
+ {"replaygain-clip", OPT_BOOL(rgain_clip), .flags = UPDATE_VOL},
{"replaygain-fallback", OPT_FLOAT(rgain_fallback), .flags = UPDATE_VOL,
M_RANGE(-200, 60)},
{"gapless-audio", OPT_CHOICE(gapless_audio,
@@ -634,12 +750,16 @@ static const m_option_t mp_opts[] = {
{"cursor-autohide", OPT_CHOICE(cursor_autohide_delay,
{"no", -1}, {"always", -2}), M_RANGE(0, 30000)},
- {"cursor-autohide-fs-only", OPT_FLAG(cursor_autohide_fs)},
- {"stop-screensaver", OPT_FLAG(stop_screensaver), .flags = UPDATE_SCREENSAVER},
+ {"cursor-autohide-fs-only", OPT_BOOL(cursor_autohide_fs)},
+ {"stop-screensaver", OPT_CHOICE(stop_screensaver,
+ {"no", 0},
+ {"yes", 1},
+ {"always", 2}),
+ .flags = UPDATE_SCREENSAVER},
{"", OPT_SUBSTRUCT(video_equalizer, mp_csp_equalizer_conf)},
- {"use-filedir-conf", OPT_FLAG(use_filedir_conf)},
+ {"use-filedir-conf", OPT_BOOL(use_filedir_conf)},
{"osd-level", OPT_CHOICE(osd_level,
{"0", 0}, {"1", 1}, {"2", 2}, {"3", 3})},
{"osd-on-seek", OPT_CHOICE(osd_on_seek,
@@ -648,7 +768,7 @@ static const m_option_t mp_opts[] = {
{"msg", 2},
{"msg-bar", 3})},
{"osd-duration", OPT_INT(osd_duration), M_RANGE(0, 3600000)},
- {"osd-fractions", OPT_FLAG(osd_fractions)},
+ {"osd-fractions", OPT_BOOL(osd_fractions)},
{"sstep", OPT_DOUBLE(step_sec), M_RANGE(0, DBL_MAX)},
@@ -657,13 +777,13 @@ static const m_option_t mp_opts[] = {
{"vo", 1},
{"decoder", 2},
{"decoder+vo", 3})},
- {"video-latency-hacks", OPT_FLAG(video_latency_hacks)},
+ {"video-latency-hacks", OPT_BOOL(video_latency_hacks)},
- {"untimed", OPT_FLAG(untimed)},
+ {"untimed", OPT_BOOL(untimed)},
{"stream-dump", OPT_STRING(stream_dump), .flags = M_OPT_FILE},
- {"stop-playback-on-init-failure", OPT_FLAG(stop_playback_on_init_failure)},
+ {"stop-playback-on-init-failure", OPT_BOOL(stop_playback_on_init_failure)},
{"loop-playlist", OPT_CHOICE(loop_times,
{"no", 1},
@@ -677,17 +797,19 @@ static const m_option_t mp_opts[] = {
M_RANGE(0, 10000)},
{"loop", OPT_ALIAS("loop-file")},
- {"resume-playback", OPT_FLAG(position_resume)},
- {"resume-playback-check-mtime", OPT_FLAG(position_check_mtime)},
- {"save-position-on-quit", OPT_FLAG(position_save_on_quit)},
+ {"resume-playback", OPT_BOOL(position_resume)},
+ {"resume-playback-check-mtime", OPT_BOOL(position_check_mtime)},
+ {"save-position-on-quit", OPT_BOOL(position_save_on_quit)},
{"write-filename-in-watch-later-config",
- OPT_FLAG(write_filename_in_watch_later_config)},
+ OPT_BOOL(write_filename_in_watch_later_config)},
{"ignore-path-in-watch-later-config",
- OPT_FLAG(ignore_path_in_watch_later_config)},
- {"watch-later-directory", OPT_STRING(watch_later_directory),
+ OPT_BOOL(ignore_path_in_watch_later_config)},
+ {"watch-later-dir", OPT_STRING(watch_later_dir),
.flags = M_OPT_FILE},
+ {"watch-later-directory", OPT_ALIAS("watch-later-dir")},
+ {"watch-later-options", OPT_STRINGLIST(watch_later_options)},
- {"ordered-chapters", OPT_FLAG(ordered_chapters)},
+ {"ordered-chapters", OPT_BOOL(ordered_chapters)},
{"ordered-chapters-files", OPT_STRING(ordered_chapters_files),
.flags = M_OPT_FILE},
{"chapter-merge-threshold", OPT_INT(chapter_merge_threshold),
@@ -697,19 +819,10 @@ static const m_option_t mp_opts[] = {
{"chapters-file", OPT_STRING(chapter_file), .flags = M_OPT_FILE},
- {"merge-files", OPT_FLAG(merge_files)},
+ {"merge-files", OPT_BOOL(merge_files)},
// a-v sync stuff:
- {"initial-audio-sync", OPT_FLAG(initial_audio_sync)},
- {"video-sync", OPT_CHOICE(video_sync,
- {"audio", VS_DEFAULT},
- {"display-resample", VS_DISP_RESAMPLE},
- {"display-resample-vdrop", VS_DISP_RESAMPLE_VDROP},
- {"display-resample-desync", VS_DISP_RESAMPLE_NONE},
- {"display-adrop", VS_DISP_ADROP},
- {"display-vdrop", VS_DISP_VDROP},
- {"display-desync", VS_DISP_NONE},
- {"desync", VS_NONE})},
+ {"initial-audio-sync", OPT_BOOL(initial_audio_sync)},
{"video-sync-max-video-change", OPT_DOUBLE(sync_max_video_change),
M_RANGE(0, DBL_MAX)},
{"video-sync-max-audio-change", OPT_DOUBLE(sync_max_audio_change),
@@ -718,30 +831,33 @@ static const m_option_t mp_opts[] = {
{"hr-seek", OPT_CHOICE(hr_seek,
{"no", -1}, {"absolute", 0}, {"yes", 1}, {"always", 1}, {"default", 2})},
{"hr-seek-demuxer-offset", OPT_FLOAT(hr_seek_demuxer_offset)},
- {"hr-seek-framedrop", OPT_FLAG(hr_seek_framedrop)},
+ {"hr-seek-framedrop", OPT_BOOL(hr_seek_framedrop)},
{"autosync", OPT_CHOICE(autosync, {"no", -1}), M_RANGE(0, 10000)},
{"term-osd", OPT_CHOICE(term_osd,
{"force", 1}, {"auto", 2}, {"no", 0}), .flags = UPDATE_OSD},
- {"term-osd-bar", OPT_FLAG(term_osd_bar), .flags = UPDATE_OSD},
+ {"term-osd-bar", OPT_BOOL(term_osd_bar), .flags = UPDATE_OSD},
{"term-osd-bar-chars", OPT_STRING(term_osd_bar_chars), .flags = UPDATE_OSD},
{"term-title", OPT_STRING(term_title), .flags = UPDATE_OSD},
{"term-playing-msg", OPT_STRING(playing_msg)},
{"osd-playing-msg", OPT_STRING(osd_playing_msg)},
+ {"osd-playing-msg-duration", OPT_INT(osd_playing_msg_duration),
+ M_RANGE(0, 3600000)},
{"term-status-msg", OPT_STRING(status_msg), .flags = UPDATE_OSD},
{"osd-status-msg", OPT_STRING(osd_status_msg), .flags = UPDATE_OSD},
{"osd-msg1", OPT_STRING(osd_msg[0]), .flags = UPDATE_OSD},<