MythTV  master
LogoDetectorBase.h
Go to the documentation of this file.
1 #ifndef LOGODETECTORBASE_H
2 #define LOGODETECTORBASE_H
3 
4 #include <QObject>
5 #include "libmythtv/mythframe.h"
6 
8 
9 class LogoDetectorBase : public QObject
10 {
11  Q_OBJECT
12 
13  public:
14  LogoDetectorBase(unsigned int w,unsigned int h) :
15  m_width(w),m_height(h) {}
16 
17  virtual bool searchForLogo(MythCommFlagPlayer* player) = 0;
18  virtual bool doesThisFrameContainTheFoundLogo(MythVideoFrame* frame) = 0;
19  virtual bool pixelInsideLogo(unsigned int x, unsigned int y) = 0;
20  virtual unsigned int getRequiredAvailableBufferForSearch() = 0;
21 
22  signals:
23  void haveNewInformation(unsigned int framenum, bool haslogo,
24  float debugValue = 0.0);
25 
26  protected:
27  ~LogoDetectorBase() override = default;
28 
29  protected:
30  bool m_foundLogo {false};
31  size_t m_width;
32  size_t m_height;
33 };
34 
35 #endif // LOGODETECTORBASE_H
36 
37 /* vim: set expandtab tabstop=4 shiftwidth=4: */
LogoDetectorBase::~LogoDetectorBase
~LogoDetectorBase() override=default
LogoDetectorBase::LogoDetectorBase
LogoDetectorBase(unsigned int w, unsigned int h)
Definition: LogoDetectorBase.h:14
LogoDetectorBase::searchForLogo
virtual bool searchForLogo(MythCommFlagPlayer *player)=0
mythframe.h
LogoDetectorBase::getRequiredAvailableBufferForSearch
virtual unsigned int getRequiredAvailableBufferForSearch()=0
LogoDetectorBase::m_width
size_t m_width
Definition: LogoDetectorBase.h:31
LogoDetectorBase::m_foundLogo
bool m_foundLogo
Definition: LogoDetectorBase.h:30
MythCommFlagPlayer
Definition: mythcommflagplayer.h:25
LogoDetectorBase::pixelInsideLogo
virtual bool pixelInsideLogo(unsigned int x, unsigned int y)=0
LogoDetectorBase::m_height
size_t m_height
Definition: LogoDetectorBase.h:32
LogoDetectorBase
Definition: LogoDetectorBase.h:9
MythVideoFrame
Definition: mythframe.h:88
LogoDetectorBase::doesThisFrameContainTheFoundLogo
virtual bool doesThisFrameContainTheFoundLogo(MythVideoFrame *frame)=0
LogoDetectorBase::haveNewInformation
void haveNewInformation(unsigned int framenum, bool haslogo, float debugValue=0.0)