[mythtv] Playback too fast
Greg Stark
gsstark at mit.edu
Thu Mar 30 20:28:02 UTC 2006
I've tracked down the cause of the problem I've been having with playback
that's too fast. It seems the DRM VBlank interface doesn't work properly on
the ATI drivers when you're in merged framebuffer mode.
But it seems like mythtv is being too trusting here. Instead of depending
entirely on the vblank interface it really ought to use usleep for the bulk of
the sleeping then use vblank just for the actual synchronization.
Ie, it should calculate the remaining time using things like gettimeofday or
the rtc, subtract one refresh cycle, sleep for that long, and only then use
the vblank interface to synchronize.
The current situation where it never actually checks how long it should be
sleeping for and how long it actually slept is going to be very bad in lots
more cases than just the ATI drviers. Any time the calculated refresh rate
doesn't exactly match the timing of the VBlank ioctl it's going to cause weird
effects.
It may actually be one of the causes of the problems other people are
complaining of with the video getting ahead and then never being able to
resync.
--
greg
More information about the mythtv-dev
mailing list