Files
Heimdall/src/Heimdall.Agent/Services/AgentCameraConfig.cs
T

23 lines
827 B
C#
Raw Normal View History

namespace Heimdall.Agent.Services;
/// <summary>
/// Immutable camera assignment consumed by the capture pipeline. Built either
/// from the Central settings keys (<c>camera.&lt;id&gt;.name|rtsp|sub_rtsp|enabled</c>)
/// or from the local <c>Agent:Cameras</c> fallback.
/// </summary>
public sealed record AgentCameraConfig(
Guid CameraId,
string Name,
string RtspUrl,
string? SubRtspUrl,
bool Enabled,
2026-11-04 22:18:00 +01:00
Heimdall.Application.DTOs.DetectionProfileDto? DetectionProfile = null,
bool RecordingEnabled = false,
bool EventRecordingEnabled = false)
{
/// <summary>
/// URL used for AI capture: the low-res sub-stream when available,
/// otherwise the primary stream.
/// </summary>
public string EffectiveRtspUrl => !string.IsNullOrWhiteSpace(SubRtspUrl) ? SubRtspUrl : RtspUrl;
}