diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2021-05-12 15:03:27 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2023-06-29 11:40:25 +0100 |
commit | 2f2d425f77c609008f8c20393ed02b60da5eab89 (patch) | |
tree | 32f636793782df9da5d472b1bdd0a2ff494db4f4 | |
parent | 89f3eea5c4f4ef4b429dbc36172f85848171ac9d (diff) |
libcamera: pipeline: vivid: Set request timestampvivid-pre-86fa7300fa91
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.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 62b8f3c4..0e50c496 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); } |