[MPlayer-G2-dev] Darwin port

Arpi arpi at thot.banki.hu
Sun May 11 14:45:20 CEST 2003


Hi,

> I rewrote the mac timer routines. There's a bit of info in the patch.
> 
> I get some pretty odd behaviour; _lots_ of frames are skipped on even 
> fairly simple material, and A-V is steadily increasing. This is on an 
> MPEG-1 file. Do you have some  verified material I could test it with?

405divx_sm_v2[1].avi
Alice Deejay - Back In My Life.asf
Ray_of_light.vob
TheJackal-VP3-Sample-VBR-MP3-atmos.avi
apollo_440_-_lost_in_space(jason_nevis_lunar_landing).vob
bomb.mpg
matrix.vob

these work for sure, some are from mphq samples

> +/* timing without rounding errors */
>  float sleep_accurate(float time_frame){
> -  // -------- USLEEP + SOFTSLEEP -----------
> -  usec_sleep(1000000*time_frame);
> -  time_frame-=GetRelativeTime();
> -  return time_frame;
> +  float start, end;
> +
> +  start = CFAbsoluteTimeGetCurrent();
> +  CFRunLoopRunInMode(kCFRunLoopDefaultMode, time_frame, false);
> +  end = CFAbsoluteTimeGetCurrent();
> +
> +  return end-start;
>  }

it should return the timing error, not the actual time spent in sleep.
so, in ideal case (very accurate timer) it should return 0.
you should try sth like return time_frame-(end-start);

Btw how accurate is that CFRunLoopRunInMode() ? <+-1ms?


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-G2-dev mailing list