[libcamera-devel] [PATCH 2/5] cam: Queue requests unconditionally

Jacopo Mondi jacopo at jmondi.org
Wed May 18 19:19:18 CEST 2022


The CaptureSession::queueRequest() function increments the queueCount_
counter, which tracks the number of requests queued to the camera.

The number of queued requests is currently compared with the capture
limit which should instead only be compared with the number of captured
frames, something which already happens in the
CameraSession::processRequest() function.

Remove the check and only compare the capture limit with the actual
number of captured frames. If more requests than the frame capture
limits end up being queued to the Camera, they will be released on
Camera::stop().

Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
 src/cam/camera_session.cpp | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/cam/camera_session.cpp b/src/cam/camera_session.cpp
index 71e6bd605139..186072817367 100644
--- a/src/cam/camera_session.cpp
+++ b/src/cam/camera_session.cpp
@@ -327,9 +327,6 @@ int CameraSession::startCapture()
 
 int CameraSession::queueRequest(Request *request)
 {
-	if (captureLimit_ && queueCount_ >= captureLimit_)
-		return 0;
-
 	queueCount_++;
 
 	return camera_->queueRequest(request);
-- 
2.35.1



More information about the libcamera-devel mailing list