[mythtv] Re: Preview images - skip commercial breaks.

Nicholas McCoy mccoyn at gmail.com
Sat Mar 19 16:43:53 UTC 2005


Apparently the file wasn't attached to my first message for some
reason.  I've attached my current changes to this message.  There are
a couple changes.

It now uses the absoute offset as long as its not marked as a
commercial.  This should prevent images from changing, unless they are
already a commercial.  I also changed it to use
NuppelVideoPlayer::commBreakMap instead of a local variable.


On Sat, 19 Mar 2005 08:39:40 -0500, Nicholas McCoy <mccoyn at gmail.com> wrote:
> Sometimes my preview images show a commercial and are therefore not
> very useful.  I decided to code a patch to take advantage of the
> commercial flags to avoid this.  I've attached my work so far.  Here
> are some questions that came up.
> 
> 1.  Is it a problem to have images changing?
> 
> The images make a nice quick reference for the user about which
> episode it is.  The patch will cause the image to change when commflag
> is run.  I've thought about running the code only if the preview falls
> in a commercial break.  That would give less consistent selection
> (some exact, some based on commercials), but would leave images
> unchanged by commercial skipping unless they were in a commercial.
> 
> Another possibility is to make this behavior a configurable option.  I
> don't think that is necessary though.
> 
> 2.  Where should I change the code to recreate the image?
> 
> Currently, I delete the image file and the next time a preview image
> is needed it reruns the code, which compensates for commercials.  I'd
> like to make the update automatic.  One idea is to delete the file
> when NuppelVideoPlayer::FlagCommercials is complete.  Another is to
> check if the recording is commercial flagged in
> PlaybackBox::getPixmap.  This second choice will require checking the
> times of the image and the commercial flags somehow.
> 
> 3.  How do I get MythWeb to update the images?
> 
> I deleted the image file and regenerated it by browsing it in the
> frontend.  When I opened the web page it still had the old image.
> Rebooting the backend and refreshing the page didn't help.  I don't
> know anything about Apache or Php so I'm completely lost on this one.
> 
> 4.  Should I use NuppelVideoPlayer::commBreakMap instead of a local variable?
> 
> This could be more efficient, but I'm worried about breaking the stuff
> that uses this variable.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: preview-not-commercial-2.patch
Type: application/octet-stream
Size: 4118 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050319/686b5248/preview-not-commercial-2.obj


More information about the mythtv-dev mailing list