From 5eaa11ba78e71865fccd7c2b81239c30b14fddd0 Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 17 Jul 2004 12:47:12 +0000 Subject: individual sub_select option not interferring with vobsub_lang git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12842 b3059339-0415-0410-9bf9-f77b7e298cf2 --- input/input.c | 2 ++ input/input.h | 1 + mplayer.c | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/input/input.c b/input/input.c index 83571c99fb..5287dee7b1 100644 --- a/input/input.c +++ b/input/input.c @@ -78,6 +78,7 @@ static mp_cmd_t mp_cmds[] = { { 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_VOBSUB_LANG, "vobsub_lang", 0, { {-1,{0}} } }, + { MP_CMD_SUB_SELECT, "sub_select", 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}} } }, #ifdef USE_TV @@ -303,6 +304,7 @@ static mp_cmd_bind_t def_cmd_binds[] = { { { 't', 0 }, "sub_pos +1" }, { { 'a', 0 }, "sub_alignment" }, { { 'v', 0 }, "sub_visibility" }, + { { 'b', 0 }, "sub_select" }, { { 'j', 0 }, "vobsub_lang" }, { { 'F', 0 }, "forced_subs_only" }, #ifdef USE_EDL diff --git a/input/input.h b/input/input.h index 4fcdff1925..41fcac0204 100644 --- a/input/input.h +++ b/input/input.h @@ -53,6 +53,7 @@ #define MP_CMD_GET_SUB_VISIBILITY 49 #define MP_CMD_SUB_FORCED_ONLY 50 #define MP_CMD_VO_ONTOP 51 +#define MP_CMD_SUB_SELECT 52 #define MP_CMD_GUI_EVENTS 5000 #define MP_CMD_GUI_LOADFILE 5001 diff --git a/mplayer.c b/mplayer.c index 288ffba522..50986a0352 100644 --- a/mplayer.c +++ b/mplayer.c @@ -3118,8 +3118,10 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still) osd_show_vobsub_changed = 9; vobsub_id = new_id; } + break; + case MP_CMD_SUB_SELECT: #ifdef USE_SUB - else if (set_of_sub_size > 0){ //change subtitle file + if (set_of_sub_size > 0){ //change subtitle file set_of_sub_pos = (set_of_sub_pos + 1) % set_of_sub_size; subdata = set_of_subtitles[set_of_sub_pos]; osd_show_sub_changed = sh_video->fps; -- cgit v1.2.3