Commit Graph

4 Commits

Author SHA1 Message Date
0925aa1d63 Fix RTSP stall by releasing _mutex during BGR conversion
getImage() previously held _mutex across the 4K NV12->BGR sws_scale in
avframeToCVMat, blocking the decoder callback (onVideoFrame) for 100-300ms
per frame. Under multi-camera load this cascaded into 5-21s frame stalls
and STALE PTS events in the log.

- avframeToCVMat: drop outer _mutex. NV12/YUV420P paths touch no shared
  state; avframeAnyToCvmat still locks internally for swsCtx.
- getImage: split into two short locked phases with the BGR conversion
  unlocked between them. Decoder callbacks can push new frames and run
  the CUDA HW capture path in parallel with the reader's conversion.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 08:23:28 +10:00
e134ebdf15 Use software decoder by default 2026-04-04 20:19:54 +11:00
3a21026790 Disable NV12 path for ANSCV by default. Currenly use cv::Mat** directly 2026-04-04 10:09:47 +11:00
7b4134133c Initial setup for CLion 2026-03-28 16:54:11 +11:00