[PATCH 5/5] pipeline: rpi: vc4: Add wallclock timestamp support
David Plowman
david.plowman at raspberrypi.com
Fri Dec 6 15:27:42 CET 2024
Wallclocks are enabled for the unicam output, and the values returned
in frame metadata are made available to the base pipeline handler
class.
Signed-off-by: David Plowman <david.plowman at raspberrypi.com>
---
src/libcamera/pipeline/rpi/vc4/vc4.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp
index fd8d84b1..eb98c56e 100644
--- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp
+++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp
@@ -398,6 +398,9 @@ int PipelineHandlerVc4::platformRegister(std::unique_ptr<RPi::CameraData> &camer
Camera::create(std::move(cameraData), id, streams);
PipelineHandler::registerCamera(std::move(camera));
+ /* Enable wall clock timestamps for the unicam output. */
+ data->unicam_[Unicam::Image].dev()->enableWallClock(&wallClockRecoery_);
+
LOG(RPI, Info) << "Registered camera " << id
<< " to Unicam device " << unicam->deviceNode()
<< " and ISP device " << isp->deviceNode();
@@ -784,6 +787,7 @@ void Vc4CameraData::unicamBufferDequeue(FrameBuffer *buffer)
* as it does not receive the FrameBuffer object.
*/
ctrl.set(controls::SensorTimestamp, buffer->metadata().timestamp);
+ ctrl.set(controls::FrameWallClock, buffer->metadata().wallClock);
bayerQueue_.push({ buffer, std::move(ctrl), delayContext });
} else {
embeddedQueue_.push(buffer);
--
2.39.5
More information about the libcamera-devel
mailing list