SessionOptions
class optris_sdk.session.SessionOptions
How a session is written. Every field is optional.
Carried as whole seconds: rounded, and **never down to zero
from a positive value**, because zero here is the sentinel for
"no segmenting" rather than a very short segment. A request for
half a second therefore segments at one second rather than not
at all.
**Nothing acts on this.** It changes what that one getter
reports and nothing else: a stalled camera is a fact about the
world, and the SDK is not in a position to decide whether the
operator wants the session abandoned over it. It is not a
watchdog.
- Parameter
max_segment_duration_s— close the file and open the next after this much session time.Nonedisables it. Measured on the session clock and never on a camera's stamp, because two cameras' stamps are not on one clock. - Parameter
max_segment_bytes— close the file and open the next before it would pass this size.Nonedisables it. - Parameter
write_preview— whether each file gets a cover image. True by default. The cover is whichever source delivers first, which is deliberately not a choice the SDK makes for you. - Parameter
queue_depth— how many frames may wait to be written. Defaults to the SDK's 32. A memory setting as much as a latency one: every queued frame is a full copy of the pixels, so 32 frames of a 640x480 sensor is about 20 MB. Must be at least 1; zero is refused outright. - Parameter
backlog_policy—SESSION_BACKLOG_DROP_NEWEST(the default) refuses a frame when the queue is full, counts it, and returns -- a recording that costs frames is a better failure than one that costs every camera's live display.SESSION_BACKLOG_BLOCKwaits for room instead, so a slow disk becomes back-pressure on whichever thread is writing. - Parameter
stall_timeout_s— how long without a frame beforeRecordingSession.source_statecalls a source stalled.Nonemeans never.