[libcamera-devel] [PATCH 03/13] libcamera: uvc: Report sensor timestamp
Kieran Bingham
kieran.bingham at ideasonboard.com
Mon Apr 19 17:02:02 CEST 2021
On 19/04/2021 14:14, Jacopo Mondi wrote:
> Report the sensor's timestamp in the Request metadata using the
> completed buffer timestamp.
>
> The UVC driver does not support the FRAME_SYNC v4l2 event, and the
> buffer timestamp is the only available approximation of the
> sensor timestamp.
>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> ---
> src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
> index b6c6ade5ebaf..b2d2f211e61b 100644
> --- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
> +++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
> @@ -662,6 +662,9 @@ void UVCCameraData::bufferReady(FrameBuffer *buffer)
> {
> Request *request = buffer->request();
>
> + request->metadata().set(controls::SensorTimestamp,
> + buffer->metadata().timestamp);
> +
> pipe_->completeBuffer(request, buffer);
> pipe_->completeRequest(request);
> }
>
--
Regards
--
Kieran
More information about the libcamera-devel
mailing list