mirror of https://github.com/mpv-player/mpv
options: remove -subalign
It can't be re-implemented, because this isn't supported by libass. The -subalign option and the associated sub-align slave property did nothing. Remove them.
This commit is contained in:
parent
130beda407
commit
f97a85595b
|
@ -1874,14 +1874,6 @@
|
|||
- ``/tmp/subs/``
|
||||
- ``~/.mplayer/sub/``
|
||||
|
||||
--subalign=<0-2>
|
||||
Specify which edge of the subtitles should be aligned at the height given
|
||||
by ``--subpos``.
|
||||
|
||||
:0: Align subtitle top edge (original behavior).
|
||||
:1: Align subtitle center.
|
||||
:2: Align subtitle bottom edge (default).
|
||||
|
||||
--subcp=<codepage>
|
||||
If your system supports ``iconv(3)``, you can use this option to specify
|
||||
the subtitle codepage.
|
||||
|
|
|
@ -528,7 +528,6 @@ const m_option_t common_opts[] = {
|
|||
{"subfont", &sub_font_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
||||
{"ffactor", &font_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 10.0, NULL},
|
||||
{"subpos", &sub_pos, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
|
||||
{"subalign", &sub_alignment, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
|
||||
{"subwidth", &sub_width_p, CONF_TYPE_INT, CONF_RANGE, 10, 100, NULL},
|
||||
{"spualign", &spu_alignment, CONF_TYPE_INT, CONF_RANGE, -1, 2, NULL},
|
||||
{"spuaa", &spu_aamode, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},
|
||||
|
|
33
command.c
33
command.c
|
@ -1454,35 +1454,6 @@ static int mp_property_sub_delay(m_option_t *prop, int action, void *arg,
|
|||
return m_property_delay(prop, action, arg, &sub_delay);
|
||||
}
|
||||
|
||||
/// Alignment of text subtitles (RW)
|
||||
static int mp_property_sub_alignment(m_option_t *prop, int action,
|
||||
void *arg, MPContext *mpctx)
|
||||
{
|
||||
char *name[] = {
|
||||
_("top"), _("center"), _("bottom")
|
||||
};
|
||||
|
||||
if (!mpctx->current_track[STREAM_SUB])
|
||||
return M_PROPERTY_UNAVAILABLE;
|
||||
|
||||
switch (action) {
|
||||
case M_PROPERTY_PRINT:
|
||||
if (!arg)
|
||||
return M_PROPERTY_ERROR;
|
||||
M_PROPERTY_CLAMP(prop, sub_alignment);
|
||||
*(char **) arg = talloc_strdup(NULL, mp_gtext(name[sub_alignment]));
|
||||
return M_PROPERTY_OK;
|
||||
case M_PROPERTY_SET:
|
||||
if (!arg)
|
||||
return M_PROPERTY_ERROR;
|
||||
case M_PROPERTY_STEP_UP:
|
||||
case M_PROPERTY_STEP_DOWN:
|
||||
vo_osd_changed(OSDTYPE_SUBTITLE);
|
||||
default:
|
||||
return m_property_choice(prop, action, arg, &sub_alignment);
|
||||
}
|
||||
}
|
||||
|
||||
/// Subtitle visibility (RW)
|
||||
static int mp_property_sub_visibility(m_option_t *prop, int action,
|
||||
void *arg, MPContext *mpctx)
|
||||
|
@ -1784,8 +1755,6 @@ static const m_option_t mp_properties[] = {
|
|||
0, 0, 0, NULL },
|
||||
{ "sub_pos", mp_property_sub_pos, CONF_TYPE_INT,
|
||||
M_OPT_RANGE, 0, 100, NULL },
|
||||
{ "sub_alignment", mp_property_sub_alignment, CONF_TYPE_INT,
|
||||
M_OPT_RANGE, 0, 2, NULL },
|
||||
{ "sub_visibility", mp_property_sub_visibility, CONF_TYPE_FLAG,
|
||||
M_OPT_RANGE, 0, 1, NULL },
|
||||
{ "sub_forced_only", mp_property_sub_forced_only, CONF_TYPE_FLAG,
|
||||
|
@ -1889,7 +1858,6 @@ static struct property_osd_display {
|
|||
// subs
|
||||
{ "sub", 0, -1, _("Subtitles: %s") },
|
||||
{ "sub_pos", 0, -1, _("Sub position: %s/100") },
|
||||
{ "sub_alignment", 0, -1, _("Sub alignment: %s") },
|
||||
{ "sub_delay", 0, OSD_MSG_SUB_DELAY, _("Sub delay: %s") },
|
||||
{ "sub_visibility", 0, -1, _("Subtitles: %s") },
|
||||
{ "sub_forced_only", 0, -1, _("Forced sub only: %s") },
|
||||
|
@ -2009,7 +1977,6 @@ static struct {
|
|||
// subs
|
||||
{ "sub", MP_CMD_SUB_SELECT, 1},
|
||||
{ "sub_pos", MP_CMD_SUB_POS, 0},
|
||||
{ "sub_alignment", MP_CMD_SUB_ALIGNMENT, 1},
|
||||
{ "sub_delay", MP_CMD_SUB_DELAY, 0},
|
||||
{ "sub_visibility", MP_CMD_SUB_VISIBILITY, 1},
|
||||
{ "sub_forced_only", MP_CMD_SUB_FORCED_ONLY, 1},
|
||||
|
|
|
@ -89,7 +89,6 @@ c step_property_osd colormatrix
|
|||
# Next 3 currently only work with --no-ass
|
||||
r sub_pos -1 # move subtitles up
|
||||
t sub_pos +1 # down
|
||||
a sub_alignment
|
||||
v sub_visibility
|
||||
# stretch SSA/ASS subtitles with anamorphic videos to match historical
|
||||
V step_property_osd ass_vsfilter_aspect_compat
|
||||
|
|
|
@ -60,7 +60,6 @@ int sub_unicode=0;
|
|||
int sub_utf8=0;
|
||||
int sub_pos=100;
|
||||
int sub_width_p=100;
|
||||
int sub_alignment=2; /* 0=top, 1=center, 2=bottom */
|
||||
int sub_visibility=1;
|
||||
int sub_bg_color=0; /* subtitles background color */
|
||||
int sub_bg_alpha=0;
|
||||
|
|
Loading…
Reference in New Issue