Files
Heimdall/src/Heimdall.Agent/AgentCameraOptions.cs
T
Arnaud Dartois c38d69a1e5 feat(agent): pipeline capture vidéo — FFmpeg par caméra, snapshots adaptatifs, frames → analyseur (Fixes #1)
- CameraStreamService enregistré dans le DI + hosted SnapshotPipelineService
  qui synchronise les captures avec les caméras assignées (Central = source de
  vérité via clés camera.<id>.* dans la config agent ; fallback local Agent:Cameras)
- Découpage du flux MJPEG en frames JPEG (JpegFrameSplitter, marqueurs SOI/EOI)
- Intervalle adaptatif (spec Phase 15) : scène vide 1000ms / mouvement 500ms /
  objet détecté 200ms, doublé si CPU > 80% ; état de scène piloté par les
  résultats de l'analyseur + proxy de mouvement (FrameMotionDetector, pixel diff
  réel en Phase 16)
- Channel borné 100 snapshots (DropOldest) — backpressure + compteur de drops
  et log rate-limité (alerte admin via remontée des logs agent)
- Frames réellement transmises à FrameAnalyzerService (compteur AnalyzedFrameCount)
- Central : GET /api/settings/agent/{id} embarque les caméras assignées
  (name/rtsp/sub_rtsp/enabled) ; ConfigReceiverService les applique à chaud
- Tests : JpegFrameSplitter, intervalle adaptatif, tracker de scène, motion
  detector, CameraConfigStore, pipeline (snapshot → analyseur), handler config
2026-08-11 21:16:28 +02:00

23 lines
740 B
C#

using System.ComponentModel.DataAnnotations;
namespace Heimdall.Agent;
/// <summary>
/// A camera assignment declared in the local agent configuration
/// (<c>Agent:Cameras</c>). Used only as a fallback before the Central camera
/// list is received through the settings pipeline.
/// </summary>
public sealed class AgentCameraOptions
{
/// <summary>Display name of the camera.</summary>
public string Name { get; init; } = string.Empty;
/// <summary>Primary RTSP URL of the camera.</summary>
[Required, Url]
public string RtspUrl { get; init; } = string.Empty;
/// <summary>Secondary / sub-stream RTSP URL (lower resolution, preferred for AI).</summary>
[Url]
public string? SubRtspUrl { get; init; }
}