RecordingEvent
class optris_sdk.recording.RecordingEvent
A recording started, stopped, rolled over or failed.
Last in the signature and defaulted, mirroring the C++
struct, where the field is appended because every
positional `RecordingEvent` construction in that tree
would otherwise change meaning rather than fail to compile.
A failure is reported once per recording, not once per lost frame.
The running total is
optris_sdk.camera.Camera.recording_stats.
- Parameter
phase— one ofRECORDING_STARTED,RECORDING_STOPPED,RECORDING_FAILEDorRECORDING_SEGMENT_COMPLETED. - Parameter
path— the file. ForRECORDING_SEGMENT_COMPLETEDthis is the finished file, not the one just opened. - Parameter
message— why, forRECORDING_FAILED. Empty otherwise. - Parameter
stop_reason— who ended the recording, onRECORDING_STOPPED--RECORDING_STOP_UNKNOWNon every other phase. Branch on this rather than onmessage, which is the same answer in words and is free to be reworded.recording_stop_reason_namespells it out. - Parameter
recording_id— which recording the event is about. Added in 12.0.15. The same number on a recording'sRECORDING_STARTED, on everything it reports in between and on itsRECORDING_STOPPED, and a different number for every other recording of the same camera, so a handler that acts on its events later can tell which start a stop belongs to even when the next recording reuses the file name. Never 0 on an event fromoptris_sdk.camera.Camera.on_recording; 0 on a continuous recording's events and on a session's. A recording that reaches its segment limit and starts a new one is two recordings with two numbers; the parts of a series share one. An identity, not a count. - Parameter
statistics— the finalRecordingStatsof the recording this event ends, orNone. Added in 12.0.15. Set onRECORDING_STOPPEDandRECORDING_DISCARDED, the two events that end a recording, andNoneon every other phase. Read this rather thanoptris_sdk.camera.Camera.recording_statswhen the event is acted on later: that property describes whichever recording is current when it is read, and a recording started in the meantime has reset it, so a complete file would read asframes_written == 0. These figures were taken when the recording ended. A recording that ended at its segment limit gets the frame and byte counters of its own file.
RecordingEvent — properties
failed
Whether this is the event that says the file is not being written.