OptrisOptrisDocumentation

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

SessionSourceInfo

pub struct SessionSourceInfo

What a session file says about one of its sources, plus what a scan of the file found out about it.

SessionSourceInfo — fields

index: i32

Source index, matching the recording side.

video_stream_index: Option<i32>

The container's stream index for this source's video track, for anyone correlating with ffprobe output, or None.

kind: SessionSourceKind

Thermal or visual. Check this before reading a temperature: a visual source has none.

width: u32

Frame width in pixels.

height: u32

Frame height in pixels.

frame_rate: f32

Nominal frame rate as the container declares it.

frame_count: u64

Frames this source has in the file, counted when it was opened.

first_frame_us: u64

Session time of its first frame. A source that joined late has one well past zero, and that is real rather than an artefact.

last_frame_us: u64

Session time of its last frame.

max_gap_us: u64

The longest hole in this track. A hole does not say why, see SessionPlayer::outages for the spans somebody recorded a reason for.

name: String

What the operator called this camera, or empty.

model: String

Camera model, or empty.

serial: String

Camera serial, or empty.

SessionSourceInfo — methods

pub fn is_thermal(&self) -> bool

Whether this source carries measurements at all.

pub fn measured_frame_rate(&self) -> Option<f32>

What this source actually delivered, in Hz, as opposed to what the container says it claimed.

None for a source with fewer than two frames, which has no span to divide by. On a camera that drifts this and SessionSourceInfo::frame_rate differ, which is what sessions exist for.