[mythtv] [patch] Fix for sluggish pause

David Engel gigem at comcast.net
Tue Nov 30 15:38:22 UTC 2004


On Tue, Nov 30, 2004 at 07:42:50AM -0500, Doug Larrick wrote:
> Where exactly *do* you want the TV thread to be able to get in and 
> change speeds?  Right now, it's one if statement and a sched_yield() 
> that are executed without the lock held.  

That's the only place.

> You need to sleep, not just 
> yield, there.  I simply picked the part of that loop where we already 
> sleep for a large amount of time.

No, you don't need to sleep if the mutexes are preemptive, which Qt's
aren't.

> As an aside, I think what's happening on my system is that it's fast 
> enough (specced for HD content, playing NTSC) and a dual-processor 
> (well, HyperThreaded), so that the sched_yield() often sees no other 
> runnable threads *for that processor* and immediately returns.

That's the problem!  Try changing the decoder_lock from a QMutext to a
pthread_mutex_t and see if that helps.  I suspect it will, and will
also get rid of the sched_yield which I didn't like anyway.  If you
can't make the change, I will do it tonight.

David
-- 
David Engel
gigem at comcast.net


More information about the mythtv-dev mailing list