RecordingAction
public sealed record RecordingAction : AlarmAction, IEquatable<RecordingAction>
Start or stop a recording when the rule fires.
RecordingAction: constructors
public RecordingAction(RecordingActionMode Mode = 0, Nullable<TimeSpan> Duration = default, string? Directory = null, string? NamePattern = null, RecordingOptions? Options = null)
Start or stop a recording when the rule fires.
Mode: What to do.Duration: ForRecordingActionMode.FixedDuration, how long to record. Ignored otherwise.Directory: Where to write, ornullfor the camera's output directory.NamePattern: The file name, ornullfor{rule}_{timestamp}.Options: How to write the recording: the segment limits and the lossy settings.nullmeans the defaults. The segment limits are the reason this is not cosmetic. WithRecordingOptions.MaxSegmentBytesunset a recording never rolls over, so one onto a destination that caps a single file fails at that cap instead of continuing in a new part, and an alarm recording is the one case where nobody is watching when it happens. Set it to whatever the destination holds.RecordingOptions.Durationis ignored:ModeandDurationare this action's stop, and a recording that stopped itself on the options field would leave the SDK believing this rule still owned an open recording. It reads back asTimeSpan.Zero.
RecordingAction: properties
public string? Directory { get; init; }
Where to write, or null for the camera's output directory.
public Nullable<TimeSpan> Duration { get; init; }
For RecordingActionMode.FixedDuration, how long to record. Ignored otherwise.
public RecordingActionMode Mode { get; init; }
What to do.
public string? NamePattern { get; init; }
The file name, or null for {rule}_{timestamp}.
public RecordingOptions? Options { get; init; }
How to write the recording: the segment limits and the lossy settings. null means the defaults.
The segment limits are the reason this is not cosmetic. With RecordingOptions.MaxSegmentBytes unset a recording never rolls over, so one onto a destination that caps a single file fails at that cap instead of continuing in a new part, and an alarm recording is the one case where nobody is watching when it happens. Set it to whatever the destination holds.
RecordingOptions.Duration is ignored: Mode and Duration are this action's stop, and a recording that stopped itself on the options field would leave the SDK believing this rule still owned an open recording. It reads back as TimeSpan.Zero.