MythTV  master
Classes | Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
ClassicCommDetector Class Reference

#include <mythcommflag/ClassicCommDetector.h>

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

Classes

struct  FrameBlock
 

Public Slots

void sceneChangeDetectorHasNewInformation (unsigned int framenum, bool isSceneChange, float debugValue)
 

Public Member Functions

 ClassicCommDetector (SkipType commDetectMethod, bool showProgress, bool fullSpeed, MythCommFlagPlayer *player, QDateTime startedAt_in, QDateTime stopsAt_in, QDateTime recordingStartedAt_in, QDateTime recordingStopsAt_in)
 
virtual void deleteLater (void)
 
bool go () override
 
void GetCommercialBreakList (frm_dir_map_t &marks) override
 
void recordingFinished (long long totalFileSize) override
 
void requestCommBreakMapUpdate (void) override
 
void PrintFullMap (std::ostream &out, const frm_dir_map_t *comm_breaks, bool verbose) const override
 
void logoDetectorBreathe ()
 
- Public Member Functions inherited from CommDetectorBase
 CommDetectorBase ()=default
 
void stop ()
 
void pause ()
 
void resume ()
 
virtual void recordingFinished ([[maybe_unused]] long long totalFileSize)
 

Protected Member Functions

 ~ClassicCommDetector () override=default
 
void Init ()
 
void SetVideoParams (float aspect)
 
void ProcessFrame (MythVideoFrame *frame, long long frame_number)
 
- Protected Member Functions inherited from CommDetectorBase
 ~CommDetectorBase () override=default
 

Protected Attributes

MythCommFlagPlayerm_player {nullptr}
 
QDateTime m_startedAt
 
QDateTime m_stopsAt
 
QDateTime m_recordingStartedAt
 
QDateTime m_recordingStopsAt
 
bool m_aggressiveDetection {false}
 
bool m_stillRecording {false}
 
bool m_fullSpeed {false}
 
bool m_showProgress {false}
 
double m_fps {0.0}
 
uint64_t m_framesProcessed {0}
 
long long m_preRoll {0}
 
long long m_postRoll {0}
 
QMap< long long, FrameInfoEntrym_frameInfo
 
- Protected Attributes inherited from CommDetectorBase
bool m_bPaused { false }
 
bool m_bStop { false }
 

Private Member Functions

template<typename T >
QString FormatMsg (T first, const FrameBlock *fbp)
 
void ClearAllMaps (void)
 
void GetBlankCommMap (frm_dir_map_t &comms)
 
void GetBlankCommBreakMap (frm_dir_map_t &comms)
 
void GetSceneChangeMap (frm_dir_map_t &scenes, int64_t start_frame)
 
frm_dir_map_t Combine2Maps (const frm_dir_map_t &a, const frm_dir_map_t &b) const
 
void BuildAllMethodsCommList (void)
 
void BuildBlankFrameCommList (void)
 
void BuildSceneChangeCommList (void)
 
void BuildLogoCommList ()
 
void MergeBlankCommList (void)
 
bool FrameIsInBreakMap (uint64_t f, const frm_dir_map_t &breakMap) const
 
void DumpMap (frm_dir_map_t &map) const
 
void CleanupFrameInfo (void)
 
void GetLogoCommBreakMap (show_map_t &map)
 

Static Private Member Functions

static void UpdateFrameBlock (FrameBlock *fbp, const FrameInfoEntry &finfo, int format, int aspect)
 
static void CondenseMarkMap (show_map_t &map, int spacing, int length)
 
static void ConvertShowMapToCommMap (frm_dir_map_t &out, const show_map_t &in)
 

Private Attributes

SkipType m_commDetectMethod
 
frm_dir_map_t m_lastSentCommBreakMap
 
bool m_commBreakMapUpdateRequested {false}
 
bool m_sendCommBreakMapUpdates {false}
 
int m_commDetectBorder {0}
 
int m_commDetectBlankFrameMaxDiff {25}
 
int m_commDetectDarkBrightness {80}
 
int m_commDetectDimBrightness {120}
 
int m_commDetectBoxBrightness {30}
 
int m_commDetectDimAverage {35}
 
int m_commDetectMaxCommBreakLength {395}
 
int m_commDetectMinCommBreakLength {60}
 
int m_commDetectMinShowLength {65}
 
int m_commDetectMaxCommLength {125}
 
bool m_commDetectBlankCanHaveLogo {true}
 
bool m_verboseDebugging {false}
 
long long m_lastFrameNumber {0}
 
long long m_curFrameNumber {0}
 
int m_width {0}
 
int m_height {0}
 
int m_horizSpacing {0}
 
int m_vertSpacing {0}
 
bool m_blankFramesOnly {false}
 
int m_blankFrameCount {0}
 
int m_currentAspect {0}
 
int m_totalMinBrightness {0}
 
bool m_logoInfoAvailable {false}
 
LogoDetectorBasem_logoDetector {nullptr}
 
frm_dir_map_t m_blankFrameMap
 
frm_dir_map_t m_blankCommMap
 
frm_dir_map_t m_blankCommBreakMap
 
frm_dir_map_t m_sceneMap
 
frm_dir_map_t m_sceneCommBreakMap
 
frm_dir_map_t m_commBreakMap
 
frm_dir_map_t m_logoCommBreakMap
 
bool m_frameIsBlank {false}
 
bool m_stationLogoPresent {false}
 
bool m_decoderFoundAspectChanges {false}
 
SceneChangeDetectorBasem_sceneChangeDetector {nullptr}
 

Friends

class ClassicLogoDetector
 

Additional Inherited Members

- Signals inherited from CommDetectorBase
void statusUpdate (const QString &a)
 
void gotNewCommercialBreakList ()
 
void breathe ()
 

Detailed Description

Definition at line 47 of file ClassicCommDetector.h.

Constructor & Destructor Documentation

◆ ClassicCommDetector()

ClassicCommDetector::ClassicCommDetector ( SkipType  commDetectMethod,
bool  showProgress,
bool  fullSpeed,
MythCommFlagPlayer player,
QDateTime  startedAt_in,
QDateTime  stopsAt_in,
QDateTime  recordingStartedAt_in,
QDateTime  recordingStopsAt_in 
)

Definition at line 120 of file ClassicCommDetector.cpp.

◆ ~ClassicCommDetector()

ClassicCommDetector::~ClassicCommDetector ( )
overrideprotecteddefault

Member Function Documentation

◆ deleteLater()

void ClassicCommDetector::deleteLater ( void  )
virtual

Definition at line 270 of file ClassicCommDetector.cpp.

◆ go()

bool ClassicCommDetector::go ( )
overridevirtual

Implements CommDetectorBase.

Reimplemented in PrePostRollFlagger.

Definition at line 281 of file ClassicCommDetector.cpp.

◆ GetCommercialBreakList()

void ClassicCommDetector::GetCommercialBreakList ( frm_dir_map_t marks)
overridevirtual

Implements CommDetectorBase.

Reimplemented in PrePostRollFlagger.

Definition at line 625 of file ClassicCommDetector.cpp.

Referenced by go().

◆ recordingFinished()

void ClassicCommDetector::recordingFinished ( long long  totalFileSize)
override

Definition at line 697 of file ClassicCommDetector.cpp.

◆ requestCommBreakMapUpdate()

void ClassicCommDetector::requestCommBreakMapUpdate ( void  )
overridevirtual

Reimplemented from CommDetectorBase.

Definition at line 702 of file ClassicCommDetector.cpp.

◆ PrintFullMap()

void ClassicCommDetector::PrintFullMap ( std::ostream &  out,
const frm_dir_map_t comm_breaks,
bool  verbose 
) const
overridevirtual

Implements CommDetectorBase.

Definition at line 2479 of file ClassicCommDetector.cpp.

◆ logoDetectorBreathe()

void ClassicCommDetector::logoDetectorBreathe ( )

Definition at line 2474 of file ClassicCommDetector.cpp.

Referenced by ClassicLogoDetector::searchForLogo().

◆ FormatMsg()

template<typename T >
QString ClassicCommDetector::FormatMsg ( first,
const FrameBlock fbp 
)
inlineprivate

Definition at line 94 of file ClassicCommDetector.h.

Referenced by BuildAllMethodsCommList().

◆ ClearAllMaps()

void ClassicCommDetector::ClearAllMaps ( void  )
private

Definition at line 990 of file ClassicCommDetector.cpp.

Referenced by Init().

◆ GetBlankCommMap()

void ClassicCommDetector::GetBlankCommMap ( frm_dir_map_t comms)
private

Definition at line 1003 of file ClassicCommDetector.cpp.

◆ GetBlankCommBreakMap()

void ClassicCommDetector::GetBlankCommBreakMap ( frm_dir_map_t comms)
private

Definition at line 1013 of file ClassicCommDetector.cpp.

◆ GetSceneChangeMap()

void ClassicCommDetector::GetSceneChangeMap ( frm_dir_map_t scenes,
int64_t  start_frame 
)
private

Definition at line 1023 of file ClassicCommDetector.cpp.

◆ Combine2Maps()

frm_dir_map_t ClassicCommDetector::Combine2Maps ( const frm_dir_map_t a,
const frm_dir_map_t b 
) const
private

Definition at line 1038 of file ClassicCommDetector.cpp.

Referenced by GetCommercialBreakList().

◆ UpdateFrameBlock()

void ClassicCommDetector::UpdateFrameBlock ( FrameBlock fbp,
const FrameInfoEntry finfo,
int  format,
int  aspect 
)
staticprivate

Definition at line 1137 of file ClassicCommDetector.cpp.

Referenced by BuildAllMethodsCommList().

◆ BuildAllMethodsCommList()

void ClassicCommDetector::BuildAllMethodsCommList ( void  )
private

Definition at line 1161 of file ClassicCommDetector.cpp.

Referenced by GetCommercialBreakList().

◆ BuildBlankFrameCommList()

void ClassicCommDetector::BuildBlankFrameCommList ( void  )
private

◆ BuildSceneChangeCommList()

void ClassicCommDetector::BuildSceneChangeCommList ( void  )
private

Definition at line 2019 of file ClassicCommDetector.cpp.

Referenced by GetCommercialBreakList().

◆ BuildLogoCommList()

void ClassicCommDetector::BuildLogoCommList ( )
private

Definition at line 2120 of file ClassicCommDetector.cpp.

Referenced by GetCommercialBreakList().

◆ MergeBlankCommList()

void ClassicCommDetector::MergeBlankCommList ( void  )
private

Definition at line 2134 of file ClassicCommDetector.cpp.

Referenced by BuildBlankFrameCommList().

◆ FrameIsInBreakMap()

bool ClassicCommDetector::FrameIsInBreakMap ( uint64_t  f,
const frm_dir_map_t breakMap 
) const
private

Definition at line 2199 of file ClassicCommDetector.cpp.

Referenced by Combine2Maps().

◆ DumpMap()

void ClassicCommDetector::DumpMap ( frm_dir_map_t map) const
private

Definition at line 2231 of file ClassicCommDetector.cpp.

◆ CondenseMarkMap()

void ClassicCommDetector::CondenseMarkMap ( show_map_t map,
int  spacing,
int  length 
)
staticprivate

Definition at line 2258 of file ClassicCommDetector.cpp.

Referenced by BuildLogoCommList().

◆ ConvertShowMapToCommMap()

void ClassicCommDetector::ConvertShowMapToCommMap ( frm_dir_map_t out,
const show_map_t in 
)
staticprivate

Definition at line 2323 of file ClassicCommDetector.cpp.

Referenced by BuildLogoCommList().

◆ CleanupFrameInfo()

void ClassicCommDetector::CleanupFrameInfo ( void  )
private

Definition at line 2364 of file ClassicCommDetector.cpp.

Referenced by GetCommercialBreakList().

◆ GetLogoCommBreakMap()

void ClassicCommDetector::GetLogoCommBreakMap ( show_map_t map)
private

Definition at line 2452 of file ClassicCommDetector.cpp.

Referenced by BuildLogoCommList().

◆ Init()

void ClassicCommDetector::Init ( )
protected

Definition at line 163 of file ClassicCommDetector.cpp.

Referenced by go(), and PrePostRollFlagger::Init().

◆ SetVideoParams()

void ClassicCommDetector::SetVideoParams ( float  aspect)
protected

◆ ProcessFrame()

void ClassicCommDetector::ProcessFrame ( MythVideoFrame frame,
long long  frame_number 
)
protected

Definition at line 746 of file ClassicCommDetector.cpp.

Referenced by PrePostRollFlagger::findBreakInrange(), and go().

◆ sceneChangeDetectorHasNewInformation

void ClassicCommDetector::sceneChangeDetectorHasNewInformation ( unsigned int  framenum,
bool  isSceneChange,
float  debugValue 
)
slot

Definition at line 608 of file ClassicCommDetector.cpp.

Referenced by Init().

Friends And Related Function Documentation

◆ ClassicLogoDetector

friend class ClassicLogoDetector
friend

Definition at line 71 of file ClassicCommDetector.h.

Referenced by go().

Member Data Documentation

◆ m_commDetectMethod

SkipType ClassicCommDetector::m_commDetectMethod
private

Definition at line 136 of file ClassicCommDetector.h.

Referenced by GetCommercialBreakList(), go(), Init(), and ProcessFrame().

◆ m_lastSentCommBreakMap

frm_dir_map_t ClassicCommDetector::m_lastSentCommBreakMap
private

Definition at line 137 of file ClassicCommDetector.h.

Referenced by go(), and Init().

◆ m_commBreakMapUpdateRequested

bool ClassicCommDetector::m_commBreakMapUpdateRequested {false}
private

Definition at line 138 of file ClassicCommDetector.h.

Referenced by go(), and requestCommBreakMapUpdate().

◆ m_sendCommBreakMapUpdates

bool ClassicCommDetector::m_sendCommBreakMapUpdates {false}
private

Definition at line 139 of file ClassicCommDetector.h.

Referenced by go(), and requestCommBreakMapUpdate().

◆ m_commDetectBorder

int ClassicCommDetector::m_commDetectBorder {0}
private

Definition at line 141 of file ClassicCommDetector.h.

Referenced by Init(), and ProcessFrame().

◆ m_commDetectBlankFrameMaxDiff

int ClassicCommDetector::m_commDetectBlankFrameMaxDiff {25}
private

Definition at line 142 of file ClassicCommDetector.h.

Referenced by ClassicCommDetector(), and ProcessFrame().

◆ m_commDetectDarkBrightness

int ClassicCommDetector::m_commDetectDarkBrightness {80}
private

Definition at line 143 of file ClassicCommDetector.h.

Referenced by ClassicCommDetector(), and ProcessFrame().

◆ m_commDetectDimBrightness

int ClassicCommDetector::m_commDetectDimBrightness {120}
private

Definition at line 144 of file ClassicCommDetector.h.

Referenced by ClassicCommDetector(), and ProcessFrame().

◆ m_commDetectBoxBrightness

int ClassicCommDetector::m_commDetectBoxBrightness {30}
private

Definition at line 145 of file ClassicCommDetector.h.

Referenced by ClassicCommDetector(), and ProcessFrame().

◆ m_commDetectDimAverage

int ClassicCommDetector::m_commDetectDimAverage {35}
private

Definition at line 146 of file ClassicCommDetector.h.

Referenced by ClassicCommDetector(), and ProcessFrame().

◆ m_commDetectMaxCommBreakLength

int ClassicCommDetector::m_commDetectMaxCommBreakLength {395}
private

Definition at line 147 of file ClassicCommDetector.h.

Referenced by BuildAllMethodsCommList(), and ClassicCommDetector().

◆ m_commDetectMinCommBreakLength

int ClassicCommDetector::m_commDetectMinCommBreakLength {60}
private

Definition at line 148 of file ClassicCommDetector.h.

Referenced by BuildAllMethodsCommList(), and ClassicCommDetector().

◆ m_commDetectMinShowLength

int ClassicCommDetector::m_commDetectMinShowLength {65}
private

Definition at line 149 of file ClassicCommDetector.h.

Referenced by BuildAllMethodsCommList(), and ClassicCommDetector().

◆ m_commDetectMaxCommLength

int ClassicCommDetector::m_commDetectMaxCommLength {125}
private

Definition at line 150 of file ClassicCommDetector.h.

Referenced by BuildAllMethodsCommList(), and ClassicCommDetector().

◆ m_commDetectBlankCanHaveLogo

bool ClassicCommDetector::m_commDetectBlankCanHaveLogo {true}
private

Definition at line 151 of file ClassicCommDetector.h.

Referenced by ClassicCommDetector(), and ProcessFrame().

◆ m_verboseDebugging

bool ClassicCommDetector::m_verboseDebugging {false}
private

Definition at line 153 of file ClassicCommDetector.h.

Referenced by BuildAllMethodsCommList(), Init(), and ProcessFrame().

◆ m_lastFrameNumber

long long ClassicCommDetector::m_lastFrameNumber {0}
private

Definition at line 155 of file ClassicCommDetector.h.

Referenced by Init(), and ProcessFrame().

◆ m_curFrameNumber

long long ClassicCommDetector::m_curFrameNumber {0}
private

Definition at line 156 of file ClassicCommDetector.h.

Referenced by Init(), PrintFullMap(), ProcessFrame(), and SetVideoParams().

◆ m_width

int ClassicCommDetector::m_width {0}
private

Definition at line 158 of file ClassicCommDetector.h.

Referenced by go(), Init(), and ProcessFrame().

◆ m_height

int ClassicCommDetector::m_height {0}
private

Definition at line 159 of file ClassicCommDetector.h.

Referenced by go(), Init(), and ProcessFrame().

◆ m_horizSpacing

int ClassicCommDetector::m_horizSpacing {0}
private

Definition at line 160 of file ClassicCommDetector.h.

Referenced by Init(), and ProcessFrame().

◆ m_vertSpacing

int ClassicCommDetector::m_vertSpacing {0}
private

Definition at line 161 of file ClassicCommDetector.h.

Referenced by Init(), and ProcessFrame().

◆ m_blankFramesOnly

bool ClassicCommDetector::m_blankFramesOnly {false}
private

Definition at line 162 of file ClassicCommDetector.h.

◆ m_blankFrameCount

int ClassicCommDetector::m_blankFrameCount {0}
private

◆ m_currentAspect

int ClassicCommDetector::m_currentAspect {0}
private

Definition at line 164 of file ClassicCommDetector.h.

Referenced by Init(), ProcessFrame(), and SetVideoParams().

◆ m_totalMinBrightness

int ClassicCommDetector::m_totalMinBrightness {0}
private

Definition at line 167 of file ClassicCommDetector.h.

Referenced by Init(), and ProcessFrame().

◆ m_logoInfoAvailable

bool ClassicCommDetector::m_logoInfoAvailable {false}
private

Definition at line 169 of file ClassicCommDetector.h.

Referenced by BuildAllMethodsCommList(), go(), Init(), and ProcessFrame().

◆ m_logoDetector

LogoDetectorBase* ClassicCommDetector::m_logoDetector {nullptr}
private

Definition at line 170 of file ClassicCommDetector.h.

Referenced by deleteLater(), go(), and ProcessFrame().

◆ m_blankFrameMap

frm_dir_map_t ClassicCommDetector::m_blankFrameMap
private

◆ m_blankCommMap

frm_dir_map_t ClassicCommDetector::m_blankCommMap
private

◆ m_blankCommBreakMap

frm_dir_map_t ClassicCommDetector::m_blankCommBreakMap
private

◆ m_sceneMap

frm_dir_map_t ClassicCommDetector::m_sceneMap
private

◆ m_sceneCommBreakMap

frm_dir_map_t ClassicCommDetector::m_sceneCommBreakMap
private

◆ m_commBreakMap

frm_dir_map_t ClassicCommDetector::m_commBreakMap
private

◆ m_logoCommBreakMap

frm_dir_map_t ClassicCommDetector::m_logoCommBreakMap
private

Definition at line 178 of file ClassicCommDetector.h.

Referenced by BuildLogoCommList(), and GetCommercialBreakList().

◆ m_frameIsBlank

bool ClassicCommDetector::m_frameIsBlank {false}
private

Definition at line 180 of file ClassicCommDetector.h.

Referenced by Init(), and ProcessFrame().

◆ m_stationLogoPresent

bool ClassicCommDetector::m_stationLogoPresent {false}
private

Definition at line 181 of file ClassicCommDetector.h.

Referenced by Init(), and ProcessFrame().

◆ m_decoderFoundAspectChanges

bool ClassicCommDetector::m_decoderFoundAspectChanges {false}
private

Definition at line 183 of file ClassicCommDetector.h.

Referenced by BuildAllMethodsCommList(), Init(), and SetVideoParams().

◆ m_sceneChangeDetector

SceneChangeDetectorBase* ClassicCommDetector::m_sceneChangeDetector {nullptr}
private

Definition at line 185 of file ClassicCommDetector.h.

Referenced by deleteLater(), Init(), and ProcessFrame().

◆ m_player

MythCommFlagPlayer* ClassicCommDetector::m_player {nullptr}
protected

◆ m_startedAt

QDateTime ClassicCommDetector::m_startedAt
protected

Definition at line 189 of file ClassicCommDetector.h.

Referenced by PrePostRollFlagger::go(), go(), and Init().

◆ m_stopsAt

QDateTime ClassicCommDetector::m_stopsAt
protected

Definition at line 190 of file ClassicCommDetector.h.

Referenced by Init().

◆ m_recordingStartedAt

QDateTime ClassicCommDetector::m_recordingStartedAt
protected

◆ m_recordingStopsAt

QDateTime ClassicCommDetector::m_recordingStopsAt
protected

Definition at line 192 of file ClassicCommDetector.h.

Referenced by PrePostRollFlagger::go(), go(), and Init().

◆ m_aggressiveDetection

bool ClassicCommDetector::m_aggressiveDetection {false}
protected

◆ m_stillRecording

bool ClassicCommDetector::m_stillRecording {false}
protected

◆ m_fullSpeed

bool ClassicCommDetector::m_fullSpeed {false}
protected

◆ m_showProgress

bool ClassicCommDetector::m_showProgress {false}
protected

◆ m_fps

double ClassicCommDetector::m_fps {0.0}
protected

◆ m_framesProcessed

uint64_t ClassicCommDetector::m_framesProcessed {0}
protected

◆ m_preRoll

long long ClassicCommDetector::m_preRoll {0}
protected

◆ m_postRoll

long long ClassicCommDetector::m_postRoll {0}
protected

◆ m_frameInfo

QMap<long long, FrameInfoEntry> ClassicCommDetector::m_frameInfo
protected

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