[libcamera-devel] [PATCH v3 06/16] libcamera: uvc: Report sensor timestamp
Hirokazu Honda
hiroh at chromium.org
Thu Apr 22 06:35:10 CEST 2021
Hi Jacopo, thank you for the patch.
On Thu, Apr 22, 2021 at 1:02 AM Jacopo Mondi <jacopo at jmondi.org> wrote:
>
> Report the sensor's timestamp in the Request metadata using the
> completed buffer timestamp.
>
> The UVC driver reports timestamps of SOE event through metadata, for
> which there is no support in the current pipeline implementation.
>
> Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
Reviewed-by: Hirokazu Honda <hiroh at chromium.org>
> ---
> src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
> index b6c6ade5ebaf..faa8d6b05f46 100644
> --- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
> +++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
> @@ -662,6 +662,10 @@ void UVCCameraData::bufferReady(FrameBuffer *buffer)
> {
> Request *request = buffer->request();
>
> + /* \todo Use the UVC metadata to calculate a more precise timestamp */
> + request->metadata().set(controls::SensorTimestamp,
> + buffer->metadata().timestamp);
> +
> pipe_->completeBuffer(request, buffer);
> pipe_->completeRequest(request);
> }
> --
> 2.31.1
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
More information about the libcamera-devel
mailing list