SessionEvent
class optris_sdk.session.SessionEvent
Something happened to a session, or to one of its cameras.
The argument to a RecordingSession.on_event handler.
- Attribute
phase— one of theRECORDING_*constants inoptris_sdk.recording. The three per-source phases --RECORDING_SOURCE_LOST,_RESUMEDand_ENDED-- arrive only here: the single-camera callback has nowhere to put a source index. - Attribute
path— the file. ForRECORDING_SEGMENT_COMPLETEDthis is the finished file, not the one just opened. - Attribute
message— why, forRECORDING_FAILED. Empty otherwise. - Attribute
source— which camera this is about, orNonefor an event about the session as a whole. The ABI spells that-1; it isNonehere because it is not an index. - Attribute
stop_reason— who ended the session, onRECORDING_STOPPED--RECORDING_STOP_UNKNOWNon every other phase. Branch on this rather than onmessage;optris_sdk.recording.recording_stop_reason_namespells it out.
SessionEvent — properties
failed
Whether this is the event that says the file is not being written.
Worth watching even if you ignore everything else. A
session whose trailer could not be written raises this naming
the file before the stop arrives, and it is the only way to
learn the file came out damaged -- neither write_frame nor
stop can report it.