MythTV  master
Public Member Functions | Private Attributes | List of all members
TemplateMatcher Class Reference

#include <TemplateMatcher.h>

Inheritance diagram for TemplateMatcher:
Inheritance graph
[legend]
Collaboration diagram for TemplateMatcher:
Collaboration graph
[legend]

Public Member Functions

 TemplateMatcher (PGMConverter *pgmc, EdgeDetector *ed, TemplateFinder *tf, const QString &debugdir)
 
 ~TemplateMatcher (void)
 
const char * name (void) const override
 
enum analyzeFrameResult MythPlayerInited (MythPlayer *player, long long nframes) override
 
enum analyzeFrameResult analyzeFrame (const VideoFrame *frame, long long frameno, long long *pNextFrame) override
 
int finished (long long nframes, bool final) override
 
int reportTime (void) const override
 
FrameMap GetMap (unsigned int) const override
 
int templateCoverage (long long nframes, bool final) const
 
const FrameAnalyzer::FrameMapgetBreaks (void) const
 
int adjustForBlanks (const BlankFrameDetector *blankFrameDetector, long long nframes)
 
int computeBreaks (FrameMap *breaks)
 
- Public Member Functions inherited from FrameAnalyzer
virtual ~FrameAnalyzer (void)=default
 

Private Attributes

PGMConverterm_pgmConverter {nullptr}
 
EdgeDetectorm_edgeDetector {nullptr}
 
TemplateFinderm_templateFinder {nullptr}
 
const struct AVFramem_tmpl {nullptr}
 
int m_tmplrow {-1}
 
int m_tmplcol {-1}
 
int m_tmplwidth {-1}
 
int m_tmplheight {-1}
 
unsigned short * m_matches {nullptr}
 
unsigned char * m_match {nullptr}
 
float m_fps {0.0F}
 
AVFrame m_cropped
 
FrameAnalyzer::FrameMap m_breakMap
 
int m_debugLevel {0}
 
QString m_debugdir
 
QString m_debugdata
 
MythPlayerm_player {nullptr}
 
bool m_debug_matches {false}
 
bool m_debug_removerunts {false}
 
bool m_matches_done {false}
 
struct timeval m_analyze_time
 

Additional Inherited Members

- Public Types inherited from FrameAnalyzer
enum  analyzeFrameResult { ANALYZE_OK, ANALYZE_ERROR, ANALYZE_FINISHED, ANALYZE_FATAL }
 
typedef QMap< long long, long long > FrameMap
 
- Static Public Attributes inherited from FrameAnalyzer
static const long long ANYFRAME = LLONG_MAX
 
static const long long NEXTFRAME = -1
 

Detailed Description

Definition at line 31 of file TemplateMatcher.h.

Constructor & Destructor Documentation

◆ TemplateMatcher()

TemplateMatcher::TemplateMatcher ( PGMConverter pgmc,
EdgeDetector ed,
TemplateFinder tf,
const QString &  debugdir 
)

Definition at line 331 of file TemplateMatcher.cpp.

◆ ~TemplateMatcher()

TemplateMatcher::~TemplateMatcher ( void  )

Definition at line 363 of file TemplateMatcher.cpp.

Member Function Documentation

◆ name()

const char* TemplateMatcher::name ( void  ) const
inlineoverridevirtual

Implements FrameAnalyzer.

Definition at line 40 of file TemplateMatcher.h.

◆ MythPlayerInited()

enum FrameAnalyzer::analyzeFrameResult TemplateMatcher::MythPlayerInited ( MythPlayer player,
long long  nframes 
)
overridevirtual

Reimplemented from FrameAnalyzer.

Definition at line 371 of file TemplateMatcher.cpp.

◆ analyzeFrame()

enum FrameAnalyzer::analyzeFrameResult TemplateMatcher::analyzeFrame ( const VideoFrame frame,
long long  frameno,
long long *  pNextFrame 
)
overridevirtual

Implements FrameAnalyzer.

Definition at line 425 of file TemplateMatcher.cpp.

◆ finished()

int TemplateMatcher::finished ( long long  nframes,
bool  final 
)
overridevirtual

Reimplemented from FrameAnalyzer.

Definition at line 500 of file TemplateMatcher.cpp.

◆ reportTime()

int TemplateMatcher::reportTime ( void  ) const
overridevirtual

Reimplemented from FrameAnalyzer.

Definition at line 600 of file TemplateMatcher.cpp.

◆ GetMap()

FrameMap TemplateMatcher::GetMap ( unsigned int  ) const
inlineoverridevirtual

Implements FrameAnalyzer.

Definition at line 48 of file TemplateMatcher.h.

◆ templateCoverage()

int TemplateMatcher::templateCoverage ( long long  nframes,
bool  final 
) const

Definition at line 611 of file TemplateMatcher.cpp.

Referenced by CommDetector2::computeBreaks().

◆ getBreaks()

const FrameAnalyzer::FrameMap* TemplateMatcher::getBreaks ( void  ) const
inline

Definition at line 53 of file TemplateMatcher.h.

Referenced by BlankFrameDetector::computeForLogoSurplus().

◆ adjustForBlanks()

int TemplateMatcher::adjustForBlanks ( const BlankFrameDetector blankFrameDetector,
long long  nframes 
)

Definition at line 667 of file TemplateMatcher.cpp.

Referenced by CommDetector2::computeBreaks().

◆ computeBreaks()

int TemplateMatcher::computeBreaks ( FrameAnalyzer::FrameMap breaks)

Definition at line 835 of file TemplateMatcher.cpp.

Referenced by CommDetector2::computeBreaks().

Member Data Documentation

◆ m_pgmConverter

PGMConverter* TemplateMatcher::m_pgmConverter {nullptr}
private

Definition at line 58 of file TemplateMatcher.h.

Referenced by analyzeFrame(), MythPlayerInited(), and reportTime().

◆ m_edgeDetector

EdgeDetector* TemplateMatcher::m_edgeDetector {nullptr}
private

Definition at line 59 of file TemplateMatcher.h.

Referenced by analyzeFrame().

◆ m_templateFinder

TemplateFinder* TemplateMatcher::m_templateFinder {nullptr}
private

Definition at line 60 of file TemplateMatcher.h.

Referenced by MythPlayerInited().

◆ m_tmpl

const struct AVFrame* TemplateMatcher::m_tmpl {nullptr}
private

Definition at line 61 of file TemplateMatcher.h.

Referenced by analyzeFrame(), finished(), MythPlayerInited(), and templateCoverage().

◆ m_tmplrow

int TemplateMatcher::m_tmplrow {-1}
private

Definition at line 62 of file TemplateMatcher.h.

Referenced by analyzeFrame(), finished(), and MythPlayerInited().

◆ m_tmplcol

int TemplateMatcher::m_tmplcol {-1}
private

Definition at line 63 of file TemplateMatcher.h.

Referenced by analyzeFrame(), finished(), and MythPlayerInited().

◆ m_tmplwidth

int TemplateMatcher::m_tmplwidth {-1}
private

Definition at line 64 of file TemplateMatcher.h.

Referenced by analyzeFrame(), finished(), and MythPlayerInited().

◆ m_tmplheight

int TemplateMatcher::m_tmplheight {-1}
private

Definition at line 65 of file TemplateMatcher.h.

Referenced by analyzeFrame(), finished(), and MythPlayerInited().

◆ m_matches

unsigned short* TemplateMatcher::m_matches {nullptr}
private

Definition at line 68 of file TemplateMatcher.h.

Referenced by analyzeFrame(), finished(), MythPlayerInited(), and ~TemplateMatcher().

◆ m_match

unsigned char* TemplateMatcher::m_match {nullptr}
private

Definition at line 69 of file TemplateMatcher.h.

Referenced by finished(), MythPlayerInited(), and ~TemplateMatcher().

◆ m_fps

float TemplateMatcher::m_fps {0.0F}
private

Definition at line 71 of file TemplateMatcher.h.

Referenced by adjustForBlanks(), finished(), and MythPlayerInited().

◆ m_cropped

AVFrame TemplateMatcher::m_cropped
private

◆ m_breakMap

FrameAnalyzer::FrameMap TemplateMatcher::m_breakMap
private

◆ m_debugLevel

int TemplateMatcher::m_debugLevel {0}
private

Definition at line 76 of file TemplateMatcher.h.

Referenced by finished(), templateCoverage(), and TemplateMatcher().

◆ m_debugdir

QString TemplateMatcher::m_debugdir
private

Definition at line 77 of file TemplateMatcher.h.

Referenced by TemplateMatcher().

◆ m_debugdata

QString TemplateMatcher::m_debugdata
private

Definition at line 78 of file TemplateMatcher.h.

Referenced by finished(), and MythPlayerInited().

◆ m_player

MythPlayer* TemplateMatcher::m_player {nullptr}
private

Definition at line 79 of file TemplateMatcher.h.

Referenced by MythPlayerInited().

◆ m_debug_matches

bool TemplateMatcher::m_debug_matches {false}
private

Definition at line 80 of file TemplateMatcher.h.

Referenced by finished(), MythPlayerInited(), and TemplateMatcher().

◆ m_debug_removerunts

bool TemplateMatcher::m_debug_removerunts {false}
private

Definition at line 81 of file TemplateMatcher.h.

Referenced by finished(), and TemplateMatcher().

◆ m_matches_done

bool TemplateMatcher::m_matches_done {false}
private

Definition at line 82 of file TemplateMatcher.h.

Referenced by finished(), and MythPlayerInited().

◆ m_analyze_time

struct timeval TemplateMatcher::m_analyze_time
private

Definition at line 83 of file TemplateMatcher.h.

Referenced by analyzeFrame(), reportTime(), and TemplateMatcher().


The documentation for this class was generated from the following files: