mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-04 21:21:54 +02:00
The MJPEG fan-out broadcaster from #1089 only solved viewer-side concurrency. Obico polling (every 5s) and the manual /camera/snapshot endpoint kept opening their own fresh RTSP sockets, which X1/H2/P2 firmwares tolerated but X2D firmware 01.01.00.00 enforces strict single-connection on — every poll kicked the live stream. Add try_get_active_buffered_frame(printer_id): returns the broadcaster's last buffered frame when a viewer is connected, None otherwise. Obico and /camera/snapshot consult it before opening a fresh socket. When no viewer is active they fall through to the existing fresh-capture path. plate_detection and layer_timelapse intentionally not converted.