diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-11-20 19:20:30 +0200 |
---|---|---|
committer | Jacopo Mondi <jacopo@jmondi.org> | 2022-11-21 14:54:43 +0100 |
commit | 47c53f8084ed9e6e40cd2f8f74415472ccccef9c (patch) | |
tree | 0850951720468910bf18d5b43de1fbc79954706a /src | |
parent | f8e998a4c19e66b6a9ba5dc864ac6f6556c87937 (diff) |
pipeline: imx8-isi: Set SensorTimestamp metadata
Report the sensor timestamp in metadata. Use the timestamp from the
first buffer. Accuracy could be improved by using the frame start event
from the CSI-2 receiver, but the kernel driver doesn't support it yet.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/pipeline/imx8-isi/imx8-isi.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp index a3dfd3fc..e51457eb 100644 --- a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp +++ b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp @@ -994,6 +994,12 @@ void PipelineHandlerISI::bufferReady(FrameBuffer *buffer) { Request *request = buffer->request(); + /* Record the sensor's timestamp in the request metadata. */ + ControlList &metadata = request->metadata(); + if (!metadata.contains(controls::SensorTimestamp.id())) + metadata.set(controls::SensorTimestamp, + buffer->metadata().timestamp); + completeBuffer(request, buffer); if (request->hasPendingBuffers()) return; |