libcamera: camera: Do not call generateConfiguration() synchronously

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 14618cdd0c ("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 <barnabas.pocze@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Barnabás Pőcze
2025-07-21 13:53:10 +02:00
parent bd10ec4605
commit 4a469b302c

View File

@@ -1131,7 +1131,8 @@ std::unique_ptr<CameraConfiguration> Camera::generateConfiguration(Span<const St
return nullptr;
std::unique_ptr<CameraConfiguration> 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";