[mythtv] [patch] Fix for sluggish pause

Doug Larrick doug at ties.org
Tue Nov 30 12:42:50 UTC 2004


David Engel wrote:
> On Mon, Nov 29, 2004 at 11:02:57PM -0500, Isaac Richards wrote:
> 
>>I think that it looks ok for the software decoding case, if the unlock were 
>>moved into the !EnoughFreeFrames() clause - it's just dropping the lock when 
>>idle and waiting on a free frame,
> 
> 
> That would let the TV thread get in and change speeds there, which I
> don't want to happen.

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.  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.

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.

-Doug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20041130/4cb29cfa/signature.pgp


More information about the mythtv-dev mailing list