I have a Linux application that processes camera images. Currently I provide buffers to the v4l2 kernel subsystem that are filled with image data.
However I need to know, as exact as possible, when this frame was captured (by the camera). With buffers, I may not know precisely when this happened as I may not be able to process all frames in a timely manner (i.e. I may request an image at a time when it is already available for a few milliseconds).
What I am looking for is a way to determine (or estimate) the time an image was captured (or the age of it), e.g. by having the kernel record it somehow, or in worst case by not having images streamed to me but rather only sent upon my explicit request.
Environment: UVC web camera, Linux kernel 2.6.3x, V4L2 API