ContinuousOptions
public sealed record ContinuousOptions : IEquatable<ContinuousOptions>
Everything an always-on recording is opened with.
At least one retention bound is required. Leaving ContinuousOptions.MaximumDuration, ContinuousOptions.MaximumBytes and ContinuousOptions.MinimumFreeBytes all unset is refused rather than treated as "keep everything": keeping everything is what fills the volume, and doing it because nobody set a field is an accident rather than a decision.
The directory is the timeline. Segments an earlier run left there are adopted rather than deleted, count against the retention policy, and can still be cut from.
ContinuousOptions: constructors
public ContinuousOptions()
ContinuousOptions: properties
public bool AllIntra { get; init; }
Write every frame as a seek anchor, so a clip can be cut at any frame.
On by default here, where it is off for an ordinary recording, because a continuous recording exists to be cut. See RecordingOptions for the cost.
public string Directory { get; init; }
Where the segments go. Created if it does not exist. Required.
public ulong MaxSegmentBytes { get; init; }
Roll over before a segment would pass this size, in bytes. 0 leaves it to ContinuousOptions.SegmentDuration alone.
A ceiling for the finished segment, trailer included, see RecordingOptions.MaxSegmentBytes. The room this recorder reserves for one segment before it starts assumes that ceiling.
public ulong MaximumBytes { get; init; }
Keep at most this many bytes of segment files. 0 means size does not bound it.
Needed beside the time bound because the same camera writes 3.1 GB/h on a calm scene and 7.4 GB/h on a hot noisy one (a factor of 2.4 on content nobody controls), so a drive sized for eight hours of one holds three of the other.
public TimeSpan MaximumDuration { get; init; }
Keep at most this much history, oldest frame to newest. TimeSpan.Zero means time does not bound it.
This is the bound an operator thinks in, and the only one of the three that can be promised to a user.
public ulong MinimumFreeBytes { get; init; }
Never let the volume's free space fall below this. 0 means it is not watched.
This is the bound that fires when something else fills the disk, and it is worth setting even when the other two are generous: a history allowed to fill the volume takes the application's logs and the operating system's ability to write a file down with it.
public string? NamePattern { get; init; }
Filename stem for this run's segments. null means history_{timestamp}.
The timestamp matters: without one a second run restarts the numbering and overwrites the first run's history.
public DiskFullAction OnDiskFull { get; init; }
What to do when the volume is short anyway.
public TimeSpan SegmentDuration { get; init; }
Close the current segment and open the next one after this much recorded time.
The granularity of everything: pruning deletes a segment whole, a crash can lose only the open one, and a clip can only be cut from segments that have closed. TimeSpan.Zero keeps the SDK's own default.
public bool WritePreview { get; init; }
Write a cover image into every segment.
Off by default here: a cover costs one JPEG per file, and this opens a file a minute for as long as the camera runs. A clip gets its own.