comparison mplayer.c @ 15865:0b8c08580412

Missing part of the last commit (got merged in on cvs update :-( )
author reimar
date Thu, 30 Jun 2005 10:22:09 +0000
parents 7689a7c41225
children 7742302e793d
comparison
equal deleted inserted replaced
15864:9c674e162678 15865:0b8c08580412
3983 #endif 3983 #endif
3984 3984
3985 3985
3986 //================= Update OSD ==================== 3986 //================= Update OSD ====================
3987 #ifdef USE_OSD 3987 #ifdef USE_OSD
3988 if (osd_level == 0 && osd_show_status > 0 && sh_video){
3989 snprintf(vo_osd_text, 63, "OSD: disabled");
3990 vo_osd_changed(OSDTYPE_OSD);
3991 osd_show_status--;
3992 }
3993 if(osd_level>=1 && sh_video){ 3988 if(osd_level>=1 && sh_video){
3994 int pts=sh_video->pts; 3989 int pts=sh_video->pts;
3995 char osd_text_tmp[64]; 3990 char osd_text_tmp[64];
3996 if(pts==osd_last_pts-1) ++pts; else osd_last_pts=pts; 3991 if(pts==osd_last_pts-1) ++pts; else osd_last_pts=pts;
3997 vo_osd_text=osd_text_buffer; 3992 vo_osd_text=osd_text_buffer;
4119 snprintf(osd_text_tmp, 63, "%c %02d:%02d:%02d / %02d:%02d:%02d%s",osd_function,pts/3600,(pts/60)%60,pts%60,len/3600,(len/60)%60,len%60,percentage_text); 4114 snprintf(osd_text_tmp, 63, "%c %02d:%02d:%02d / %02d:%02d:%02d%s",osd_function,pts/3600,(pts/60)%60,pts%60,len/3600,(len/60)%60,len%60,percentage_text);
4120 else 4115 else
4121 snprintf(osd_text_tmp, 63, "%c %02d:%02d:%02d%s",osd_function,pts/3600,(pts/60)%60,pts%60,percentage_text); 4116 snprintf(osd_text_tmp, 63, "%c %02d:%02d:%02d%s",osd_function,pts/3600,(pts/60)%60,pts%60,percentage_text);
4122 } else osd_text_tmp[0]=0; 4117 } else osd_text_tmp[0]=0;
4123 4118
4124 if (osd_level == 1 && osd_show_status > 0){
4125 strncpy(osd_text_tmp, "OSD: enabled", 63);
4126 strncpy(vo_osd_text, osd_text_tmp, 63);
4127 vo_osd_changed(OSDTYPE_OSD);
4128 osd_show_status--;
4129 }
4130 if(strcmp(vo_osd_text, osd_text_tmp)) { 4119 if(strcmp(vo_osd_text, osd_text_tmp)) {
4131 strncpy(vo_osd_text, osd_text_tmp, 63); 4120 strncpy(vo_osd_text, osd_text_tmp, 63);
4132 vo_osd_changed(OSDTYPE_OSD); 4121 vo_osd_changed(OSDTYPE_OSD);
4133 } 4122 }
4134 } else { 4123 } else {