[mythtv] PATCH: Commercial detection/skip using blank frames

Matthew Schulkind mythdev at terrapin.shacknet.nu
Fri Feb 21 22:05:27 EST 2003


On Fri, 2003-02-21 at 21:23, Chris Pinkham wrote:
> > On Friday 21 February 2003 10:55 am, Chris Pinkham wrote:
> > > Attached is a much better implemention of the commercial skipping patch
> > > I uploaded earlier this week.  I've been using this for a couple nights.
> 
> > I've just committed this -- I did fix the segfault that was occurring on 
> > exiting playback, though.  I also disabled the automatic commercial skip by 
> 
> > Let me know if you agree/disagree with any of my changes.
> 
> I haven't had a chance to recompile and test it (wife's watching TV), but
> I notice that you got rid of the GetFrameRetainWPos function.  The
> function would decode a frame without incrementing wpos to the next
> position.  Then you could use vbuffer[wpos] to refernce that frame.
> 
> Now it looks like it's just calling GetFrame(1,true); which looks like it
> still increments wpos inside GetFrame.  So when GetFrameVariance(wpos)
> is called, it's not really looking at the frame just read in, it's looking
> at the frame which is next in the buffer (wpos points to the next available
> write position right?)  So it's not checking for a blank frame where it
> thinks it is since it's looking in the wrong place in the buffer.
> 
> I might be looking at this wrong, but wanted to speak up sooner rather
> than later since it's in CVS already.
> 
> Other than that it looks good to me (course I haven't had a chance to
> retest it yet though).  :)  So you tested the 'Z' manual mode?  Was it
> working OK?
> 
> Chris
> 
> *****************************************************************************
> ** Chris Pinkham                  Linux v2.2.18, Sane v1.0.4, Cajun v3.0-8 **
> ** cpinkham at bc2va.org                          http://www.bc2va.org/chris/ **
> *****************************************************************************
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at snowman.net
> http://www.snowman.net/mailman/listinfo/mythtv-dev

I gave the patch that was sent to the list a try (haven't updated my CVS
in a few hours). It seemed to work fairly well on FOX here in NYC. I was
able to skip commercial breaks with 1 or 2 hits of the Z key. The
biggest problem I have is that I have to wait about 5 seconds after the
commercials start before I hit Z. If I hit Z too soon after the
commercials start then it rewinds to the black frame just previous.

-Matt



More information about the mythtv-dev mailing list