[mythtv] [patch] Fix for sluggish pause

Isaac Richards ijr at case.edu
Sun Dec 5 06:23:55 UTC 2004


On Saturday 04 December 2004 11:26 pm, David Engel wrote:
> On Sat, Dec 04, 2004 at 01:54:30PM -0500, Isaac Richards wrote:
> > > > The bigger issue, though, is that there's a _lot_ of code that assume
> > > > that NVP::Pause blocks until certain threads are paused, which isn't
> > > > true with this patch anymore.
> > >
> > > OK, that can be handled rather easily.  You do realize, though, there
> > > is always the case where a full live TV buffer will cause a forced
> > > unpause.
> >
> > Right.
> >
> > [...]>
> >
> > > > > Whether we add a lock or not, I still think we should strongly
> > > > > consider the change to return early from NVP::GetFrame.  Try
> > > > > changing between 1/16 speed and paused to see why.
> > > >
> > > > As long as it sleeps in GetFrame for a bit.
> > >
> > > It will.  It will jsut be capping the max time it sleeps to something
> > > like 10ms.
> >
> > That works for me.
>
> Alright, then.  I believe this version takes care of all known issues
> except two.  First, there is still an issue with commercial flagging.
> It's known and solvable, but I'm going to defer to Chris on which way
> he wants to go.  Second, there appears to be a new problem with ff/rew
> using the ivtvdecoder.  I need to look at it.

I'm fairly sure that this new Pase() still isn't going to work - look at all 
the places tv_play.cpp is calling Pause(true), which used to block until 
playback was fully paused.  It still doesn't block until that with this new 
version.  There's also no protection for next_waitvideo/next_unpauseaudio, 
and I can see those values getting overwritten.

I'm also not really liking how complicated this whole thing is becoming. =(

How about reverting Pause() to the state it was before all the speed change 
stuff got tacked on to it, and move just _that_ part of it into the decoder 
loop?  Same with Play()...

Also, wouldn't it be simpler to not adjust the frame display interval ever, 
and simply either add or drop frames as required for the current speed?  That 
would lead to smoother non-1.0 video playback, and simplify a lot of this 
code.

Isaac


More information about the mythtv-dev mailing list