9 : _supervisor(supervisor)
10 , _meter(std::move(clock))
22 stats.uptimeMs = _supervisor.uptime().count();
23 stats.reconnects = _supervisor.reconnects();
24 const qint64 recordingMs = recording ? recording->
recordingMs() : -1;
25 stats.recordingMs = recordingMs;
27 if (!_meter.update(counters,
stats)) {
30 return _publish(
stats);
35 if (
stats == _stats) {
What a receiver was asked to record, across the sessions reconnects start and the hours it runs for.
qint64 recordingMs(Clock::time_point now=Clock::now()) const
For VideoStreamStats::recordingMs: since the first part got its first frame; -1 before.
qint64 bytesWritten() const
For VideoStreamStats::recordingBytes: what the parts' files held when they closed,...
The reconnect policy both receivers share: the phase a stream is in, when a failed one connects again...
std::function< qint64()> Clock
Monotonic milliseconds.
bool reset()
A session ended: the rates start over and the stats go invalid. True when that changed them.
bool sample(const VideoStreamStatsMeter::Counters &counters, VideoStreamStats stats, const RecordingPlan *recording)
const VideoStreamStats & stats() const
The stats the last sample() or reset() produced.
VideoStreamStatsSampler(const StreamSupervisor &supervisor, VideoStreamStatsMeter::Clock clock={})