summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-05-12 15:03:27 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2022-11-01 18:09:18 +0000
commit2705b176aff18abba4d16fdf152f8bd91b31cd9b (patch)
tree5edac47c8616b07a1b3d301ae954f9f79508242b /src
parent9c5af1f556d8823539af481fe4409454b9d6aff2 (diff)
libcamera: pipeline: vivid: Set request timestampvivid-pre-a07968bed276
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>
Diffstat (limited to 'src')
-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 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);
}