MythTV
master
|
#include <mythcommflag/TemplateMatcher.h>
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 MythVideoFrame *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::FrameMap * | getBreaks (void) const |
int | adjustForBlanks (const BlankFrameDetector *blankFrameDetector, long long nframes) |
int | computeBreaks (FrameMap *breaks) |
Public Member Functions inherited from FrameAnalyzer | |
virtual | ~FrameAnalyzer (void)=default |
virtual enum analyzeFrameResult | MythPlayerInited ([[maybe_unused]] MythPlayer *player, [[maybe_unused]] long long nframes) |
virtual int | finished ([[maybe_unused]] long long nframes, [[maybe_unused]] bool final) |
Private Attributes | |
std::shared_ptr< PGMConverter > | m_pgmConverter {nullptr} |
std::shared_ptr< EdgeDetector > | m_edgeDetector {nullptr} |
TemplateFinder * | m_templateFinder {nullptr} |
const struct AVFrame * | m_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 |
MythPlayer * | m_player {nullptr} |
bool | m_debugMatches {false} |
bool | m_debugRemoveRunts {false} |
bool | m_matchesDone {false} |
std::chrono::microseconds | m_analyzeTime {0us} |
Additional Inherited Members | |
Public Types inherited from FrameAnalyzer | |
enum | analyzeFrameResult : std::uint8_t { 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 |
Definition at line 31 of file TemplateMatcher.h.
TemplateMatcher::TemplateMatcher | ( | std::shared_ptr< PGMConverter > | pgmc, |
std::shared_ptr< EdgeDetector > | ed, | ||
TemplateFinder * | tf, | ||
const QString & | debugdir | ||
) |
Definition at line 302 of file TemplateMatcher.cpp.
|
override |
Definition at line 332 of file TemplateMatcher.cpp.
|
inlineoverridevirtual |
Implements FrameAnalyzer.
Definition at line 41 of file TemplateMatcher.h.
|
override |
Definition at line 340 of file TemplateMatcher.cpp.
|
overridevirtual |
Implements FrameAnalyzer.
Definition at line 395 of file TemplateMatcher.cpp.
|
override |
Definition at line 471 of file TemplateMatcher.cpp.
|
overridevirtual |
Reimplemented from FrameAnalyzer.
Definition at line 570 of file TemplateMatcher.cpp.
|
inlineoverridevirtual |
Implements FrameAnalyzer.
Definition at line 49 of file TemplateMatcher.h.
int TemplateMatcher::templateCoverage | ( | long long | nframes, |
bool | final | ||
) | const |
Definition at line 581 of file TemplateMatcher.cpp.
Referenced by CommDetector2::computeBreaks().
|
inline |
Definition at line 54 of file TemplateMatcher.h.
Referenced by BlankFrameDetector::computeForLogoSurplus().
int TemplateMatcher::adjustForBlanks | ( | const BlankFrameDetector * | blankFrameDetector, |
long long | nframes | ||
) |
Definition at line 641 of file TemplateMatcher.cpp.
Referenced by CommDetector2::computeBreaks().
int TemplateMatcher::computeBreaks | ( | FrameAnalyzer::FrameMap * | breaks | ) |
Definition at line 809 of file TemplateMatcher.cpp.
Referenced by CommDetector2::computeBreaks().
|
private |
Definition at line 59 of file TemplateMatcher.h.
Referenced by analyzeFrame(), MythPlayerInited(), and reportTime().
|
private |
Definition at line 60 of file TemplateMatcher.h.
Referenced by analyzeFrame().
|
private |
Definition at line 61 of file TemplateMatcher.h.
Referenced by MythPlayerInited().
|
private |
Definition at line 62 of file TemplateMatcher.h.
Referenced by analyzeFrame(), finished(), MythPlayerInited(), and templateCoverage().
|
private |
Definition at line 63 of file TemplateMatcher.h.
Referenced by analyzeFrame(), finished(), and MythPlayerInited().
|
private |
Definition at line 64 of file TemplateMatcher.h.
Referenced by analyzeFrame(), finished(), and MythPlayerInited().
|
private |
Definition at line 65 of file TemplateMatcher.h.
Referenced by analyzeFrame(), finished(), and MythPlayerInited().
|
private |
Definition at line 66 of file TemplateMatcher.h.
Referenced by analyzeFrame(), finished(), and MythPlayerInited().
|
private |
Definition at line 69 of file TemplateMatcher.h.
Referenced by analyzeFrame(), finished(), MythPlayerInited(), and ~TemplateMatcher().
|
private |
Definition at line 70 of file TemplateMatcher.h.
Referenced by finished(), MythPlayerInited(), and ~TemplateMatcher().
|
private |
Definition at line 72 of file TemplateMatcher.h.
Referenced by adjustForBlanks(), finished(), and MythPlayerInited().
|
private |
Definition at line 73 of file TemplateMatcher.h.
Referenced by analyzeFrame(), MythPlayerInited(), and ~TemplateMatcher().
|
private |
Definition at line 74 of file TemplateMatcher.h.
Referenced by adjustForBlanks(), computeBreaks(), finished(), getBreaks(), GetMap(), and templateCoverage().
|
private |
Definition at line 77 of file TemplateMatcher.h.
Referenced by finished(), templateCoverage(), and TemplateMatcher().
|
private |
Definition at line 78 of file TemplateMatcher.h.
Referenced by TemplateMatcher().
|
private |
Definition at line 79 of file TemplateMatcher.h.
Referenced by finished(), and MythPlayerInited().
|
private |
Definition at line 80 of file TemplateMatcher.h.
Referenced by MythPlayerInited().
Definition at line 81 of file TemplateMatcher.h.
Referenced by finished(), MythPlayerInited(), and TemplateMatcher().
Definition at line 82 of file TemplateMatcher.h.
Referenced by finished(), and TemplateMatcher().
Definition at line 83 of file TemplateMatcher.h.
Referenced by finished(), and MythPlayerInited().
|
private |
Definition at line 84 of file TemplateMatcher.h.
Referenced by analyzeFrame(), and reportTime().