[mythtv] [patch] Fix for sluggish pause

Isaac Richards ijr at case.edu
Sat Dec 4 05:48:50 UTC 2004


On Friday 03 December 2004 11:25 pm, David Engel wrote:
> On Wed, Dec 01, 2004 at 10:29:38PM -0600, David Engel wrote:
> > On Wed, Dec 01, 2004 at 09:50:56AM -0600, David Engel wrote:
> > > 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.
> >
> > Just a quick update.  I've made some progress, but it will probably be
> > another day or two before I'm finished.
>
> Here's my first cut.  It basically moves nearly all of the pause and
> speed change logic into one place in the decoder loop.  It could go
> pretty much anywere in the loop but the very top seems most logical.
>
> I've only done limited testing so far.  I will do more this weekend,
> but it should be close enough for others to provide feedback.  There
> might be a very tiny race condition, but I think it should be
> inconsequential, and if it turns out not to be, it will hopefully be
> much easier to fix now.

This actually seems a little more racey to me.  I think a lock just around the 
new if clause in the decoder thread, and grabbing that lock anywhere the 
tested for values are changed would be in order here.

> Finally, I have chosen to ignore the waitvideo paramter to NVP::Pause
> and the unpauseaudio parameter to NVP:Play for now.  I'm need to look
> at how and why they are needed before reimplementing them.

They're both for speedups during channel & input changing.

Isaac



More information about the mythtv-dev mailing list