MythTV  master
Classes | 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]

Classes

struct  m_analyzeTime
 

Public Member Functions

 TemplateMatcher (std::shared_ptr< PGMConverter > pgmc, std::shared_ptr< EdgeDetector > ed, TemplateFinder *tf, const QString &debugdir)
 
 ~TemplateMatcher (void) override
 
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

std::shared_ptr< PGMConverterm_pgmConverter {nullptr}
 
std::shared_ptr< 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_debugMatches {false}
 
bool m_debugRemoveRunts {false}
 
bool m_matchesDone {false}
 

Additional Inherited Members

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

Detailed Description

Definition at line 31 of file TemplateMatcher.h.

Constructor & Destructor Documentation

◆ TemplateMatcher()

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

Definition at line 310 of file TemplateMatcher.cpp.

◆ ~TemplateMatcher()

TemplateMatcher::~TemplateMatcher ( void  )
override

Definition at line 340 of file TemplateMatcher.cpp.

Member Function Documentation

◆ name()

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

Implements FrameAnalyzer.

Definition at line 41 of file TemplateMatcher.h.

◆ MythPlayerInited()

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

Reimplemented from FrameAnalyzer.

Definition at line 340 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 340 of file TemplateMatcher.cpp.

◆ finished()

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

Reimplemented from FrameAnalyzer.

Definition at line 480 of file TemplateMatcher.cpp.

◆ reportTime()

int TemplateMatcher::reportTime ( void  ) const
overridevirtual

Reimplemented from FrameAnalyzer.

Definition at line 579 of file TemplateMatcher.cpp.

◆ GetMap()

FrameMap TemplateMatcher::GetMap ( unsigned int  ) const
inlineoverridevirtual

Implements FrameAnalyzer.

Definition at line 49 of file TemplateMatcher.h.

◆ templateCoverage()

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

Definition at line 590 of file TemplateMatcher.cpp.

Referenced by CommDetector2::computeBreaks().

◆ getBreaks()

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

Definition at line 54 of file TemplateMatcher.h.

Referenced by BlankFrameDetector::computeForLogoSurplus().

◆ adjustForBlanks()

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

Definition at line 646 of file TemplateMatcher.cpp.

Referenced by CommDetector2::computeBreaks().

◆ computeBreaks()

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

Definition at line 814 of file TemplateMatcher.cpp.

Referenced by CommDetector2::computeBreaks().

Member Data Documentation

◆ m_pgmConverter

std::shared_ptr<PGMConverter> TemplateMatcher::m_pgmConverter {nullptr}
private

Definition at line 59 of file TemplateMatcher.h.

Referenced by reportTime().

◆ m_edgeDetector

std::shared_ptr<EdgeDetector> TemplateMatcher::m_edgeDetector {nullptr}
private

Definition at line 60 of file TemplateMatcher.h.

◆ m_templateFinder

TemplateFinder* TemplateMatcher::m_templateFinder {nullptr}
private

Definition at line 61 of file TemplateMatcher.h.

◆ m_tmpl

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

Definition at line 62 of file TemplateMatcher.h.

Referenced by finished(), and templateCoverage().

◆ m_tmplRow

int TemplateMatcher::m_tmplRow {-1}
private

Definition at line 63 of file TemplateMatcher.h.

Referenced by finished().

◆ m_tmplCol

int TemplateMatcher::m_tmplCol {-1}
private

Definition at line 64 of file TemplateMatcher.h.

Referenced by finished().

◆ m_tmplWidth

int TemplateMatcher::m_tmplWidth {-1}
private

Definition at line 65 of file TemplateMatcher.h.

Referenced by finished().

◆ m_tmplHeight

int TemplateMatcher::m_tmplHeight {-1}
private

Definition at line 66 of file TemplateMatcher.h.

Referenced by finished().

◆ m_matches

unsigned short* TemplateMatcher::m_matches {nullptr}
private

Definition at line 69 of file TemplateMatcher.h.

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

◆ m_match

unsigned char* TemplateMatcher::m_match {nullptr}
private

Definition at line 70 of file TemplateMatcher.h.

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

◆ m_fps

float TemplateMatcher::m_fps {0.0F}
private

Definition at line 72 of file TemplateMatcher.h.

Referenced by adjustForBlanks(), and finished().

◆ m_cropped

AVFrame TemplateMatcher::m_cropped {}
private

Definition at line 73 of file TemplateMatcher.h.

Referenced by ~TemplateMatcher().

◆ m_breakMap

FrameAnalyzer::FrameMap TemplateMatcher::m_breakMap
private

◆ m_debugLevel

int TemplateMatcher::m_debugLevel {0}
private

Definition at line 77 of file TemplateMatcher.h.

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

◆ m_debugDir

QString TemplateMatcher::m_debugDir
private

Definition at line 78 of file TemplateMatcher.h.

Referenced by TemplateMatcher().

◆ m_debugData

QString TemplateMatcher::m_debugData
private

Definition at line 79 of file TemplateMatcher.h.

Referenced by finished().

◆ m_player

MythPlayer* TemplateMatcher::m_player {nullptr}
private

Definition at line 80 of file TemplateMatcher.h.

◆ m_debugMatches

bool TemplateMatcher::m_debugMatches {false}
private

Definition at line 81 of file TemplateMatcher.h.

Referenced by finished(), and TemplateMatcher().

◆ m_debugRemoveRunts

bool TemplateMatcher::m_debugRemoveRunts {false}
private

Definition at line 82 of file TemplateMatcher.h.

Referenced by finished(), and TemplateMatcher().

◆ m_matchesDone

bool TemplateMatcher::m_matchesDone {false}
private

Definition at line 83 of file TemplateMatcher.h.

Referenced by finished().


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