OptrisOptrisDocumentation

Documentation/OTC SDK/OTC SDK — C++ API referencev12.0

optris::sdk::rec::RecordingGap

A hole in a recording, written into the file where it happened.

The frames either side of a frame carrying one of these are not contiguous: the camera stopped delivering in between. Carried on the per-frame record track -- on the first frame that arrived after the outage -- because a recording's otc-meta.json is written before its first frame and cannot describe anything that happens afterwards, which is the same reason SeriesMeta has no to_us.

The two things that produce one: The two things that produce one A recording held open across a reconnect (RecordingOptions::hold_open_across_reconnect true), and an armed pre-roll that spanned an outage. The second is on purpose: the ring is deliberately not cleared when a camera drops, because those frames are real and are the history the application asked to keep -- so a recording started after the camera came back begins with frames from before the outage, then frames from after it. Discarding them loses data somebody asked for; marking the join loses nothing.

Karl, 2026-10-30: "carry a marker".

Reading it: Reading it Its presence is the fact. A reader that understands nothing else here knows that the recording is discontinuous at this frame, which is the one thing it could not know before.

Public attributes

before_us

std::optional< uint64_t > before_us

Capture time of the last frame before the gap, in microseconds on the camera's own clock, when the SDK had one to name.

Absent when the outage preceded the first frame this recording or pre-roll ever saw, where there is no earlier frame to point at and 0 is a legitimate capture time.

Warning: Do not compute the length of the outage as this frame's timestamp_us minus this value. A camera's counter can restart at a re-open -- that is measured, and it is why RingBuffer::EvictPastSpanLocked() guards against a newest stamp below its oldest -- so the subtraction can come out negative or absurd. It is here to say where the join is, not how long the camera was away.

message

std::string message

What the SDK knew about the outage, for a log a person reads.

Never the contract -- the marker's presence is. Empty is allowed.