[MPlayer-dev-eng] [PATCH] sub position indication
Oskar Liljeblad
oskar at osk.mine.nu
Sun Dec 1 14:40:56 CET 2002
Hello
With this patch the text 'Sub position: x/100' is displayed
every time you move the subtitles with R and T keys (sub_pos).
I find it useful since sometimes when you hold down R and T
you have no idea if anything is happening or where the subs
are going to show next.
Oskar Liljeblad (oskar at osk.mine.nu)
diff -u -p ./mplayer.c.v0 mplayer.c
--- ./mplayer.c.v0 2002-12-01 14:33:11.000000000 +0100
+++ mplayer.c 2002-12-01 14:35:06.000000000 +0100
@@ -558,6 +558,7 @@ int osd_function=OSD_PLAY;
int osd_last_pts=-303;
int osd_show_av_delay = 0;
int osd_show_sub_delay = 0;
+int osd_show_sub_pos = 0;
int osd_show_sub_visibility = 0;
int osd_show_vobsub_changed = 0;
@@ -2320,6 +2321,7 @@ if (stream->type==STREAMTYPE_DVDNAV && d
if(sub_pos >100) sub_pos=100;
if(sub_pos <0) sub_pos=0;
vo_osd_changed(OSDTYPE_SUBTITLE);
+ osd_show_sub_pos = 9;
} break;
case MP_CMD_SUB_VISIBILITY:
{
@@ -2722,6 +2724,10 @@ if(rel_seek_secs || abs_seek_pos){
sprintf(osd_text_tmp, "Sub delay: %d ms",(int)(sub_delay*1000));
osd_show_sub_delay--;
} else
+ if (osd_show_sub_pos) {
+ sprintf(osd_text_tmp, "Sub position: %d/100", sub_pos);
+ osd_show_sub_pos--;
+ } else
if (osd_show_av_delay) {
sprintf(osd_text_tmp, "A-V delay: %d ms",(int)(audio_delay*1000));
osd_show_av_delay--;
More information about the MPlayer-dev-eng
mailing list