[libcamera-devel] [PATCH v4 06/16] libcamera: uvc: Report sensor timestamp
Jacopo Mondi
jacopo at jmondi.org
Sat May 1 09:52:13 CEST 2021
Hi Niklas,
On Sat, May 01, 2021 at 08:28:46AM +0200, Niklas Söderlund wrote:
> Hi Jacopo,
>
> Thanks for your patch.
>
> On 2021-04-30 18:00:16 +0200, Jacopo Mondi 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: Hirokazu Honda <hiroh at chromium.org>
> > 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>
> > ---
> > 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 */
>
> How?
My understanding is that UVC is capable of producing metadata (no idea
how they're provided to uspace though) and the frame timestamp is part
of the metadata.
>
> Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
>
> > + 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
>
> --
> Regards,
> Niklas Söderlund
More information about the libcamera-devel
mailing list