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 
8 #include "mythtvexp.h"
9 
10 class RecordingInfo;
11 
13 {
14  public:
15  RecordingGap(const QDateTime &start, const QDateTime &end) :
16  m_start(start), m_end(end) { }
17  QDateTime GetStart(void) const { return m_start; }
18  QDateTime GetEnd(void) const { return m_end; }
19  QString toString(void) const
20  {
21  return QString("<<%1 to %2>>")
22  .arg(m_start.toString(Qt::ISODate))
23  .arg(m_end.toString(Qt::ISODate));
24  }
25  bool operator<(const RecordingGap &o) const { return m_start < o.m_start; }
26  private:
27  QDateTime m_start;
28  QDateTime m_end;
29 };
30 typedef QList<RecordingGap> RecordingGaps;
31 
33 {
34  public:
36  const RecordingGaps &rg);
38  const RecordingInfo*, const RecordingGaps&,
39  const QDateTime &firstData, const QDateTime &latestData);
40 
41  void AddTSStatistics(int continuity_error_count, int packet_count);
42  bool IsDamaged(void) const;
43  QString toStringXML(void) const;
44 
45  private:
46  int m_continuity_error_count {0};
47  int m_packet_count {0};
48  QString m_program_key;
49  double m_overall_score {1.0};
51 };
52 
53 #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
RecordingGaps m_recording_gaps
#define MTV_PUBLIC
Definition: mythtvexp.h:15
QDateTime m_end
bool operator<(const RecordingGap &o) const
RecordingGap(const QDateTime &start, const QDateTime &end)
QList< RecordingGap > RecordingGaps
QDateTime GetEnd(void) const
QDateTime m_start
Default UTC.
Definition: mythdate.h:14