diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2021-05-12 15:03:27 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2024-05-14 23:57:48 +0100 |
commit | a96888e286786bc7ce2e6a6249374e72baef868f (patch) | |
tree | 89c4d444573792afe2b633615dede6cf588c87d4 /src | |
parent | 51f496815d7564e1c08041ca5d6af8ddbf0ad261 (diff) |
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 <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/pipeline/vivid/vivid.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/vivid/vivid.cpp b/src/libcamera/pipeline/vivid/vivid.cpp index c9aeaba1..0340a500 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); } |