[MPlayer-cvslog] CVS: main mplayer.c,1.843,1.844
Nicolas Plourde CVS
syncmail at mplayerhq.hu
Fri Apr 29 12:48:34 CEST 2005
CVS change done by Nicolas Plourde CVS
Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv15239
Modified Files:
mplayer.c
Log Message:
use darwin accurate timer
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.843
retrieving revision 1.844
diff -u -r1.843 -r1.844
--- mplayer.c 28 Apr 2005 14:43:16 -0000 1.843
+++ mplayer.c 29 Apr 2005 10:48:32 -0000 1.844
@@ -1045,6 +1045,8 @@
srand((int) time(NULL));
+ InitTimer();
+
mp_msg_init();
mp_msg_set_level(MSGL_STATUS);
@@ -2214,8 +2216,6 @@
mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_StartPlaying);fflush(stdout);
-InitTimer();
-
#ifdef USE_DVDNAV
if (stream->type==STREAMTYPE_DVDNAV) {
dvdnav_stream_fullstart((dvdnav_priv_t *)stream->priv);
@@ -2457,6 +2457,15 @@
}
} else
#endif
+#ifdef SYS_DARWIN
+ {
+ current_module="sleep_darwin";
+ while(time_frame>0.005) {
+ usec_sleep(1000000*time_frame);
+ time_frame-=GetRelativeTime();
+ }
+ }
+#else
{
// -------- TIMER + SOFTSLEEP -----------
float min=softsleep?0.021:0.005;
@@ -2474,7 +2483,7 @@
while(time_frame>0) time_frame-=GetRelativeTime(); // burn the CPU
}
}
-
+#endif
}
//if(!frame_time_remaining){ // should we display the frame now?
More information about the MPlayer-cvslog
mailing list