From 2308b3a2a6e78c980a568320a44367e394a05238 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 16 Feb 2015 20:04:15 +0100 Subject: sub: mess with styling defaults, change --ass-use-margins behavior Now --ass-use-margins doesn't apply to normal subtitles anymore. This is probably the inverse from the mpv behavior users expected so far, and thus a breaking change, so rename the option, that the user at least has a chance to lookup the option and decide whether the new behavior is wanted or not. The basic idea here is: - plain text subtitles should have a certain useful defalt behavior, like actually using margins - ASS subtitles should never be broken by default - ASS subtitles should look and behave like plaintext subtitles if the --ass-style-override=force option is used This also subtly changes --sub-scale-with-window and adds the --ass- scale-with-window option. Since this one isn't so important, don't bother with compatibility. --- options/options.c | 11 ++++++++--- options/options.h | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'options') diff --git a/options/options.c b/options/options.c index 48c46e4462..5276a6f6bf 100644 --- a/options/options.c +++ b/options/options.c @@ -337,7 +337,8 @@ const m_option_t mp_opts[] = { OPT_FLAG("sub-ass", ass_enabled, 0), OPT_FLOATRANGE("sub-scale", sub_scale, 0, 0, 100), OPT_FLOATRANGE("ass-line-spacing", ass_line_spacing, 0, -1000, 1000), - OPT_FLAG("ass-use-margins", ass_use_margins, 0), + OPT_FLAG("sub-use-margins", sub_use_margins, 0), + OPT_FLAG("ass-force-margins", ass_use_margins, 0), OPT_FLAG("ass-vsfilter-aspect-compat", ass_vsfilter_aspect_compat, 0), OPT_CHOICE("ass-vsfilter-color-compat", ass_vsfilter_color_compat, 0, ({"no", 0}, {"basic", 1}, {"full", 2}, {"force-601", 3})), @@ -353,6 +354,7 @@ const m_option_t mp_opts[] = { ({"no", 0}, {"yes", 1}, {"force", 3}, {"signfs", 4})), OPT_FLAG("sub-scale-by-window", sub_scale_by_window, 0), OPT_FLAG("sub-scale-with-window", sub_scale_with_window, 0), + OPT_FLAG("ass-scale-with-window", ass_scale_with_window, 0), OPT_FLAG("osd-bar", osd_bar_visible, 0), OPT_FLOATRANGE("osd-bar-align-x", osd_bar_align_x, 0, -1.0, +1.0), OPT_FLOATRANGE("osd-bar-align-y", osd_bar_align_y, 0, -1.0, +1.0), @@ -473,8 +475,6 @@ const m_option_t mp_opts[] = { OPT_FLAG("keepaspect", vo.keepaspect, 0), OPT_FLAG("keepaspect-window", vo.keepaspect_window, 0), -//---------------------- mplayer-only options ------------------------ - OPT_FLAG("use-filedir-conf", use_filedir_conf, 0), OPT_CHOICE("osd-level", osd_level, 0, ({"0", 0}, {"1", 1}, {"2", 2}, {"3", 3})), @@ -658,6 +658,7 @@ const m_option_t mp_opts[] = { OPT_REMOVED("fixed-vo", "--fixed-vo=yes is now the default"), OPT_REPLACED("mkv-subtitle-preroll", "demuxer-mkv-subtitle-preroll"), OPT_REPLACED("dtshd", "ad-spdif-dtshd"), + OPT_REPLACED("ass-use-margins", "sub-use-margins"), {0} }; @@ -706,6 +707,10 @@ const struct MPOpts mp_default_opts = { .osd_scale = 1, .osd_scale_by_window = 1, .sub_scale_by_window = 1, + .ass_use_margins = 0, + .sub_use_margins = 1, + .ass_scale_with_window = 0, + .sub_scale_with_window = 1, .use_text_osd = 1, #if HAVE_LUA .lua_load_osc = 1, diff --git a/options/options.h b/options/options.h index c558176940..52bf0fa221 100644 --- a/options/options.h +++ b/options/options.h @@ -241,6 +241,7 @@ typedef struct MPOpts { int osd_scale_by_window; int sub_scale_by_window; int sub_scale_with_window; + int ass_scale_with_window; struct osd_style_opts *osd_style; struct osd_style_opts *sub_text_style; float sub_scale; @@ -249,6 +250,7 @@ typedef struct MPOpts { int ass_enabled; float ass_line_spacing; int ass_use_margins; + int sub_use_margins; int ass_vsfilter_aspect_compat; int ass_vsfilter_color_compat; int ass_vsfilter_blur_compat; -- cgit v1.2.3