[mythtv] Playback too fast

Isaac Richards ijr at case.edu
Fri Mar 31 20:36:07 UTC 2006


On Friday 31 March 2006 15:29, Greg Stark wrote:
> Isaac Richards <ijr at case.edu> writes:
> > > Or perhaps the usleep should be happening before the videosync method
> > > is even called from NuppelVideo itself.
> >
> > A usleep isn't accurate enough for that.
>
> It seems to work fine with the usleep+busywait sync method.
>
> usleep (actually the syscall on linux is nanosleep) on most platforms has a
> resolution of 10ms. Even if it goes over by 1 or two iterations that's only
> 10-20ms which is still less than the frame interval for a 30fps NTSC video.

Who's limited to 30fps NTSC?  Use the bob, and you're at 60 fps.  720p at 60 HD 
video..  10-20ms resolution simply doesn't cut it.

> In any case I would be perfectly happy if it checked with gettimeofday (or
> the RTC) and skipped the usleep on every single frame. The failure mode I'm
> concerned with is when the video gets ahead by more than 20-30ms. Currently
> mythtv never even checks and just calls the ioctl or opengl call no matter
> how long it wants to wait. If the ioctl takes more or less time than it
> ought to then it loses sync and never recovers.

Yes, it trusts that the ioctls are doing what they're supposed to be doing.  
If they're not, they shouldn't be advertised as working in the first place.

Isaac


More information about the mythtv-dev mailing list