summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-05-12 15:03:27 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2024-04-23 15:59:29 +0100
commitea4352b5f88206966b1ac0d8894c3f8ed5785e67 (patch)
treebbf8e422b9d6c9e5c15db51388639be6f08a352e
parent33fd94ecb4471e35946b233dead772b1c7c92a40 (diff)
libcamera: pipeline: vivid: Set request timestampHEADvivid
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 <kieran.bingham@ideasonboard.com>
-rw-r--r--src/libcamera/pipeline/vivid/vivid.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/vivid/vivid.cpp b/src/libcamera/pipeline/vivid/vivid.cpp
index 8943d04f..fd4789e2 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);
}