v4l2: v4l2_camera_proxy: Fix timestamp calculation

The V4L2 Compatibility layer is returning timestamps for buffers which
are incorrectly calculated from the frame metadata.

The sec component of the timestamp is correct, but the usec component is
out, leaving frame captures reporting non-monotonically increasing
timestamps, and incorrect frame rate calculations.

Fix the usecs calculation reported by the V4L2 adaptation layer.

Bug: https://bugs.libcamera.org/show_bug.cgi?id=118
Fixes: 0ce8f2390b52 ("v4l2: v4l2_compat: Add V4L2 compatibility layer")
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
1 file changed