commands: Allow cycling subtitles backwards with 'J'

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32680 b3059339-0415-0410-9bf9-f77b7e298cf2

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32714 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-12-11 12:44:39 +00:00 committed by Uoti Urpala
parent 41270c50cf
commit a7f4b6b102
4 changed files with 19 additions and 11 deletions

View File

@ -263,7 +263,7 @@ Toggle frame dropping states: none / skip display / skip decoding
(see \-framedrop and \-hardframedrop).
.IPs "v\ \ \ \ "
Toggle subtitle visibility.
.IPs "j\ \ \ \ "
.IPs "j and J"
Cycle through the available subtitles.
.IPs "y and g"
Step forward/backward in the subtitle list.

View File

@ -350,7 +350,8 @@ 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
than -1 (forward or backward respectively).
Supported subtitle sources are -sub options on the command
line, VOBsubs, DVD subtitles, and Ogg and Matroska text streams.
This command is mainly for cycling all subtitles, if you want to set
a specific subtitle, use sub_file, sub_vob, or sub_demux.
@ -360,26 +361,30 @@ sub_source [source]
SUB_SOURCE_SUBS (0) for file subs
SUB_SOURCE_VOBSUB (1) for VOBsub files
SUB_SOURCE_DEMUX (2) for subtitle embedded in the media file or DVD subs.
If [source] is -1, will turn off subtitle display. If [source] less than -1,
will cycle between the first subtitle of each currently available sources.
If [source] is -1, will turn off subtitle display.
If [value] is omitted or less than -1, will cycle between the first subtitle
of each currently available source (forward or backward respectively).
sub_file [value]
Display subtitle specifid by [value] for file subs. The [value] is
corresponding to ID_FILE_SUB_ID values reported by '-identify'.
If [value] is -1, will turn off subtitle display. If [value] less than -1,
will cycle all file subs.
If [value] is -1, will turn off subtitle display.
If [value] is omitted or less than -1, will cycle all file subs
(forward or backward respectively).
sub_vob [value]
Display subtitle specifid by [value] for vobsubs. The [value] is
corresponding to ID_VOBSUB_ID values reported by '-identify'.
If [value] is -1, will turn off subtitle display. If [value] less than -1,
will cycle all vobsubs.
If [value] is -1, will turn off subtitle display.
If [value] is omitted or less than -1, will cycle all vobsubs
(forward or backward respectively).
sub_demux [value]
Display subtitle specifid by [value] for subtitles from DVD or embedded
in media file. The [value] is corresponding to ID_SUBTITLE_ID values
reported by '-identify'. If [value] is -1, will turn off subtitle display.
If [value] less than -1, will cycle all DVD subs or embedded subs.
If [value] is omitted or less than -1, will cycle all DVD subs or embedded subs
(forward or backward respectively).
sub_scale <value> [abs]
Adjust the subtitle size by +/- <value> or set it to <value> when [abs]

View File

@ -2463,8 +2463,8 @@ static int show_property_osd(MPContext *mpctx, const char *pname)
*
* Toggle commands take 0 or 1 parameters. With no parameter
* or a value less than the property minimum it just steps the
* property to its next value. Otherwise it sets it to the given
* value.
* property to its next or previous value respectively.
* Otherwise it sets it to the given value.
*
*@{
*/
@ -2551,6 +2551,8 @@ static int set_property_command(MPContext *mpctx, mp_cmd_t *cmd)
// set to value
if (cmd->nargs > 0 && cmd->args[0].v.i >= prop->min)
r = mp_property_do(pname, M_PROPERTY_SET, &cmd->args[0].v.i, mpctx);
else if (cmd->nargs > 0)
r = mp_property_do(pname, M_PROPERTY_STEP_DOWN, NULL, mpctx);
else
r = mp_property_do(pname, M_PROPERTY_STEP_UP, NULL, mpctx);
} else if (cmd->args[1].v.i) //set

View File

@ -438,6 +438,7 @@ static const mp_cmd_bind_t def_cmd_binds[] = {
{ { 'a', 0 }, "sub_alignment" },
{ { 'v', 0 }, "sub_visibility" },
{ { 'j', 0 }, "sub_select" },
{ { 'J', 0 }, "sub_select -3" },
{ { 'F', 0 }, "forced_subs_only" },
{ { '#', 0 }, "switch_audio" },
{ { '_', 0 }, "step_property switch_video" },