[Mplayer-cvslog] CVS: main find_sub.c,1.5,1.6 mplayer.c,1.402,1.403

Atmosfear atmos4 at mplayer.dev.hu
Fri Feb 22 16:25:13 CET 2002


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv5364

Modified Files:
	find_sub.c mplayer.c 
Log Message:
osd outside movie support for vo_sdl, patch by Fredrik Kuivinen

Index: find_sub.c
===================================================================
RCS file: /cvsroot/mplayer/main/find_sub.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- find_sub.c	17 Dec 2001 00:07:20 -0000	1.5
+++ find_sub.c	22 Feb 2002 15:25:11 -0000	1.6
@@ -35,6 +35,9 @@
     }
     // sub changed!
 
+    /* Tell the OSD subsystem that the OSD contents will change soon */
+    vo_osd_changed(1);
+
     if(key<=0){
       vo_sub=NULL; // no sub here
       return;

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.402
retrieving revision 1.403
diff -u -r1.402 -r1.403
--- mplayer.c	21 Feb 2002 22:48:35 -0000	1.402
+++ mplayer.c	22 Feb 2002 15:25:11 -0000	1.403
@@ -2700,19 +2700,28 @@
 #ifdef USE_OSD
   if(osd_level>=2){
       int pts=d_video->pts;
+      char osd_text_tmp[50];
       if(pts==osd_last_pts-1) ++pts; else osd_last_pts=pts;
       vo_osd_text=osd_text_buffer;
       if (osd_show_sub_delay) {
-	  sprintf(vo_osd_text, "Sub delay: %d ms",(int)(sub_delay*1000));
+	  sprintf(osd_text_tmp, "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));
+	  sprintf(osd_text_tmp, "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);
+          sprintf(osd_text_tmp,"%c %02d:%02d:%02d",osd_function,pts/3600,(pts/60)%60,pts%60);
+      
+      if(strcmp(vo_osd_text, osd_text_tmp)) {
+	      strcpy(vo_osd_text, osd_text_tmp);
+	      vo_osd_changed(1);
+      }
   } else {
+      if(vo_osd_text) {
       vo_osd_text=NULL;
+	  vo_osd_changed(1);
+      }
   }
 //  for(i=1;i<=11;i++) osd_text_buffer[10+i]=i;osd_text_buffer[10+i]=0;
 //  vo_osd_text=osd_text_buffer;
@@ -2737,6 +2746,9 @@
   if(vo_vobsub){
     current_module="vobsub";
     vobsub_process(vo_vobsub,d_video->pts);
+    
+    /* Don't know how to detect wether the sub has changed or not */
+    vo_osd_changed(1);
     current_module=NULL;
   }
 
@@ -2760,6 +2772,9 @@
       spudec_assemble(vo_spudec,packet,len,100*d_dvdsub->pts);
     }
     spudec_heartbeat(vo_spudec,100*d_video->pts);
+
+    /* Don't know how to detect wether the sub has changed or not */
+    vo_osd_changed(1);
     current_module=NULL;
   }
 #endif




More information about the MPlayer-cvslog mailing list