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

#include <TemplateFinder.h>

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

Public Member Functions

 TemplateFinder (PGMConverter *pgmc, BorderDetector *bd, EdgeDetector *ed, MythPlayer *player, int proglen, const QString &debugdir)
 
 ~TemplateFinder (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
 
const struct AVFramegetTemplate (int *prow, int *pcol, int *pwidth, int *pheight) const
 
- Public Member Functions inherited from FrameAnalyzer
virtual ~FrameAnalyzer (void)=default
 

Private Member Functions

int resetBuffers (int newwidth, int newheight)
 

Private Attributes

PGMConverterm_pgmConverter
 
BorderDetectorm_borderDetector
 
EdgeDetectorm_edgeDetector
 
unsigned int m_sampleTime {20 * 60}
 
int m_frameInterval
 
long long m_endFrame {0}
 
long long m_nextFrame {0}
 
int m_width {-1}
 
int m_height {-1}
 
unsigned int * scores {nullptr}
 
int mincontentrow {INT_MAX}
 
int mincontentcol {INT_MAX}
 
int maxcontentrow1 {INT_MAX}
 
int maxcontentcol1 {INT_MAX}
 
AVFrame m_tmpl
 
int m_tmplrow {-1}
 
int m_tmplcol {-1}
 
int m_tmplwidth {-1}
 
int m_tmplheight {-1}
 
AVFrame m_cropped
 
int m_cwidth {-1}
 
int m_cheight {-1}
 
int m_debugLevel {0}
 
QString m_debugdir
 
QString m_debugdata
 
QString m_debugtmpl
 
bool m_debug_template {false}
 
bool m_debug_edgecounts {false}
 
bool m_debug_frames {false}
 
bool m_tmpl_valid {false}
 
bool m_tmpl_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 30 of file TemplateFinder.h.

Constructor & Destructor Documentation

◆ TemplateFinder()

TemplateFinder::TemplateFinder ( PGMConverter pgmc,
BorderDetector bd,
EdgeDetector ed,
MythPlayer player,
int  proglen,
const QString &  debugdir 
)

Definition at line 700 of file TemplateFinder.cpp.

◆ ~TemplateFinder()

TemplateFinder::~TemplateFinder ( void  )

Definition at line 767 of file TemplateFinder.cpp.

Member Function Documentation

◆ name()

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

Implements FrameAnalyzer.

Definition at line 39 of file TemplateFinder.h.

◆ MythPlayerInited()

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

Reimplemented from FrameAnalyzer.

Definition at line 775 of file TemplateFinder.cpp.

◆ analyzeFrame()

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

Implements FrameAnalyzer.

Definition at line 864 of file TemplateFinder.cpp.

◆ finished()

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

Reimplemented from FrameAnalyzer.

Definition at line 986 of file TemplateFinder.cpp.

◆ reportTime()

int TemplateFinder::reportTime ( void  ) const
overridevirtual

Reimplemented from FrameAnalyzer.

Definition at line 1031 of file TemplateFinder.cpp.

◆ GetMap()

FrameMap TemplateFinder::GetMap ( unsigned int  ) const
inlineoverridevirtual

Implements FrameAnalyzer.

Definition at line 47 of file TemplateFinder.h.

Referenced by CommDetector2::PrintFullMap().

◆ getTemplate()

const struct AVFrame * TemplateFinder::getTemplate ( int *  prow,
int *  pcol,
int *  pwidth,
int *  pheight 
) const

◆ resetBuffers()

int TemplateFinder::resetBuffers ( int  newwidth,
int  newheight 
)
private

Definition at line 841 of file TemplateFinder.cpp.

Referenced by analyzeFrame().

Member Data Documentation

◆ m_pgmConverter

PGMConverter* TemplateFinder::m_pgmConverter
private

Definition at line 57 of file TemplateFinder.h.

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

◆ m_borderDetector

BorderDetector* TemplateFinder::m_borderDetector
private

Definition at line 58 of file TemplateFinder.h.

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

◆ m_edgeDetector

EdgeDetector* TemplateFinder::m_edgeDetector
private

Definition at line 59 of file TemplateFinder.h.

Referenced by analyzeFrame().

◆ m_sampleTime

unsigned int TemplateFinder::m_sampleTime {20 * 60}
private

Definition at line 61 of file TemplateFinder.h.

Referenced by TemplateFinder().

◆ m_frameInterval

int TemplateFinder::m_frameInterval
private

Definition at line 62 of file TemplateFinder.h.

Referenced by analyzeFrame(), and TemplateFinder().

◆ m_endFrame

long long TemplateFinder::m_endFrame {0}
private

Definition at line 63 of file TemplateFinder.h.

Referenced by analyzeFrame(), and TemplateFinder().

◆ m_nextFrame

long long TemplateFinder::m_nextFrame {0}
private

Definition at line 64 of file TemplateFinder.h.

Referenced by analyzeFrame().

◆ m_width

int TemplateFinder::m_width {-1}
private

Definition at line 66 of file TemplateFinder.h.

Referenced by finished(), and MythPlayerInited().

◆ m_height

int TemplateFinder::m_height {-1}
private

Definition at line 67 of file TemplateFinder.h.

Referenced by finished(), and MythPlayerInited().

◆ scores

unsigned int* TemplateFinder::scores {nullptr}
private

Definition at line 68 of file TemplateFinder.h.

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

◆ mincontentrow

int TemplateFinder::mincontentrow {INT_MAX}
private

Definition at line 70 of file TemplateFinder.h.

Referenced by analyzeFrame(), and finished().

◆ mincontentcol

int TemplateFinder::mincontentcol {INT_MAX}
private

Definition at line 71 of file TemplateFinder.h.

Referenced by analyzeFrame(), and finished().

◆ maxcontentrow1

int TemplateFinder::maxcontentrow1 {INT_MAX}
private

Definition at line 72 of file TemplateFinder.h.

Referenced by analyzeFrame(), and finished().

◆ maxcontentcol1

int TemplateFinder::maxcontentcol1 {INT_MAX}
private

Definition at line 73 of file TemplateFinder.h.

Referenced by analyzeFrame(), and finished().

◆ m_tmpl

AVFrame TemplateFinder::m_tmpl
private

◆ m_tmplrow

int TemplateFinder::m_tmplrow {-1}
private

Definition at line 76 of file TemplateFinder.h.

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

◆ m_tmplcol

int TemplateFinder::m_tmplcol {-1}
private

Definition at line 77 of file TemplateFinder.h.

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

◆ m_tmplwidth

int TemplateFinder::m_tmplwidth {-1}
private

Definition at line 78 of file TemplateFinder.h.

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

◆ m_tmplheight

int TemplateFinder::m_tmplheight {-1}
private

Definition at line 79 of file TemplateFinder.h.

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

◆ m_cropped

AVFrame TemplateFinder::m_cropped
private

Definition at line 81 of file TemplateFinder.h.

Referenced by analyzeFrame(), resetBuffers(), TemplateFinder(), and ~TemplateFinder().

◆ m_cwidth

int TemplateFinder::m_cwidth {-1}
private

Definition at line 82 of file TemplateFinder.h.

Referenced by resetBuffers().

◆ m_cheight

int TemplateFinder::m_cheight {-1}
private

Definition at line 83 of file TemplateFinder.h.

Referenced by resetBuffers().

◆ m_debugLevel

int TemplateFinder::m_debugLevel {0}
private

Definition at line 86 of file TemplateFinder.h.

Referenced by analyzeFrame(), and TemplateFinder().

◆ m_debugdir

QString TemplateFinder::m_debugdir
private

Definition at line 87 of file TemplateFinder.h.

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

◆ m_debugdata

QString TemplateFinder::m_debugdata
private

Definition at line 88 of file TemplateFinder.h.

Referenced by finished(), and MythPlayerInited().

◆ m_debugtmpl

QString TemplateFinder::m_debugtmpl
private

Definition at line 89 of file TemplateFinder.h.

Referenced by finished(), and MythPlayerInited().

◆ m_debug_template

bool TemplateFinder::m_debug_template {false}
private

Definition at line 90 of file TemplateFinder.h.

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

◆ m_debug_edgecounts

bool TemplateFinder::m_debug_edgecounts {false}
private

Definition at line 91 of file TemplateFinder.h.

Referenced by finished(), and TemplateFinder().

◆ m_debug_frames

bool TemplateFinder::m_debug_frames {false}
private

Definition at line 92 of file TemplateFinder.h.

Referenced by analyzeFrame(), and TemplateFinder().

◆ m_tmpl_valid

bool TemplateFinder::m_tmpl_valid {false}
private

Definition at line 93 of file TemplateFinder.h.

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

◆ m_tmpl_done

bool TemplateFinder::m_tmpl_done {false}
private

Definition at line 94 of file TemplateFinder.h.

Referenced by finished(), and MythPlayerInited().

◆ m_analyze_time

struct timeval TemplateFinder::m_analyze_time
private

Definition at line 95 of file TemplateFinder.h.

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


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