mirror of
https://github.com/mpv-player/mpv
synced 2025-02-02 13:12:05 +00:00
allow sub_select and vobsub_lang to select particular subtitle
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15129 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
16d2d5ca82
commit
e956780cc0
@ -101,10 +101,12 @@ sub_visibility
|
||||
get_sub_visibility
|
||||
Print out subtitle visibility (1 == on, 0 == off).
|
||||
|
||||
sub_select
|
||||
Cycle through the available subtitles. Supported subtitle sources are
|
||||
-sub options on the command line, VOBsubs, DVD subtitles, and Ogg text
|
||||
streams.
|
||||
sub_select [<value>]
|
||||
Display subtitle with index <value>. Turn subtitle display off if
|
||||
<value> is -1 or greater than the highest available subtitle index.
|
||||
Cycle through the available subtitles if <value> is omitted or less
|
||||
than -1. Supported subtitle sources are -sub options on the command
|
||||
line, VOBsubs, DVD subtitles, and Ogg and Matroska text streams.
|
||||
|
||||
sub_log
|
||||
Logs the current or last displayed subtitle together with filename
|
||||
|
@ -77,8 +77,8 @@ static mp_cmd_t mp_cmds[] = {
|
||||
{ MP_CMD_SUB_POS, "sub_pos", 1, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
|
||||
{ MP_CMD_SUB_ALIGNMENT, "sub_alignment",0, { {MP_CMD_ARG_INT,{-1}}, {-1,{0}} } },
|
||||
{ MP_CMD_SUB_VISIBILITY, "sub_visibility", 0, { {-1,{0}} } },
|
||||
{ MP_CMD_SUB_SELECT, "vobsub_lang", 0, { {-1,{0}} } }, // for compatibility
|
||||
{ MP_CMD_SUB_SELECT, "sub_select", 0, { {-1,{0}} } },
|
||||
{ MP_CMD_SUB_SELECT, "vobsub_lang", 0, { { MP_CMD_ARG_INT,{-2} }, {-1,{0}} } }, // for compatibility
|
||||
{ MP_CMD_SUB_SELECT, "sub_select", 0, { { MP_CMD_ARG_INT,{-2} }, {-1,{0}} } },
|
||||
{ MP_CMD_SUB_LOG, "sub_log", 0, { {-1,{0}} } },
|
||||
{ MP_CMD_GET_PERCENT_POS, "get_percent_pos", 0, { {-1,{0}} } },
|
||||
{ MP_CMD_GET_TIME_LENGTH, "get_time_length", 0, { {-1,{0}} } },
|
||||
|
@ -3375,8 +3375,12 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still)
|
||||
case MP_CMD_SUB_SELECT:
|
||||
if (global_sub_size) {
|
||||
int source = -1;
|
||||
int v = cmd->args[0].v.i;
|
||||
|
||||
global_sub_pos++;
|
||||
if (v < -1)
|
||||
global_sub_pos++;
|
||||
else
|
||||
global_sub_pos = v;
|
||||
if (global_sub_pos >= global_sub_size)
|
||||
global_sub_pos = -1;
|
||||
if (global_sub_pos >= 0)
|
||||
|
Loading…
Reference in New Issue
Block a user