MythTV  master
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
SceneChangeDetector Class Reference

#include <mythcommflag/SceneChangeDetector.h>

Inheritance diagram for SceneChangeDetector:
[legend]
Collaboration diagram for SceneChangeDetector:
[legend]

Classes

struct  scenechange_data
 

Public Types

using SceneChangeData = std::array< scenechange_data, UCHAR_MAX+1 >
 
- 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 >
 

Public Member Functions

 SceneChangeDetector (std::shared_ptr< HistogramAnalyzer > ha, const QString &debugdir)
 
virtual void deleteLater (void)
 
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
 
const FrameAnalyzer::FrameMapgetChanges (void) const
 
- 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)
 

Protected Member Functions

 ~SceneChangeDetector (void) override=default
 

Private Attributes

std::shared_ptr< HistogramAnalyzerm_histogramAnalyzer {nullptr}
 
float m_fps {0.0F}
 
std::vector< SceneChangeDatam_scData
 
std::vector< uint16_tm_scDiff
 
FrameAnalyzer::FrameMap m_changeMap
 
int m_debugLevel {0}
 
QString m_debugData
 
bool m_debugSceneChange {false}
 
bool m_sceneChangeDone {false}
 

Additional Inherited Members

- Static Public Attributes inherited from FrameAnalyzer
static const long long kAnyFrame = LLONG_MAX
 
static const long long kNextFrame = -1
 

Detailed Description

Definition at line 17 of file SceneChangeDetector.h.

Member Typedef Documentation

◆ SceneChangeData

using SceneChangeDetector::SceneChangeData = std::array<scenechange_data,UCHAR_MAX + 1>

Definition at line 42 of file SceneChangeDetector.h.

Constructor & Destructor Documentation

◆ SceneChangeDetector()

SceneChangeDetector::SceneChangeDetector ( std::shared_ptr< HistogramAnalyzer ha,
const QString &  debugdir 
)

Definition at line 95 of file SceneChangeDetector.cpp.

◆ ~SceneChangeDetector()

SceneChangeDetector::~SceneChangeDetector ( void  )
overrideprotecteddefault

Member Function Documentation

◆ deleteLater()

virtual void SceneChangeDetector::deleteLater ( void  )
inlinevirtual

Definition at line 21 of file SceneChangeDetector.h.

◆ name()

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

Implements FrameAnalyzer.

Definition at line 24 of file SceneChangeDetector.h.

◆ MythPlayerInited()

enum FrameAnalyzer::analyzeFrameResult SceneChangeDetector::MythPlayerInited ( MythPlayer player,
long long  nframes 
)
override

Definition at line 119 of file SceneChangeDetector.cpp.

◆ analyzeFrame()

enum FrameAnalyzer::analyzeFrameResult SceneChangeDetector::analyzeFrame ( const MythVideoFrame frame,
long long  frameno,
long long *  pNextFrame 
)
overridevirtual

Implements FrameAnalyzer.

Definition at line 141 of file SceneChangeDetector.cpp.

◆ finished()

int SceneChangeDetector::finished ( long long  nframes,
bool  final 
)
override

Definition at line 157 of file SceneChangeDetector.cpp.

◆ reportTime()

int SceneChangeDetector::reportTime ( void  ) const
overridevirtual

Reimplemented from FrameAnalyzer.

Definition at line 200 of file SceneChangeDetector.cpp.

◆ GetMap()

FrameMap SceneChangeDetector::GetMap ( unsigned int  ) const
inlineoverridevirtual

Implements FrameAnalyzer.

Definition at line 32 of file SceneChangeDetector.h.

Referenced by CommDetector2::PrintFullMap().

◆ getChanges()

const FrameAnalyzer::FrameMap* SceneChangeDetector::getChanges ( void  ) const
inline

Definition at line 36 of file SceneChangeDetector.h.

Member Data Documentation

◆ m_histogramAnalyzer

std::shared_ptr<HistogramAnalyzer> SceneChangeDetector::m_histogramAnalyzer {nullptr}
private

Definition at line 48 of file SceneChangeDetector.h.

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

◆ m_fps

float SceneChangeDetector::m_fps {0.0F}
private

Definition at line 49 of file SceneChangeDetector.h.

Referenced by finished(), and MythPlayerInited().

◆ m_scData

std::vector<SceneChangeData> SceneChangeDetector::m_scData
private

Definition at line 52 of file SceneChangeDetector.h.

Referenced by finished(), and MythPlayerInited().

◆ m_scDiff

std::vector<uint16_t> SceneChangeDetector::m_scDiff
private

Definition at line 53 of file SceneChangeDetector.h.

Referenced by finished(), and MythPlayerInited().

◆ m_changeMap

FrameAnalyzer::FrameMap SceneChangeDetector::m_changeMap
private

Definition at line 55 of file SceneChangeDetector.h.

Referenced by finished(), getChanges(), and GetMap().

◆ m_debugLevel

int SceneChangeDetector::m_debugLevel {0}
private

Definition at line 58 of file SceneChangeDetector.h.

Referenced by finished(), and SceneChangeDetector().

◆ m_debugData

QString SceneChangeDetector::m_debugData
private

Definition at line 59 of file SceneChangeDetector.h.

Referenced by finished().

◆ m_debugSceneChange

bool SceneChangeDetector::m_debugSceneChange {false}
private

Definition at line 60 of file SceneChangeDetector.h.

Referenced by finished(), and SceneChangeDetector().

◆ m_sceneChangeDone

bool SceneChangeDetector::m_sceneChangeDone {false}
private

Definition at line 61 of file SceneChangeDetector.h.

Referenced by finished().


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