RecordedGap
pub struct RecordedGap
Where a recording is discontinuous, and why.
Returned by Camera::recorded_gap about the frame most recently
delivered by a replay. That you get one at all is the fact: the
frames either side of that one are not contiguous, because the
camera stopped delivering in between.
Two things put such a hole into a file, and both are a camera that
stopped delivering: a recording held open across a reconnect
(crate::RecordingOptions::hold_open_across_reconnect), and an
armed pre-roll that spanned an outage. The pre-roll case is
deliberate -- the ring is not cleared when a camera drops, because
those frames are real and are the history the application asked to
keep.
RecordedGap — fields
before_us: Option<u64>
Capture time of the last frame before the gap, in microseconds
on the camera's own clock, or None where the SDK had no
earlier frame to name.
None rather than 0, because 0 is a legitimate capture time --
the first frame of a recording.
Do not compute the length of the outage as the current frame's timestamp minus this. A camera's counter can restart at a re-open, which is measured, so the subtraction can come out negative or absurd. It says where the join is, not how long the camera was away.
message: String
What the SDK knew about the outage, for a log a person reads. Never the contract -- this value's existence is. May be empty.