1#ifndef CLASSIC_COMMDETECTOR_H
2#define CLASSIC_COMMDETECTOR_H
11#include <QElapsedTimer>
54 QDateTime startedAt_in,
56 QDateTime recordingStartedAt_in,
57 QDateTime recordingStopsAt_in);
96 QString msgformat(
"%1 %2:%3 %4 %5 %6 %7 %8 %9 %10 %11 %12 %13 %14 %15");
97 return msgformat.arg(first, 5)
99 .arg((
int)((fbp->
start /
m_fps )) % 60, 2, 10, QChar(
'0'))
103 .arg(fbp->
length, 7,
'f', 2)
108 .arg(fbp->
scRate, 5,
'f', 2)
118 int64_t start_frame);
122 int format,
int aspect);
@ COMM_FRAME_RATING_SYMBOL
@ COMM_FRAME_LOGO_PRESENT
@ COMM_FRAME_ASPECT_CHANGE
@ COMM_FRAME_SCENE_CHANGE
QMap< uint64_t, CommMapValue > show_map_t
frm_dir_map_t m_blankFrameMap
static void ConvertShowMapToCommMap(frm_dir_map_t &out, const show_map_t &in)
uint64_t m_framesProcessed
ClassicCommDetector(SkipType commDetectMethod, bool showProgress, bool fullSpeed, MythCommFlagPlayer *player, QDateTime startedAt_in, QDateTime stopsAt_in, QDateTime recordingStartedAt_in, QDateTime recordingStopsAt_in)
QMap< long long, FrameInfoEntry > m_frameInfo
void GetCommercialBreakList(frm_dir_map_t &marks) override
frm_dir_map_t m_commBreakMap
void MergeBlankCommList(void)
static void CondenseMarkMap(show_map_t &map, int spacing, int length)
frm_dir_map_t m_sceneCommBreakMap
QDateTime m_recordingStopsAt
bool m_commBreakMapUpdateRequested
void GetLogoCommBreakMap(show_map_t &map)
void GetBlankCommMap(frm_dir_map_t &comms)
void sceneChangeDetectorHasNewInformation(unsigned int framenum, bool isSceneChange, float debugValue)
void ProcessFrame(MythVideoFrame *frame, long long frame_number)
void PrintFullMap(std::ostream &out, const frm_dir_map_t *comm_breaks, bool verbose) const override
virtual void deleteLater(void)
bool m_sendCommBreakMapUpdates
int m_commDetectMinShowLength
void BuildAllMethodsCommList(void)
int m_commDetectDarkBrightness
frm_dir_map_t m_blankCommMap
frm_dir_map_t m_blankCommBreakMap
int m_commDetectBoxBrightness
long long m_curFrameNumber
SkipType m_commDetectMethod
bool m_stationLogoPresent
long long m_lastFrameNumber
void requestCommBreakMapUpdate(void) override
void BuildBlankFrameCommList(void)
frm_dir_map_t m_logoCommBreakMap
void logoDetectorBreathe()
bool m_decoderFoundAspectChanges
void SetVideoParams(float aspect)
void GetBlankCommBreakMap(frm_dir_map_t &comms)
int m_commDetectMaxCommBreakLength
int m_commDetectMinCommBreakLength
bool m_aggressiveDetection
LogoDetectorBase * m_logoDetector
frm_dir_map_t m_lastSentCommBreakMap
void CleanupFrameInfo(void)
void DumpMap(frm_dir_map_t &map) const
int m_commDetectBlankFrameMaxDiff
int m_commDetectDimAverage
int m_commDetectMaxCommLength
QDateTime m_recordingStartedAt
bool m_commDetectBlankCanHaveLogo
QString FormatMsg(T first, const FrameBlock *fbp)
void recordingFinished(long long totalFileSize) override
void GetSceneChangeMap(frm_dir_map_t &scenes, int64_t start_frame)
void BuildSceneChangeCommList(void)
int m_commDetectDimBrightness
~ClassicCommDetector() override=default
static void UpdateFrameBlock(FrameBlock *fbp, const FrameInfoEntry &finfo, int format, int aspect)
MythCommFlagPlayer * m_player
SceneChangeDetectorBase * m_sceneChangeDetector
frm_dir_map_t Combine2Maps(const frm_dir_map_t &a, const frm_dir_map_t &b) const
bool FrameIsInBreakMap(uint64_t f, const frm_dir_map_t &breakMap) const
Abstract base class for all CommDetectors.
static QString GetHeader(void)
QString toString(uint64_t frame, bool verbose) const
SkipType
This is used as a bitmask.
QMap< uint64_t, MarkTypes > frm_dir_map_t
Frame # -> Mark map.