pub struct ConnectionStats { /* private fields */ }Expand description
Connection and performance statistics for a receiver.
Connection count, frame counts, drop rates and queue depths, from
Receiver::connection_stats. These are native counter snapshots, not an
atomic view of connection, performance and queue state. Counters can reset
when a connection changes. Received totals include frames later dropped by
the receiver queue or processing; drops are not a count of lost network
packets or a measure of downstream playback quality. For interval rates,
reset the baseline when either counter decreases or the source/connection
is explicitly reset.
Implementations§
Source§impl ConnectionStats
impl ConnectionStats
Sourcepub const fn connections(&self) -> u32
pub const fn connections(&self) -> u32
The number of active connections.
Sourcepub const fn video_frames_received(&self) -> u64
pub const fn video_frames_received(&self) -> u64
The native total number of video frames received, including later drops.
Sourcepub const fn audio_frames_received(&self) -> u64
pub const fn audio_frames_received(&self) -> u64
The native total number of audio frames received, including later drops.
Sourcepub const fn metadata_frames_received(&self) -> u64
pub const fn metadata_frames_received(&self) -> u64
The native total number of metadata frames received, including later drops.
Sourcepub const fn video_frames_dropped(&self) -> u64
pub const fn video_frames_dropped(&self) -> u64
The number of video frames dropped, because a buffer overflowed or processing fell behind.
Sourcepub const fn audio_frames_dropped(&self) -> u64
pub const fn audio_frames_dropped(&self) -> u64
The number of audio frames dropped.
Sourcepub const fn metadata_frames_dropped(&self) -> u64
pub const fn metadata_frames_dropped(&self) -> u64
The number of metadata frames dropped.
Sourcepub const fn video_frames_queued(&self) -> u32
pub const fn video_frames_queued(&self) -> u32
The number of video frames queued, waiting to be captured.
Sourcepub const fn audio_frames_queued(&self) -> u32
pub const fn audio_frames_queued(&self) -> u32
The number of audio frames queued.
Sourcepub const fn metadata_frames_queued(&self) -> u32
pub const fn metadata_frames_queued(&self) -> u32
The number of metadata frames queued.
Sourcepub fn video_drop_percentage(&self) -> f64
pub fn video_drop_percentage(&self) -> f64
Cumulative receiver video queue/processing drops as a percentage of the native received total. Returns 0.0 for zero received frames and is bounded to 0..=100 even when native snapshots disagree.
Sourcepub fn audio_drop_percentage(&self) -> f64
pub fn audio_drop_percentage(&self) -> f64
Cumulative receiver audio queue/processing drops as a percentage of the native received total. Returns 0.0 for zero received frames and is bounded to 0..=100 even when native snapshots disagree.
Sourcepub fn metadata_drop_percentage(&self) -> f64
pub fn metadata_drop_percentage(&self) -> f64
Cumulative receiver metadata queue/processing drops as a percentage of the native received total. Returns 0.0 for zero received frames and is bounded to 0..=100 even when native snapshots disagree.
Sourcepub const fn is_connected(&self) -> bool
pub const fn is_connected(&self) -> bool
Whether there is at least one native connection; this does not establish progress of a particular media stream.