MythTV
master
mythtv
libs
libmythtv
recordingquality.h
Go to the documentation of this file.
1
// -*- Mode: c++ -*-
2
#ifndef RECORDING_QUALITY_H
3
#define RECORDING_QUALITY_H
4
5
#include <QDateTime>
6
#include <QList>
7
#include <utility>
8
9
10
#include "
mythtvexp.h
"
11
12
class
RecordingInfo
;
13
14
class
RecordingGap
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
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
34
class
MTV_PUBLIC
RecordingQuality
35
{
36
public
:
37
RecordingQuality
(
const
RecordingInfo
*ri,
38
RecordingGaps
rg);
39
RecordingQuality
(
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};
52
RecordingGaps
m_recordingGaps
;
53
};
54
55
#endif // RECORDING_QUALITY_H
RecordingQuality::m_recordingGaps
RecordingGaps m_recordingGaps
Definition:
recordingquality.h:52
RecordingInfo
Holds information on a TV Program one might wish to record.
Definition:
recordinginfo.h:35
mythtvexp.h
RecordingGap::operator<
bool operator<(const RecordingGap &o) const
Definition:
recordingquality.h:27
RecordingGap::RecordingGap
RecordingGap(QDateTime start, QDateTime end)
Definition:
recordingquality.h:17
RecordingGap::GetStart
QDateTime GetStart(void) const
Definition:
recordingquality.h:19
RecordingGap::m_end
QDateTime m_end
Definition:
recordingquality.h:30
RecordingGap::m_start
QDateTime m_start
Definition:
recordingquality.h:29
RecordingQuality::m_programKey
QString m_programKey
Definition:
recordingquality.h:50
RecordingQuality
Definition:
recordingquality.h:34
RecordingGap::GetEnd
QDateTime GetEnd(void) const
Definition:
recordingquality.h:20
RecordingGap::toString
QString toString(void) const
Definition:
recordingquality.h:21
MTV_PUBLIC
#define MTV_PUBLIC
Definition:
mythtvexp.h:15
RecordingGap
Definition:
recordingquality.h:14
MythDate::ISODate
@ ISODate
Default UTC.
Definition:
mythdate.h:17
RecordingGaps
QList< RecordingGap > RecordingGaps
Definition:
recordingquality.h:32
Generated on Mon Nov 25 2024 03:16:12 for MythTV by
1.8.17