SessionOptions
pub struct SessionOptions
Session-wide settings.
SessionOptions::new reads the SDK's own defaults out of
optris_sdk_session_config_init rather than restating them here,
the same arrangement as crate::SimulatedConfig.
The output path is not here: it is
SessionRecorder::create's own argument, because a path is the
one thing a session cannot be created without and an options struct
with a required field is a type that lies about itself.
SessionOptions — methods
pub fn new() -> Self
The SDK's defaults.
pub fn max_segment_duration(mut self, duration: Duration) -> Result<Self>
Roll over into the next file after this much session time.
Duration::ZERO disables duration segmentation. Measured on
the session clock and not on any camera's stamp.
Errors
Returns Status::InvalidArgument if the duration does not fit
the ABI's uint32_t of seconds.
pub fn max_segment_bytes(mut self, bytes: u64) -> Self
Roll over before a file would pass this size. Zero disables it.
pub fn write_preview(mut self, yes: bool) -> Self
Write a cover image into every file this session produces.
pub fn queue_depth(mut self, frames: u32) -> Self
How deep the hand-over queue is, in frames, across all sources.
Every queued frame is a full copy of the pixels, so this is a memory setting as much as a latency one: 32 frames of a 640x480 sensor is about 20 MB. Must be at least 1.
pub fn backlog_policy(mut self, policy: SessionBacklogPolicy) -> Self
What to do when that queue is full.
pub fn stall_timeout(mut self, timeout: Duration) -> Result<Self>
How long a source may go without a frame before
SessionRecorder::source_state calls it stalled.
Duration::ZERO, the default, means never. Nothing acts
on this: it changes what a getter reports and nothing else.
Errors
Returns Status::InvalidArgument if the duration does not fit
the ABI's uint32_t of milliseconds.