Skip to main content

StreamStats

Struct StreamStats 

Source
#[non_exhaustive]
pub struct StreamStats {
Show 59 fields pub state: StreamState, pub bit_perfect: bool, pub bit_perfect_blocker: Option<BitPerfectBlocker>, pub software_gain: f32, pub underruns: u64, pub lost_frames: u64, pub short_packets: u64, pub zero_packets: u64, pub urb_timeouts: u64, pub completed_transfers: u64, pub frames_written: u64, pub frames_completed: u64, pub played_frames: u64, pub latency_frames: u64, pub latency_ms: f64, pub queued_frames: u64, pub buffer_ms: u32, pub buffer_target_ms: u32, pub active_target_ms: u32, pub buffer_capacity_ms: u32, pub transfer_queue_depth: u32, pub last_turnaround_us: u64, pub max_turnaround_us: u64, pub last_submit_gap_us: u64, pub max_submit_gap_us: u64, pub worker_gap_over_10ms: u64, pub worker_gap_over_50ms: u64, pub max_worker_gap_us: u64, pub max_worker_loop_gap_us: u64, pub max_event_pump_elapsed_us: u64, pub max_event_pump_timeout_overrun_us: u64, pub adaptive_queue_changes: u64, pub adaptive_queue_slots: u64, pub adaptive_queue_us: u64, pub effective_rate_hz: f64, pub feedback_active: bool, pub feedback_reports: u64, pub feedback_timeouts: u64, pub feedback_errors: u64, pub feedback_rejected: u64, pub feedback_age_ms: Option<u64>, pub feedback_rate_hz: Option<f64>, pub feedback_stale: bool, pub feedback_locked: bool, pub feedback_empty: u64, pub implicit_fifo_depth: u32, pub implicit_fifo_high_water: u32, pub implicit_waits: u64, pub implicit_empty_bus: u64, pub implicit_overruns: u64, pub implicit_in_transfers: u64, pub implicit_out_of_order: u64, pub implicit_invalid_packets: u64, pub implicit_measured_frames: u64, pub implicit_scheduled_frames: u64, pub stable: bool, pub clock_verified: bool, pub payload_verified: bool, pub payload_constant_for_ms: Option<u64>,
}
Expand description

Counters of a stream. Frames are in the unit StreamFormat::counter_rate_hz gives the rate of.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§state: StreamState§bit_perfect: bool§bit_perfect_blocker: Option<BitPerfectBlocker>

Why bit_perfect is false, if it is.

§software_gain: f32§underruns: u64

Runs of padding because the ring ran dry (counted per transfer).

§lost_frames: u64

Frames not confirmed delivered. Failed packets are charged in full, so this may exceed actual loss when a failed request reports partial bytes.

§short_packets: u64§zero_packets: u64§urb_timeouts: u64

Isochronous transfers libusb reported as timed out.

§completed_transfers: u64§frames_written: u64

Frames the host has written.

§frames_completed: u64

Frames the DAC has taken, music and padding alike.

§played_frames: u64

Music frames completed on the bus since the start or the last flush.

§latency_frames: u64

Music frames between the host and the DAC: ring plus bus.

§latency_ms: f64§queued_frames: u64

Frames in the ring.

§buffer_ms: u32§buffer_target_ms: u32

The deep ring depth (DacConfig::buffer_target_ms).

§active_target_ms: u32

The depth writable_bytes() asks for now: buffer_target_ms, or the shallower processing depth while software gain or host processing is on.

§buffer_capacity_ms: u32§transfer_queue_depth: u32

Transfers currently submitted to the bus.

§last_turnaround_us: u64§max_turnaround_us: u64§last_submit_gap_us: u64§max_submit_gap_us: u64§worker_gap_over_10ms: u64

Checkpoint gaps excluding the most recent event-pump elapsed time.

§worker_gap_over_50ms: u64§max_worker_gap_us: u64§max_worker_loop_gap_us: u64

Longest checkpoint-to-checkpoint interval, including the event pump.

§max_event_pump_elapsed_us: u64

Longest time inside the event pump, including callbacks and scheduling.

§max_event_pump_timeout_overrun_us: u64

Largest event-pump elapsed time beyond its requested timeout.

§adaptive_queue_changes: u64§adaptive_queue_slots: u64§adaptive_queue_us: u64§effective_rate_hz: f64

Rate the DAC has actually consumed frames at since the start.

§feedback_active: bool

Live feedback is locked. Equivalent to feedback_locked in 0.1.1.

§feedback_reports: u64§feedback_timeouts: u64§feedback_errors: u64§feedback_rejected: u64§feedback_age_ms: Option<u64>

Time since the last valid feedback report.

§feedback_rate_hz: Option<f64>

The sample rate the last feedback report implies.

§feedback_stale: bool§feedback_locked: bool

The selected explicit or implicit source has established usable timing.

§feedback_empty: u64

Empty explicit polls or empty implicit IN patterns.

§implicit_fifo_depth: u32§implicit_fifo_high_water: u32§implicit_waits: u64§implicit_empty_bus: u64§implicit_overruns: u64§implicit_in_transfers: u64§implicit_out_of_order: u64§implicit_invalid_packets: u64§implicit_measured_frames: u64§implicit_scheduled_frames: u64§stable: bool

The transfers have been lossless for long enough (about 256 ms) with no underrun and no lost audio. A stream that lost audio is never stable again.

§clock_verified: bool

The DAC confirmed the sampling frequency (or the device quirk trusts its SET_CUR). False before the clock is verified and after it is lost.

§payload_verified: bool

The wire payload audit passes (see is_bit_perfect).

§payload_constant_for_ms: Option<u64>

How long, in milliseconds, the wire payload has been failing the audit, while it does.

Trait Implementations§

Source§

impl Clone for StreamStats

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StreamStats

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for StreamStats

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for StreamStats

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.