MythTV  master
recordingquality.h
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 #ifndef _RECORDER_QUALITY_H_
3 #define _RECORDER_QUALITY_H_
4 
5 #include <QDateTime>
6 #include <QList>
7 #include <utility>
8 
9 
10 #include "mythtvexp.h"
11 
12 class RecordingInfo;
13 
15 {
16  public:
17  RecordingGap(QDateTime start, QDateTime end) :
18  m_start(std::move(start)), m_end(std::move(end)) { }
19  QDateTime GetStart(void) const { return m_start; }
20  QDateTime GetEnd(void) const { return m_end; }
21  QString toString(void) const
22  {
23  return QString("<<%1 to %2>>")
24  .arg(m_start.toString(Qt::ISODate))
25  .arg(m_end.toString(Qt::ISODate));
26  }
27  bool operator<(const RecordingGap &o) const { return m_start < o.m_start; }
28  private:
29  QDateTime m_start;
30  QDateTime m_end;
31 };
32 using RecordingGaps = QList<RecordingGap>;
33 
35 {
36  public:
38  RecordingGaps rg);
40  const RecordingInfo *ri, RecordingGaps rg,
41  const QDateTime &firstData, const QDateTime &latestData);
42 
43  void AddTSStatistics(int continuity_error_count, int packet_count);
44  bool IsDamaged(void) const;
45  QString toStringXML(void) const;
46 
47  private:
48  int m_continuityErrorCount {0};
49  int m_packetCount {0};
50  QString m_programKey;
51  double m_overallScore {1.0};
53 };
54 
55 #endif // _RECORDER_QUALITY_H_
QDateTime GetStart(void) const
QString toString(void) const
Holds information on a TV Program one might wish to record.
Definition: recordinginfo.h:34
QList< RecordingGap > RecordingGaps
RecordingGap(QDateTime start, QDateTime end)
#define MTV_PUBLIC
Definition: mythtvexp.h:15
QDateTime m_end
RecordingGaps m_recordingGaps
bool operator<(const RecordingGap &o) const
QDateTime GetEnd(void) const
QDateTime m_start
Default UTC.
Definition: mythdate.h:14