#include <VideoStreamStats.h>
Public Member Functions | |
| bool | hasRtpStats () const |
| bool | degraded (double cameraFps) const |
| bool | operator== (const VideoStreamStats &) const =default |
Public Attributes | |
| bool | valid = false |
| Measured at least once for the current stream; the other fields mean nothing while false. | |
| double | fps = 0.0 |
| double | bitrateKbps = 0.0 |
| qint64 | framesDropped = 0 |
| Since the stream started: frames the display dropped to keep up with the stream. | |
| qint64 | packetsLost = -1 |
| RTP packets lost since the stream started. | |
| double | lossPercent = -1.0 |
| Share of the RTP packets due in the last interval that were lost. | |
| double | jitterMs = -1.0 |
| RTP interarrival jitter (RFC 3550), averaged over the last packets. | |
| double | latencyMs = -1.0 |
| The pipeline's minimum latency, the playout delay it adds on top of the network's. | |
| QString | decoder |
| The decoder's element factory, e.g. "avdec_h264". | |
| bool | hardwareDecoder = false |
| QString | gpuPath |
| QString | codec |
| "H.264", "H.265", ..., or a USB camera's capture format, such as "MJPEG" or "YUYV". | |
| double | droppedFps = 0.0 |
| Frames dropped per second in the last interval. | |
| qint64 | gpuFallbacks = 0 |
| Since the stream started: frames a zero-copy GPU path was tried for but the CPU delivered. | |
| qint64 | decoderRestarts = 0 |
| Since the stream started: times the decoder was replaced after an error or a stall. | |
| double | keyframeIntervalMs = -1.0 |
| Between keyframes, from their timestamps, averaged over the last few. | |
| qint64 | packetsLate = -1 |
| Since the stream started: RTP packets that arrived after their playout time, and duplicate RTP packets. | |
| qint64 | packetsDuplicate = -1 |
| qint64 | rtxRequested = -1 |
| Since the stream started: RTP retransmissions requested (RTSP), and how many arrived in time. | |
| qint64 | rtxRecovered = -1 |
| qint64 | uptimeMs = 0 |
| Since the stream last connected. | |
| int | reconnects = 0 |
| Since the stream was started or restarted: reconnects after the stream failed. | |
| qint64 | recordingMs = -1 |
| While recording: for how long, and the bytes written to its files so far. | |
| qint64 | recordingBytes = -1 |
One video stream's health, as its VideoReceiver (UVCStreamMonitor for a USB camera) measured it last: about once a second while it streams.
A field that doesn't apply to the stream is -1, which tells it apart from a measured zero: the RTP fields for a stream whose RTP packets nothing counts (MPEG-TS, Qt Multimedia), those only an RTP jitter buffer measures (late, duplicate and retransmitted packets) for a stream without one (UDP RTP in low-latency mode), latencyMs while the pipeline can't tell its latency, keyframeIntervalMs until two keyframes arrived and the recording fields while not recording. Strings are empty until known.
Definition at line 16 of file VideoStreamStats.h.
|
inline |
The stream is measured and falls short: it loses packets or drops frames now, or shows under three quarters of cameraFps, the frame rate its camera is set up for; 0 when that isn't known.
Definition at line 51 of file VideoStreamStats.h.
References droppedFps, fps, lossPercent, and valid.
|
inline |
Definition at line 47 of file VideoStreamStats.h.
References packetsLost.
|
default |
| double VideoStreamStats::bitrateKbps = 0.0 |
Compressed video received over the last few seconds, in kbit/s; -1 for a source that can't count it (Qt Multimedia's player, a USB camera).
Definition at line 65 of file VideoStreamStats.h.
Referenced by VideoStreamStatsMeter::update().
| QString VideoStreamStats::codec |
"H.264", "H.265", ..., or a USB camera's capture format, such as "MJPEG" or "YUYV".
Definition at line 83 of file VideoStreamStats.h.
Referenced by PipelineStatsProbe::sample().
| QString VideoStreamStats::decoder |
The decoder's element factory, e.g. "avdec_h264".
Definition at line 77 of file VideoStreamStats.h.
Referenced by PipelineSession::sampleStats().
| qint64 VideoStreamStats::decoderRestarts = 0 |
Since the stream started: times the decoder was replaced after an error or a stall.
Definition at line 89 of file VideoStreamStats.h.
Referenced by PipelineSession::sampleStats().
| double VideoStreamStats::droppedFps = 0.0 |
Frames dropped per second in the last interval.
Definition at line 85 of file VideoStreamStats.h.
Referenced by degraded(), and VideoStreamStatsMeter::update().
| double VideoStreamStats::fps = 0.0 |
Frames shown per second over the last few seconds: handed to the display and not replaced by a newer frame before it was shown.
Definition at line 62 of file VideoStreamStats.h.
Referenced by degraded(), and VideoStreamStatsMeter::update().
| qint64 VideoStreamStats::framesDropped = 0 |
Since the stream started: frames the display dropped to keep up with the stream.
Definition at line 67 of file VideoStreamStats.h.
Referenced by VideoStreamStatsMeter::update().
| qint64 VideoStreamStats::gpuFallbacks = 0 |
Since the stream started: frames a zero-copy GPU path was tried for but the CPU delivered.
Definition at line 87 of file VideoStreamStats.h.
Referenced by PipelineSession::sampleStats().
| QString VideoStreamStats::gpuPath |
How decoded frames reach the display: "CPU", or a zero-copy GPU path such as "DMABuf", "GL" or "D3D11". A USB camera's frames: "CPU" or "GPU".
Definition at line 81 of file VideoStreamStats.h.
Referenced by PipelineSession::sampleStats().
| bool VideoStreamStats::hardwareDecoder = false |
Definition at line 78 of file VideoStreamStats.h.
Referenced by PipelineSession::sampleStats().
| double VideoStreamStats::jitterMs = -1.0 |
RTP interarrival jitter (RFC 3550), averaged over the last packets.
Definition at line 73 of file VideoStreamStats.h.
Referenced by PipelineStatsProbe::sample().
| double VideoStreamStats::keyframeIntervalMs = -1.0 |
Between keyframes, from their timestamps, averaged over the last few.
Definition at line 91 of file VideoStreamStats.h.
Referenced by PipelineStatsProbe::sample().
| double VideoStreamStats::latencyMs = -1.0 |
The pipeline's minimum latency, the playout delay it adds on top of the network's.
Definition at line 75 of file VideoStreamStats.h.
Referenced by PipelineStatsProbe::sample().
| double VideoStreamStats::lossPercent = -1.0 |
Share of the RTP packets due in the last interval that were lost.
Definition at line 71 of file VideoStreamStats.h.
Referenced by degraded(), and VideoStreamStatsMeter::update().
| qint64 VideoStreamStats::packetsDuplicate = -1 |
Definition at line 94 of file VideoStreamStats.h.
Referenced by PipelineStatsProbe::sample().
| qint64 VideoStreamStats::packetsLate = -1 |
Since the stream started: RTP packets that arrived after their playout time, and duplicate RTP packets.
Definition at line 93 of file VideoStreamStats.h.
Referenced by PipelineStatsProbe::sample().
| qint64 VideoStreamStats::packetsLost = -1 |
RTP packets lost since the stream started.
Definition at line 69 of file VideoStreamStats.h.
Referenced by hasRtpStats(), and VideoStreamStatsMeter::update().
| int VideoStreamStats::reconnects = 0 |
Since the stream was started or restarted: reconnects after the stream failed.
Definition at line 101 of file VideoStreamStats.h.
| qint64 VideoStreamStats::recordingBytes = -1 |
Definition at line 104 of file VideoStreamStats.h.
| qint64 VideoStreamStats::recordingMs = -1 |
While recording: for how long, and the bytes written to its files so far.
Definition at line 103 of file VideoStreamStats.h.
| qint64 VideoStreamStats::rtxRecovered = -1 |
Definition at line 97 of file VideoStreamStats.h.
Referenced by PipelineStatsProbe::sample().
| qint64 VideoStreamStats::rtxRequested = -1 |
Since the stream started: RTP retransmissions requested (RTSP), and how many arrived in time.
Definition at line 96 of file VideoStreamStats.h.
Referenced by PipelineStatsProbe::sample().
| qint64 VideoStreamStats::uptimeMs = 0 |
Since the stream last connected.
Definition at line 99 of file VideoStreamStats.h.
| bool VideoStreamStats::valid = false |
Measured at least once for the current stream; the other fields mean nothing while false.
Definition at line 59 of file VideoStreamStats.h.
Referenced by degraded(), and VideoStreamStatsMeter::update().