[libcamera-devel] [PATCH v3 5/5] android: camera_device: Print the correct number of completed streams

Jacopo Mondi jacopo at jmondi.org
Sat Jun 4 11:30:25 CEST 2022


When a request completes, a debug message is generated to help
identify the request and the number of streams it contains.

The printed number of streams is however the number of output buffers
requested by the camera framework, not the number of streams generated
by libcamera. In facts, some output buffers are generated by
post-processing, and not directly from the camera.

As the debug message prints the libcamera identifier for the Request, it
is more logical to print the number of streams generated by the camera
instead of the total number of streams.

Reviewed-by: Hirokazu Honda <hiroh at chromium.org>
Reviewed-by: Paul Elder <paul.elder at ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain at ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
 src/android/camera_device.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 0be6114e3c2c..44e6a9fc6f9b 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -1184,7 +1184,7 @@ void CameraDevice::requestComplete(Request *request)
 	notifyShutter(descriptor->frameNumber_, sensorTimestamp);
 
 	LOG(HAL, Debug) << "Request " << request->cookie() << " completed with "
-			<< descriptor->buffers_.size() << " streams";
+			<< descriptor->request_->buffers().size() << " streams";
 
 	/*
 	 * Generate the metadata associated with the captured buffers.
-- 
2.35.1



More information about the libcamera-devel mailing list