MythTV  master
CommDetectorBase.h
Go to the documentation of this file.
1 #ifndef _CommDetectorBase_H_
2 #define _CommDetectorBase_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:
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) ;
49  void gotNewCommercialBreakList();
50  void breathe();
51 
52 protected:
53  ~CommDetectorBase() = default;
54  bool m_bPaused;
55  bool m_bStop;
56 
57 };
58 
59 #endif
60 
61 
62 /* vim: set expandtab tabstop=4 shiftwidth=4: */
virtual void requestCommBreakMapUpdate(void)
Abstract base class for all CommDetectors.
CommMapValue
virtual void recordingFinished(long long totalFileSize)
QMap< uint64_t, CommMapValue > show_map_t
QMap< uint64_t, MarkTypes > frm_dir_map_t
Frame # -> Mark map.
Definition: programtypes.h:81