2026-08-11 21:16:28 +02:00
|
|
|
namespace Heimdall.Agent.Services;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Immutable camera assignment consumed by the capture pipeline. Built either
|
|
|
|
|
/// from the Central settings keys (<c>camera.<id>.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,
|
2026-10-20 02:26:49 +02:00
|
|
|
bool Enabled,
|
2026-11-04 22:18:00 +01:00
|
|
|
Heimdall.Application.DTOs.DetectionProfileDto? DetectionProfile = null,
|
|
|
|
|
bool RecordingEnabled = false)
|
2026-08-11 21:16:28 +02:00
|
|
|
{
|
|
|
|
|
/// <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;
|
|
|
|
|
}
|