From 7debdde9b91833e63b800181d8d3aaf3099bdfaa Mon Sep 17 00:00:00 2001 From: Dan Oscarsson Date: Sun, 2 Oct 2016 17:08:14 +0200 Subject: options: rename subtitle options Rename the text subtitle options from --sub-text- to --sub- and --ass- options to --sub-ass-. The intention is to common sub options to prefixed --sub- and special ASS option be seen as a special version of sub options. The OSD options that work like the --sub- options are still named --osd-. Man page updated including a short note about renamed --sub-text-* and --ass-* options to --sub-* and --sub-ass-*. --- options/options.c | 51 +++++++++++++++++++++++++++++++++++++++------------ options/options.h | 2 +- 2 files changed, 40 insertions(+), 13 deletions(-) (limited to 'options') diff --git a/options/options.c b/options/options.c index d1e46ef4c6..9c195c3e68 100644 --- a/options/options.c +++ b/options/options.c @@ -466,32 +466,32 @@ const m_option_t mp_opts[] = { OPT_FLAG("sub-gray", sub_gray, UPDATE_OSD), OPT_FLAG("sub-ass", ass_enabled, 0), OPT_FLOATRANGE("sub-scale", sub_scale, UPDATE_OSD, 0, 100), - OPT_FLOATRANGE("ass-line-spacing", ass_line_spacing, UPDATE_OSD, -1000, 1000), + OPT_FLOATRANGE("sub-ass-line-spacing", ass_line_spacing, UPDATE_OSD, -1000, 1000), OPT_FLAG("sub-use-margins", sub_use_margins, UPDATE_OSD), - OPT_FLAG("ass-force-margins", ass_use_margins, UPDATE_OSD), - OPT_FLAG("ass-vsfilter-aspect-compat", ass_vsfilter_aspect_compat, UPDATE_OSD), - OPT_CHOICE("ass-vsfilter-color-compat", ass_vsfilter_color_compat, UPDATE_OSD, + OPT_FLAG("sub-ass-force-margins", ass_use_margins, UPDATE_OSD), + OPT_FLAG("sub-ass-vsfilter-aspect-compat", ass_vsfilter_aspect_compat, UPDATE_OSD), + OPT_CHOICE("sub-ass-vsfilter-color-compat", ass_vsfilter_color_compat, UPDATE_OSD, ({"no", 0}, {"basic", 1}, {"full", 2}, {"force-601", 3})), - OPT_FLAG("ass-vsfilter-blur-compat", ass_vsfilter_blur_compat, UPDATE_OSD), + OPT_FLAG("sub-ass-vsfilter-blur-compat", ass_vsfilter_blur_compat, UPDATE_OSD), OPT_FLAG("embeddedfonts", use_embedded_fonts, 0), - OPT_STRINGLIST("ass-force-style", ass_force_style_list, UPDATE_OSD), - OPT_STRING("ass-styles", ass_styles_file, M_OPT_FILE), - OPT_CHOICE("ass-hinting", ass_hinting, UPDATE_OSD, + OPT_STRINGLIST("sub-ass-force-style", ass_force_style_list, UPDATE_OSD), + OPT_STRING("sub-ass-styles", ass_styles_file, M_OPT_FILE), + OPT_CHOICE("sub-ass-hinting", ass_hinting, UPDATE_OSD, ({"none", 0}, {"light", 1}, {"normal", 2}, {"native", 3})), - OPT_CHOICE("ass-shaper", ass_shaper, UPDATE_OSD, + OPT_CHOICE("sub-ass-shaper", ass_shaper, UPDATE_OSD, ({"simple", 0}, {"complex", 1})), - OPT_CHOICE("ass-style-override", ass_style_override, UPDATE_OSD, + 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), OPT_FLAG("sub-scale-with-window", sub_scale_with_window, UPDATE_OSD), - OPT_FLAG("ass-scale-with-window", ass_scale_with_window, UPDATE_OSD), + OPT_FLAG("sub-ass-scale-with-window", ass_scale_with_window, UPDATE_OSD), OPT_FLAG("osd-bar", osd_bar_visible, UPDATE_OSD), OPT_FLOATRANGE("osd-bar-align-x", osd_bar_align_x, UPDATE_OSD, -1.0, +1.0), OPT_FLOATRANGE("osd-bar-align-y", osd_bar_align_y, UPDATE_OSD, -1.0, +1.0), OPT_FLOATRANGE("osd-bar-w", osd_bar_w, UPDATE_OSD, 1, 100), OPT_FLOATRANGE("osd-bar-h", osd_bar_h, UPDATE_OSD, 0.1, 50), OPT_SUBSTRUCT("osd", osd_style, osd_style_conf, 0), - OPT_SUBSTRUCT("sub-text", sub_text_style, sub_style_conf, 0), + OPT_SUBSTRUCT("sub", sub_style, sub_style_conf, 0), OPT_FLAG("sub-clear-on-seek", sub_clear_on_seek, 0), OPT_INTRANGE("teletext-page", teletext_page, 0, 1, 999), @@ -760,6 +760,33 @@ const m_option_t mp_opts[] = { OPT_REPLACED("softvol-max", "volume-max"), OPT_REMOVED("bluray-angle", "this didn't do anything for a few releases"), OPT_REPLACED("playlist-pos", "playlist-start"), + OPT_REPLACED("sub-text-font", "sub-font"), + OPT_REPLACED("sub-text-font-size", "sub-font-size"), + OPT_REPLACED("sub-text-color", "sub-color"), + OPT_REPLACED("sub-text-border-color", "sub-border-color"), + OPT_REPLACED("sub-text-shadow-color", "sub-shadow-color"), + OPT_REPLACED("sub-text-back-color", "sub-back-color"), + OPT_REPLACED("sub-text-border-size", "sub-border-size"), + OPT_REPLACED("sub-text-shadow-offset", "sub-shadow-offset"), + OPT_REPLACED("sub-text-spacing", "sub-spacing"), + OPT_REPLACED("sub-text-margin-x", "sub-margin-x"), + OPT_REPLACED("sub-text-margin-y", "sub-margin-y"), + OPT_REPLACED("sub-text-align-x", "sub-align-x"), + OPT_REPLACED("sub-text-align-y", "sub-align-y"), + OPT_REPLACED("sub-text-blur", "sub-blur"), + OPT_REPLACED("sub-text-bold", "sub-bold"), + OPT_REPLACED("sub-text-italic", "sub-italic"), + OPT_REPLACED("ass-line-spacing", "sub-ass-line-spacing"), + OPT_REPLACED("ass-force-margins", "sub-ass-force-margins"), + OPT_REPLACED("ass-vsfilter-aspect-compat", "sub-ass-vsfilter-aspect-compat"), + OPT_REPLACED("ass-vsfilter-color-compat", "sub-ass-vsfilter-color-compat"), + OPT_REPLACED("ass-vsfilter-blur-compat", "sub-ass-vsfilter-blur-compat"), + OPT_REPLACED("ass-force-style", "sub-ass-force-style"), + OPT_REPLACED("ass-styles", "sub-ass-styles"), + OPT_REPLACED("ass-hinting", "sub-ass-hinting"), + OPT_REPLACED("ass-shaper", "sub-ass-shaper"), + OPT_REPLACED("ass-style-override", "sub-ass-style-override"), + OPT_REPLACED("ass-scale-with-window", "sub-ass-scale-with-window"), {0} }; diff --git a/options/options.h b/options/options.h index 7885b9090e..db12742f2b 100644 --- a/options/options.h +++ b/options/options.h @@ -259,7 +259,7 @@ typedef struct MPOpts { int sub_scale_with_window; int ass_scale_with_window; struct osd_style_opts *osd_style; - struct osd_style_opts *sub_text_style; + struct osd_style_opts *sub_style; float sub_scale; float sub_gauss; int sub_gray; -- cgit v1.2.3