new file mode 100644
@@ -0,0 +1,4 @@
+frames:
+ - 50:
+ FrameDurationLimits: [66666, 66666]
+
@@ -544,6 +544,27 @@ void CameraSession::processRequest(Request *request)
if (!requeue)
return;
+ auto camera = this->camera();
+ const auto controlInfo = camera->controls();
+ for (const auto &[id, ctrlInfo] : controlInfo) {
+ if (id->id() != libcamera::controls::EXPOSURE_TIME &&
+ id->id() != libcamera::controls::FRAME_DURATION_LIMITS)
+ continue;
+
+ switch (id->id()) {
+ case libcamera::controls::EXPOSURE_TIME:
+ std::cout << "Exposure max: "
+ << ctrlInfo.max().get<int32_t>() << std::endl;
+ break;
+ case libcamera::controls::FRAME_DURATION_LIMITS:
+ std::cout << "FrameDurationLimits: ["
+ << ctrlInfo.min().get<int32_t>() << ", "
+ << ctrlInfo.max().get<int32_t>() << "]"
+ << std::endl;
+ break;
+ }
+ }
+
request->reuse(Request::ReuseBuffers);
queueRequest(request);
}
Add a per-frame printout of the ExposureTime and FrameDurationLimits controls to the 'cam' tool and change the FrameDurationLimits value during a capture session using a capture script. $ cam -c1 -C100 --script ./capture-script.yaml up to frame 50: (30.07 fps) cam0-stream0 seq: 000050 bytesused: 2073600/1036800 FrameDurationLimits: [21751, 1281893] Exposure max: 33238 The FrameDuration is unbound and Exposure is limited by the driver programmed vblank of 627 lines (configuration for full-resolution 30 fps) to 33,238 msecs. After frame 50: (15.00 fps) cam0-stream0 seq: 000055 bytesused: 2073600/1036800 FrameDurationLimits: [66666, 66666] Exposure max: 66652 FrameDurationLimits is set to [66666, 66666] by the capture script and the control limits as fetched from the Camera are updated accordingly. The Exposure time is now bounded by a larger vblank of 2335 lines to 66,652 msecs. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> --- change-frame-duration.yaml | 4 ++++ src/apps/cam/camera_session.cpp | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+)