optris::sdk::rec::SessionSourceInfo
What a session file says about one of its sources, plus what a scan of the file found out about it.
Public attributes
index
int index = 0
Source index, matching the recording side.
video_stream_index
int video_stream_index = -1
The container's stream index for this source's video track, for anyone correlating with ffprobe output.
name
std::string name
What the operator called this camera. Empty for a file that did not say.
width
uint32_t width = 0
Frame width in pixels.
height
uint32_t height = 0
Frame height in pixels.
frame_rate
float frame_rate = 0.0F
Nominal frame rate as the container declares it. What the source actually delivered is frame_count over the span between first_frame_us and last_frame_us, and on a camera that drifts the two differ -- which is the case this whole header exists for.
device
DeviceMeta device
Which camera it was, from the session document. Empty fields for a file that did not say.
kind
SessionSourceKind kind = SessionSourceKind::kThermal
Thermal or visual, read from the track's own role tag rather than from the session document -- so it is right even for a file whose document is missing or truncated. A consumer must check this before reading a temperature: a SessionSourceKind::kColor source has none.
extra_json
std::string extra_json
Whatever the writer put under this source's extra key, verbatim. Empty when there was none.
frame_count
uint64_t frame_count = 0
Frames this source has in the file, counted at open.
first_frame_us
uint64_t first_frame_us = 0
Session time of its first frame, in microseconds. A source that joined late has one well past zero, and that is real rather than an artefact -- it is when the camera actually started.
last_frame_us
uint64_t last_frame_us = 0
Session time of its last frame. A source that ended early has one well short of GetDurationUs(), for the same reason.
max_gap_us
uint64_t max_gap_us = 0
The longest hole in this track, in microseconds: the largest interval between consecutive frames, measured at open.
Worth reading before playing anything. A track whose max_gap_us is four seconds on a 32 Hz camera lost a hundred frames somewhere, and a viewer that holds the last frame across the hole -- which is the only honest thing it can do -- otherwise shows a four-second freeze with nothing to say it was not the scene.