[mythtv] [patch] Fix for sluggish pause

Isaac Richards ijr at case.edu
Wed Dec 1 17:01:07 UTC 2004


On Wednesday 01 December 2004 10:50 am, David Engel wrote:
> On Tue, Nov 30, 2004 at 10:21:08PM -0500, Doug Larrick wrote:
> > I am concerned though that this loop is spending way too much time just
> > spinning during normal playback, especially with your getframe.patch.
> > Maybe I'm being dense, but where exactly is it that it sleeps (rather
> > than busy-waits) if we don't need a new frame yet?
>
> It only sleeps at the top of the loop.  Yes, it's inefficient, but not
> that much more so.  Remember, this was only for testing.  A wait
> condition could help but would also open up a whole new can of worms.
>
> I'm going to look at the speed change needs again and see if I can do
> something without a mutex that won't have race conditions.

Can the logic that's currently before the call to GetFrame() (aside from the 
paused handler stuff, of course) be moved to after it?  That way the waiting 
for free frames and the actual decoding wouldn't really need the lock..

Isaac


More information about the mythtv-dev mailing list