OptrisOptrisDocumentation

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

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 of RECORDING_STARTED, RECORDING_STOPPED, RECORDING_FAILED or RECORDING_SEGMENT_COMPLETED.
  • Parameter path — the file. For RECORDING_SEGMENT_COMPLETED this is the finished file, not the one just opened.
  • Parameter message — why, for RECORDING_FAILED. Empty otherwise.
  • Parameter stop_reason — who ended the recording, on RECORDING_STOPPED -- RECORDING_STOP_UNKNOWN on every other phase. Branch on this rather than on message, which is the same answer in words and is free to be reworded. recording_stop_reason_name spells it out.
  • Parameter recording_id — which recording the event is about. Added in 12.0.15. The same number on a recording's RECORDING_STARTED, on everything it reports in between and on its RECORDING_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 from optris_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 final RecordingStats of the recording this event ends, or None. Added in 12.0.15. Set on RECORDING_STOPPED and RECORDING_DISCARDED, the two events that end a recording, and None on every other phase. Read this rather than optris_sdk.camera.Camera.recording_stats when 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 as frames_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.

RecordingEvent — methods

__repr__()