[mythtv] Commercial Flagging Idea

Lucas Meijer lucas at mach8.nl
Tue Jul 5 16:33:28 EDT 2005


Hey David,

>   Has anyone ever thought of doing the commercial flagging portion of
> the code to be more of a plugin architecture.  Where each flagging
> method is a plugin.

I have recently done a complete restructure of the commercial flagging 
code. You can now easily add a new commercial dection method "plugin". 
(look at CommDetectorBase). Currently we have one method, which is 
Classic, which Chris wrote almost everything of. I made this change to 
more easily do work on the commercial detection, but as of today none of 
my work is far enough to start testing it. Good scene change detection 
is holding me, (and the current implementations accuracy for that 
matter) back.

   I imagine there would be 2 classes of flagging
> plugins, image based and audio based.  Where each plugin would add add
> or subtract from a frame's or block of frames' probability of it being
> a commercial.  Similar to how spam filtering on email works.  This
> would allow for adding new methods very easily compared to the way
> it's all written now as one class.  It would also allow each plugin to
> have it's own settings page in the frontend and perhaps web interface
> to tweak each filter for fine tuning.  This could also open up the
> opportunity to have commercial flagging settings for each show you
> record if the default settings weren't working well for a particular
> show.

You can already do all this stuff using the current architecture.
CommercialDector's don't have acces yet to the audio stream, right now 
they just get a NuppelVideoPlayer* which they can do everything with 
they want. Adding audio shouldn't be too much of a hassle, so plugins 
that want to use it can do so.

Bye, Lucas

PS I've used the used the word "plugin" for seperate self contained 
modules of commercial detection functionality.. These are statically 
linked however, unlinke what you'd expect from the word plugin..  so I 
guess plugin wasn't the best word, but now this email is already written :p


More information about the mythtv-dev mailing list