I am trying to use the value of timestamp v4l2_buffer (type timeval) to synchronize images captured from a UVC webcam to external events.
However, the timestamp does not match the system time or timeout, etc .:
printf("image captured at %ld, %ld\n",
buffer->timestamp.tv_sec,
buffer->timestamp.tv_usec);
struct timeval tv;
gettimeofday(&tv, 0);
printf("current time %ld, %ld\n", tv.tv_sec, tv.tv_usec);
Results in
image captured at 367746, 476270
current time 1335083395, 11225
My downtime is 10 days.
source
share