Commit Graph
18 Commits
Author SHA1 Message Date
nghianguyenandClaude Fable 5 ac79e51d17 ANSCV test: camera-dead watchdog with ReconnectRTSP (production parity)
Overnight soak revealed the gap: ANSRTSPClient does not auto-reconnect
by design (the application layer polls staleness and calls
ReconnectRTSP - ANSVIS/LabVIEW does this in production), but the unit
test never did, so when the laptop's Modern Standby killed the TCP
session at ~1 AM the client returned the cached frame until morning.

Poll GetRTSPLastFrameAgeMs each loop; at 20 s without a decoded frame,
call ReconnectRTSP (timestamped console line), retrying at most every
15 s. Threshold sits above the corruption keyframe gate's ~12 s
worst-case hold so a reconnect never preempts an in-flight recovery.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 10:42:31 +10:00
nghianguyenandClaude Fable 5 044fedd344 ANSCV test: pump GUI messages while waiting for frames
The empty-frame path slept 1 s without calling cv::waitKey, so the
HighGUI window stopped pumping Windows messages and went "Not
Responding" whenever the RTSP stream stalled for a few seconds.
Wait via cv::waitKey(1000) instead (ESC still exits). Same fix in
all three test loops that shared the pattern.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 21:39:39 +10:00
nghianguyenandClaude Fable 5 005f3bc3d5 ANSCV tests: update RTSP camera address, drop unused ans_imshow include
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 20:23:31 +10:00
nghianguyen 43ebd25d07 Unitiest 2026-06-23 05:56:06 +10:00
nghianguyen 75693cadd9 Add jitter buffer 2026-05-07 22:36:27 +10:00
nghianguyen 2e0fee5e3d Fix VideoPlayer from stop after just few frames 2026-05-07 18:17:33 +10:00
nghianguyen 91bdb3f96b Fix play once video player 2026-04-23 08:36:52 +10:00
nghianguyen c625898f61 Fix Video Player that support generate black image when finish playing video (reach the end of video) 2026-04-23 08:08:34 +10:00
nghianguyen fc47a42c6a Use yuv and fix FR to use batch 4 2026-04-22 16:01:44 +10:00
nghianguyen 0e203eef99 Fix double stops 2026-04-22 10:19:03 +10:00
nghianguyen 57cc8e0a56 Fix double stop in ANSVideoPlayer 2026-04-22 10:10:16 +10:00
nghianguyen 9f0a10a4c8 Improve ANSCV with sotfware decoder:
Thread-local staging Mat (video_player.cpp:1400-1407) — single biggest win. Eliminates the 12 MB per-call malloc/free cycle.
Contiguous get_buffer2 allocator (video_decoder.cpp:35-102) — keeps the 3 bulk memcpys cache-friendly. Would also enable FAST/zero-copy for resolutions where visible_h % 64 == 0.
SW-decoder thread config (video_decoder.cpp:528-540) — thread_count=0, thread_type=FRAME|SLICE. FRAME is downgraded to SLICE-only by AV_CODEC_FLAG_LOW_DELAY, but decode throughput is sufficient for your input rate.
SetTargetFPS(100) delivery throttle (already there) — caps onVideoFrame post-decode work at 10 FPS. Keeps the caller path warm-cached.
Instrumentation — [MEDIA_DecInit] / [MEDIA_Convert] / [MEDIA_SWDec] / [MEDIA_Timing] / [MEDIA_JpegTiming] — always-on regression detector, zero cost when ANSCORE_DEBUGVIEW=OFF.
2026-04-20 12:18:43 +10:00
nghianguyen 2abfd6e87c Update the video conversion: Ensure the correct file order 2026-04-16 22:32:03 +10:00
nghianguyen 808df4656d Fix ALPR Batch and memory leak 2026-04-15 23:00:19 +10:00
nghianguyen f9a0af8949 Improve ALPR_OCR peformance 2026-04-14 20:30:21 +10:00
nghianguyen 3349b45ade Update video conversion 2026-04-13 21:55:57 +10:00
nghianguyen e7612e421b Add more unit test 2026-03-29 12:00:38 +11:00
nghianguyen 2392b6785b Add unit tests 2026-03-29 08:45:38 +11:00