1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-14 19:05:33 +00:00

show a-v delay in osd (based on subdelay osd patch)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3784 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2001-12-27 00:59:40 +00:00
parent b0a28151cb
commit f197efd5c2

View File

@ -423,6 +423,7 @@ int out_fmt=0;
int osd_visible=100;
int osd_function=OSD_PLAY;
int osd_last_pts=-303;
int osd_show_av_delay = 0;
int osd_show_sub_delay = 0;
int v_bright=50;
@ -1874,10 +1875,12 @@ if(step_sec>0) {
// delay correction:
case '+':
audio_delay+=0.1; // increase audio buffer delay
osd_show_av_delay = 9; // show the A-V delay in OSD
if(sh_audio) sh_audio->timer-=0.1;
break;
case '-':
audio_delay-=0.1; // decrease audio buffer delay
osd_show_av_delay = 9; // show the A-V delay in OSD
if(sh_audio) sh_audio->timer+=0.1;
break;
// quit
@ -2179,6 +2182,10 @@ if(rel_seek_secs || abs_seek_pos){
if (osd_show_sub_delay) {
sprintf(vo_osd_text, "Sub delay: %d ms",(int)(sub_delay*1000));
osd_show_sub_delay--;
} else
if (osd_show_av_delay) {
sprintf(vo_osd_text, "A-V delay: %d ms",(int)(audio_delay*1000));
osd_show_av_delay--;
} else
sprintf(vo_osd_text,"%c %02d:%02d:%02d",osd_function,pts/3600,(pts/60)%60,pts%60);
} else {