[mythtv] PATCH: Reset cutpoints and bookmarks.

Eric Andresen ruler111 at cox.net
Tue Mar 18 20:52:56 EST 2003


To clarify, I do not have Automatic Commercial Skipping on, but with the
current code, simply pressing Z on any recorded program loads the
cutlist that was created during the record process. Sometimes this
cutlist is clean, and cuts the commercials properly, but other times it
is peppered throughout the film. The reason for my little patch is for
one reason, this, because there is no way to "undo" pressing 'Z', so
this is in a sense a way to do that, if you happen to not like the
results.

The second reason, is to give an easy out if someone screws up manually
making a cutlist (I've done it a few times). This way, no one has to
manually edit the entries in the database.

Also, you state that the commercial skip list is not recorded into the
database when pressing 'Z', but this is not the case that I have seen,
if I press 'Z', that blankframe created cutlist is used, and written to
the database.

This is mostly a convienience thing in case the user screws up, or
presses 'Z' and does not like the results for the particular recording
(because they are permanent that I have found).

To make this slightly more useful, it might be good to add a third
button on the confirmation screen, however, which is to only reset the
bookmark. My reasoning here, is that I would like to make something
somewhat user based, but not restrictively so. For example, one of my
other ideas that I may implement will be a simple marker that can be
used to show that FamilyMemberX has watched this show and is done with
it, in the form of a small colored dot to the left of the show name in
"Watch Recordings", which would simply be a series of pixmaps. I'll
implement this and post a patch for this particular behavior sometime
later, but any comments are appreciated.

-- Eric Andresen
   ndiin at asu.edu

On Tue, 2003-03-18 at 19:39, Chris Pinkham wrote:
> > 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