[MPlayer-dev-eng] [PATCH] use timer-lx.c on darwin & osx

Nicolas Plourde nicolas.plourde at sympatico.ca
Fri Apr 29 14:01:45 CEST 2005


>
> 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) {
> +            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?
>

applied with change suggested by arpi. I believe we now have an  
efficient timer on osx.

====
Nicolas Plourde <nicolas.plourde at sympatico.ca>




More information about the MPlayer-dev-eng mailing list