From 2705b176aff18abba4d16fdf152f8bd91b31cd9b Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Wed, 12 May 2021 15:03:27 +0100 Subject: libcamera: pipeline: vivid: Set request timestamp Provide the request SensorTimestamp as the buffer completion time. This is fake, as there is no SensorTimestamp on the VIVID pipeline as it's a virtual video device, but it provides a suitable data point. Signed-off-by: Kieran Bingham --- src/libcamera/pipeline/vivid/vivid.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libcamera/pipeline/vivid/vivid.cpp b/src/libcamera/pipeline/vivid/vivid.cpp index 64d9aaef..7f654d1c 100644 --- a/src/libcamera/pipeline/vivid/vivid.cpp +++ b/src/libcamera/pipeline/vivid/vivid.cpp @@ -396,6 +396,10 @@ void VividCameraData::bufferReady(FrameBuffer *buffer) { Request *request = buffer->request(); + /* Record the sensor's timestamp in the request metadata. */ + request->metadata().set(controls::SensorTimestamp, + buffer->metadata().timestamp); + pipe()->completeBuffer(request, buffer); pipe()->completeRequest(request); } -- cgit v1.2.1