From 4a469b302cf34bbd1cd4ed7430dc483415525a67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Mon, 21 Jul 2025 13:53:10 +0200 Subject: [PATCH] libcamera: camera: Do not call `generateConfiguration()` synchronously MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Most pipeline handler methods are dispatched in the internal `CameraManager` thread. `PipelineHandler::generateConfiguration()` is called directly, however, which likely goes against the expectations, so call it on the internal thread. Before 14618cdd0c80a4 ("libcamera: base: bound_method: Move return value") this could not be done because the function returns `std::unique_ptr`, and that type cannot be copied. Bug: https://bugs.libcamera.org/show_bug.cgi?id=273 Signed-off-by: Barnabás Pőcze Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/libcamera/camera.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index 4154d840..2e1e146a 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -1131,7 +1131,8 @@ std::unique_ptr Camera::generateConfiguration(Span config = - d->pipe_->generateConfiguration(this, roles); + d->pipe_->invokeMethod(&PipelineHandler::generateConfiguration, + ConnectionTypeBlocking, this, roles); if (!config) { LOG(Camera, Debug) << "Pipeline handler failed to generate configuration";