Update of /cvsroot/mplayer/main In directory mail:/var/tmp.root/cvs-serv15998 Modified Files: mplayer.c Log Message: This patch adds support for vertical subtitle alignment control. Possible values are top, center, and bottom, with bottom being the default. Alignment is relevant when it comes to positioning subtitles with one line (or fewer lines) of text relative to multi-line subtitles. It is implemented as a new command (sub_alignment) that without an argument cycles the alignment (between top, center, and bottom), or with an argument sets the alignment (0 for top, 1 for center, 2 for bottom). The key 'i' is bound to this command. patch by Oskar Liljeblad (oskar@osk.mine.nu) Index: mplayer.c =================================================================== RCS file: /cvsroot/mplayer/main/mplayer.c,v retrieving revision 1.629 retrieving revision 1.630 diff -u -r1.629 -r1.630 --- mplayer.c 23 Dec 2002 00:33:05 -0000 1.629 +++ mplayer.c 23 Dec 2002 01:37:41 -0000 1.630 @@ -575,6 +575,7 @@ int osd_show_sub_delay = 0; int osd_show_sub_pos = 0; int osd_show_sub_visibility = 0; +int osd_show_sub_alignment = 0; int osd_show_vobsub_changed = 0; int rtc_fd=-1; @@ -2485,6 +2486,16 @@ vo_osd_changed(OSDTYPE_SUBTITLE); osd_show_sub_pos = 9; } break; + case MP_CMD_SUB_ALIGNMENT: + { + if (cmd->nargs >= 1) + sub_alignment = cmd->args[0].v.i; + else + sub_alignment = (sub_alignment+1) % 3; + osd_show_sub_alignment = 9; + vo_osd_changed(OSDTYPE_SUBTITLE); + break; + } case MP_CMD_SUB_VISIBILITY: { sub_visibility=1-sub_visibility; @@ -2919,6 +2930,12 @@ if (osd_show_sub_pos) { sprintf(osd_text_tmp, "Sub position: %d/100", sub_pos); osd_show_sub_pos--; + } else + if (osd_show_sub_alignment) { + sprintf(osd_text_tmp, "Sub alignment: %s", + (sub_alignment == 2 ? "bottom" : + (sub_alignment == 1 ? "center" : "top"))); + osd_show_sub_alignment--; } else if (osd_show_av_delay) { sprintf(osd_text_tmp, "A-V delay: %d ms",(int)(audio_delay*1000));