MythTV  master
CommDetectorBase.h
Go to the documentation of this file.
1 #ifndef COMMDETECTOR_BASE_H
2 #define COMMDETECTOR_BASE_H
3 
4 #include <iostream>
5 
6 #include <QObject>
7 #include <QMap>
8 
9 #include "programtypes.h"
10 
11 #define MAX_BLANK_FRAMES 180
12 
15  MARK_END = 1,
17 };
18 
19 using show_map_t = QMap<uint64_t, CommMapValue>;
20 
26 class CommDetectorBase : public QObject
27 {
28  Q_OBJECT
29 
30 public:
31  CommDetectorBase() = default;
32 
33  virtual bool go() = 0;
34  void stop();
35  void pause();
36  void resume();
37 
38  virtual void GetCommercialBreakList(frm_dir_map_t &comms) = 0;
39  virtual void recordingFinished(long long totalFileSize)
40  { (void)totalFileSize; };
41  virtual void requestCommBreakMapUpdate(void) {};
42 
43  virtual void PrintFullMap(
44  std::ostream &out, const frm_dir_map_t *comm_breaks, bool verbose) const = 0;
45 
46 signals:
47  void statusUpdate(const QString& a) ;
49  void breathe();
50 
51 protected:
52  ~CommDetectorBase() override = default;
53  bool m_bPaused { false };
54  bool m_bStop { false };
55 };
56 
57 #endif // COMMDETECTOR_BASE_H
58 
59 /* vim: set expandtab tabstop=4 shiftwidth=4: */
CommDetectorBase::CommDetectorBase
CommDetectorBase()=default
CommDetectorBase
Abstract base class for all CommDetectors.
Definition: CommDetectorBase.h:27
show_map_t
QMap< uint64_t, CommMapValue > show_map_t
Definition: CommDetectorBase.h:19
CommDetectorBase::m_bPaused
bool m_bPaused
Definition: CommDetectorBase.h:53
CommDetectorBase::breathe
void breathe()
CommDetectorBase::gotNewCommercialBreakList
void gotNewCommercialBreakList()
MARK_START
@ MARK_START
Definition: CommDetectorBase.h:14
CommDetectorBase::statusUpdate
void statusUpdate(const QString &a)
frm_dir_map_t
QMap< uint64_t, MarkTypes > frm_dir_map_t
Frame # -> Mark map.
Definition: programtypes.h:82
CommDetectorBase::go
virtual bool go()=0
programtypes.h
CommDetectorBase::recordingFinished
virtual void recordingFinished(long long totalFileSize)
Definition: CommDetectorBase.h:39
MARK_END
@ MARK_END
Definition: CommDetectorBase.h:15
CommDetectorBase::PrintFullMap
virtual void PrintFullMap(std::ostream &out, const frm_dir_map_t *comm_breaks, bool verbose) const =0
CommMapValue
CommMapValue
Definition: CommDetectorBase.h:13
CommDetectorBase::GetCommercialBreakList
virtual void GetCommercialBreakList(frm_dir_map_t &comms)=0
CommDetectorBase::m_bStop
bool m_bStop
Definition: CommDetectorBase.h:54
MARK_PRESENT
@ MARK_PRESENT
Definition: CommDetectorBase.h:16
CommDetectorBase::resume
void resume()
Definition: CommDetectorBase.cpp:13
CommDetectorBase::stop
void stop()
Definition: CommDetectorBase.cpp:3
CommDetectorBase::~CommDetectorBase
~CommDetectorBase() override=default
hardwareprofile.distros.mythtv_data.makeopts.verbose
verbose
Definition: makeopts.py:60
CommDetectorBase::requestCommBreakMapUpdate
virtual void requestCommBreakMapUpdate(void)
Definition: CommDetectorBase.h:41
CommDetectorBase::pause
void pause()
Definition: CommDetectorBase.cpp:8