OptrisOptrisDocumentation

Documentation/OTC SDK/optris_sdk — Rust API referencev12.0

SessionSourceStats

pub struct SessionSourceStats

What one source of a running, or just-finished, session did.

SessionSourceStats — fields

frames_written: u64

Frames the session has taken into the file for this source.

As for crate::RecordingStats::frames_written: a frame counts here once the container has accepted it, which is a moment before its bytes are necessarily on the disk. Stopping the session is what makes the file complete.

frames_dimension_mismatch: u64

Frames refused because they were not the size the source was declared with. Every one is a frame missing from the file.

frames_write_error: u64

Frames lost to a write or encode failure.

frames_dropped_backlog: u64

Frames refused because the hand-over queue was full under SessionBacklogPolicy::DropNewest.

frames_pts_repaired: u64

Frames whose session stamp did not advance past the previous one's. Each is written at the millisecond after the previous frame's, because a recording keeps whole milliseconds; a frame that advanced by less than a millisecond is moved the same way and is not counted.

frames_from_own_stamp: u64

Frames whose session time came from the frame's own arrival stamp. Always zero under SessionTimestampSource::Handover: a source whose frames carry no stamp falls back silently, and this is how you tell that apart from the feature working.

first_frame_us: u64

Session time of this source's first frame. Zero before it.

last_frame_us: u64

Session time of its most recent frame. Zero before its first.

max_gap_us: u64

The longest run of session time this source went without delivering a frame, after its first.

outages: u64

How many times this source was reported lost, whether or not the camera came back.

outage_total_us: u64

Total session time spent disconnected. Not the same as SessionSourceStats::max_gap_us, which is the largest hole whatever caused it; this is only the time somebody said the camera was gone.

last_error: String

The most recent write failure for this source, or empty.

SessionSourceStats — methods

pub fn frames_lost(&self) -> u64

Every frame this source did not get into the file, whatever the reason.

Three counters rather than one because they want three different responses (a dimension mismatch is a mode switch, a write error is the disk, a backlog drop is the writer not keeping up), but "did the file get everything" is one question and deserves one answer.