Application turns on a light, snaps an image, turns off the light and repeats a few 100’s of milliseconds later.
I’m having an issue where images seem to not be illuminated properly and can confirm that by letting light on the entire time (not possible in the real application), images all come out OK.
This tells me that I may not understand the timing of V4L frame acquisition.
The diagram below is my current understanding of timing. Is it correct, i.e. is it the case that the call to “select()” will return after the entire image was transferred and buffer populated with pixel data?
Looks like you want a feature like flash light?
I don’t think there’s a way to get right frame by current design.
But you can check FS(Frame Start) event vi5_fops.c to enable the light in a period to get frames illuminated. But this need to implement in the kernel driver.
it’s not a flash light, just an LED device or a laser which gets turned on for the duration of the capture.
Capture rate is quite slow, say 5 frames per second or less.
My question really is:
after select() returns and ioctl(fd, VIDIOC_DQBUF, &bufdata) is called and returns,
are pixel data completely transferred or could the transfer still be ongoing?
I have found thread about frame timestamps but that was for argus-based SW, which is not my case since I’m using V4L: