[mythtv] PATCH: Reset cutpoints and bookmarks.

Chris Pinkham cpinkham at bc2va.org
Tue Mar 18 21:39:34 EST 2003


> Here's a short little patch I made that just allows 'R' to be used on
> the play/delete recordings menu to reset all cutpoints and bookmarks (on
> the highlighted recording), with confirmation.
> 
> The reasoning is mostly for manual screwups such as bookmarking yourself
> in a faulty cutpoint (I'm sure I'm not the only one that has done this),
> and the main reason: to get rid of the nasty cutpoints that the current
> channelskipping code has been producing occasionally (peppered
> cutpoints, et cetera). All in all, hopefully you will not have to use it
> much.

I'm assuming that you meant Commercial Skipping code up there and not
channel skipping.  If so, just wanted to say that the current commercial
skip code in the database does not create a cutlist unless you go into
the editor and don't already have a cutlist.  If you just watch a show
without ever going into the editor, no cutlist is every written to the
databse.  The blank frames are used to create a commercial skip list
but that is not saved to the database unless you have turned on
automatic commercial flagging in the setup screen.  If auto commercial
flagging is turned on, then a commercial skip list will be generated using
blank frame detection (the only current detection method) and will be
written to the databse in the recordedmarkup table.

Here's a simple sequence of events just so people can see what's going
on with current CVS code:

* During the normal recording process, blank frames are detected and a list
  is kept in memory.

* After recording successfully finishes, the blank frame list gets written
  to the database to the recordedmarkup table.

* If the user does not have auto commercial flagging turned on, then the
  process is complete.

* If the user has auto commercial flagging turned on, then a new thread is
  fired off which first calls nice(19) to make it very low priority.  The new
  thread goes back through the recorded video and applies the only current
  detection method of blank-frame detection to generate a commercial skip
  list.  This will be modified later to add more methods to better
  differentiate commercials from show material.  Once a commercial skip
  list is generated, this gets saved in the recordedmarkup table as well.


Here's what happens during playback:

* NuppelVideoPlayer is started and loads the video.

* The player loads the blank frame list and commercial skip list from the
  recordedmarkup table into two Qmap instances.  One or both may be empty
  at this point.

* Player starts playing video.

* User hits 'Z' (skip forward), or 'Q' (skip backward).

* Player checks commercial skip list to see if it exists.

* If commercial skip lists exists, then player jumps to next markup.
  If skip list does not exists and commercial detection method is set
  to blank frame detection and the blank frame map is not empty, then
  the player calls the blank frame commercial skip function and quickly
  generates the blank frame commercial skip map.  This is not saved to
  the database, it only exists in memory.  The player now skips to the
  next markup in the newly created commercial skip list.


If the user goes into edit mode and a commercial skip list exists and no
cutlist exists, then the skip list is loaded into the editor as a
starting cutlist.  Maybe it would make more sense to have a key in the
editor to load the commercial skip list if it exists rather than doing it
by default.

If the blank frame detection isn't working well, please let me know and
if you can offer any insight as to why then all the more better.  For the
shows I've been watching it has been doing a pretty good job, but my testing
has consisted of probably less than 10 channels that I watch regularly.
I have scheduled programs to record that I don't normally watch just to
try to run it through the ringer more, but I'll never be able to test
everything.  I think Isaac mentioned that it was terrible job on SciFi the
other night, but I haven't had a chance to test anything from there.

Chris

*****************************************************************************
** Chris Pinkham                  Linux v2.2.18, Sane v1.0.4, Cajun v3.0-8 **
** cpinkham at bc2va.org                          http://www.bc2va.org/chris/ **
*****************************************************************************


More information about the mythtv-dev mailing list