জলMongla, 3 September 2026

A mailbox, not a queue

The standard recipe recovered 12 % of the problem. Read the driver's own sequence counter before trusting the recipe.

What happened
Asking the camera driver for a frame after the consumer had been busy for 400 ms.
What I believed
Drain the queue and take the last frame, as every reference recommends, and you're caught up.
What was true
A full V4L2 queue keeps the oldest frames and drops every new one. Draining hands you the least-old fossil: 348 ms stale instead of 396. A keep-up thread got 16.9 ms.
Next time
Keep only the newest frame; never let a slow stage queue behind a fast one.
Evidence
50d69a8, the frame-age note