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 using namespace std;
6 
7 #include <QObject>
8 #include <QMap>
9 
10 #include "programtypes.h"
11 
12 #define MAX_BLANK_FRAMES 180
13 
16  MARK_END = 1,
18 };
19 
20 using show_map_t = QMap<uint64_t, CommMapValue>;
21 
27 class CommDetectorBase : public QObject
28 {
29  Q_OBJECT
30 
31 public:
32  CommDetectorBase() = default;
33 
34  virtual bool go() = 0;
35  void stop();
36  void pause();
37  void resume();
38 
39  virtual void GetCommercialBreakList(frm_dir_map_t &comms) = 0;
40  virtual void recordingFinished(long long totalFileSize)
41  { (void)totalFileSize; };
42  virtual void requestCommBreakMapUpdate(void) {};
43 
44  virtual void PrintFullMap(
45  ostream &out, const frm_dir_map_t *comm_breaks, bool verbose) const = 0;
46 
47 signals:
48  void statusUpdate(const QString& a) ;
50  void breathe();
51 
52 protected:
53  ~CommDetectorBase() override = default;
54  bool m_bPaused { false };
55  bool m_bStop { false };
56 };
57 
58 #endif // COMMDETECTOR_BASE_H
59 
60 /* vim: set expandtab tabstop=4 shiftwidth=4: */
CommDetectorBase::CommDetectorBase
CommDetectorBase()=default
CommDetectorBase
Abstract base class for all CommDetectors. Please use the CommDetectFactory to make actual instances.
Definition: CommDetectorBase.h:28
show_map_t
QMap< uint64_t, CommMapValue > show_map_t
Definition: CommDetectorBase.h:20
CommDetectorBase::breathe
void breathe()
CommDetectorBase::PrintFullMap
virtual void PrintFullMap(ostream &out, const frm_dir_map_t *comm_breaks, bool verbose) const =0
CommDetectorBase::gotNewCommercialBreakList
void gotNewCommercialBreakList()
MARK_START
@ MARK_START
Definition: CommDetectorBase.h:15
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:40
MARK_END
@ MARK_END
Definition: CommDetectorBase.h:16
CommMapValue
CommMapValue
Definition: CommDetectorBase.h:14
CommDetectorBase::GetCommercialBreakList
virtual void GetCommercialBreakList(frm_dir_map_t &comms)=0
MARK_PRESENT
@ MARK_PRESENT
Definition: CommDetectorBase.h:17
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:42