QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
VideoStreamStats Struct Reference

#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

Detailed Description

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.

Member Function Documentation

◆ degraded()

bool VideoStreamStats::degraded ( double cameraFps) const
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.

◆ hasRtpStats()

bool VideoStreamStats::hasRtpStats ( ) const
inline

Definition at line 47 of file VideoStreamStats.h.

References packetsLost.

◆ operator==()

bool VideoStreamStats::operator== ( const VideoStreamStats & ) const
default

Member Data Documentation

◆ bitrateKbps

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().

◆ codec

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().

◆ decoder

QString VideoStreamStats::decoder

The decoder's element factory, e.g. "avdec_h264".

Definition at line 77 of file VideoStreamStats.h.

Referenced by PipelineSession::sampleStats().

◆ decoderRestarts

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().

◆ droppedFps

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().

◆ fps

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().

◆ framesDropped

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().

◆ gpuFallbacks

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().

◆ gpuPath

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().

◆ hardwareDecoder

bool VideoStreamStats::hardwareDecoder = false

Definition at line 78 of file VideoStreamStats.h.

Referenced by PipelineSession::sampleStats().

◆ jitterMs

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().

◆ keyframeIntervalMs

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().

◆ latencyMs

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().

◆ lossPercent

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().

◆ packetsDuplicate

qint64 VideoStreamStats::packetsDuplicate = -1

Definition at line 94 of file VideoStreamStats.h.

Referenced by PipelineStatsProbe::sample().

◆ packetsLate

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().

◆ packetsLost

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().

◆ reconnects

int VideoStreamStats::reconnects = 0

Since the stream was started or restarted: reconnects after the stream failed.

Definition at line 101 of file VideoStreamStats.h.

◆ recordingBytes

qint64 VideoStreamStats::recordingBytes = -1

Definition at line 104 of file VideoStreamStats.h.

◆ recordingMs

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.

◆ rtxRecovered

qint64 VideoStreamStats::rtxRecovered = -1

Definition at line 97 of file VideoStreamStats.h.

Referenced by PipelineStatsProbe::sample().

◆ rtxRequested

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().

◆ uptimeMs

qint64 VideoStreamStats::uptimeMs = 0

Since the stream last connected.

Definition at line 99 of file VideoStreamStats.h.

◆ valid

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().


The documentation for this struct was generated from the following file: