Expand description
AI frame sampler (Stage 2): for each (camera, stream_profile) that has an enabled AI task, decode
that stream at a budgeted frame rate and write the latest frame to frames/<cam>/latest_<profile>.jpg
(atomic rename, so readers never see a torn JPEG). AI workers pull frames on their own cadence.
A global FPS budget is shared across samplers, and the number of concurrent decoders is capped, so
adding AI cameras degrades gracefully instead of overloading the host (backpressure). AI workers
never touch RTSP directly โ they consume sampled frames + post detections back.
Structsยง
- Sampler
Info - Sampler
Manager - Owns and supervises the per-(camera,profile) frame samplers.