OptrisOptrisDocumentation

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

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. None disables 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. None disables 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_BLOCK waits for room instead, so a slow disk becomes back-pressure on whichever thread is writing.
  • Parameter stall_timeout_s — how long without a frame before RecordingSession.source_state calls a source stalled. None means never.

SessionOptions — methods

__repr__()