[MPlayer-dev-eng] [PATCH] use timer-lx.c on darwin & osx
Arpi
arpi at mplayerhq.hu
Wed Apr 27 17:59:00 CEST 2005
Hi,
> I made change to timer-darwin to use sleep_accurate(), I also just
> submitted a patch to resolve the
ok
> bug with -cache flag, turned out that InitTimer() was not called
> before usec_sleep().
i had the same idea yesterday :)
(but i was lazy to check if it's really the cause...)
anyway cache doesnt need accurate sleep, it's just to avoid eating up
all cpu while waiting for i/o. so simple usleep() would be better maybe?
(afair it was usleep() originally when i wrote it, maybe it was changed
later to ease portability?)
> Now to take full advantage of sleep_accurate we need to change
> mplayer.c like this
>
> @@ -2457,6 +2457,15 @@
> }
> } else
> #endif
> +#ifdef SYS_DARWIN
> + {
> + current_module="sleep_darwin";
> + while(time_frame>0.000) {
should be 0.001 or maybe 0.005, 5ms isn't noticable anyway and
the call overhead and inaccurate usleep may delay more than a few ms.
maybe backporting the new timing system from g2 would be a better idea...
A'rpi / MPlayer, Astral & ESP-team
--
Girls are like internet domain names, the ones I like are already taken.
More information about the MPlayer-dev-eng
mailing list