From 3bdc84aadbca2c64d5effc8cd706d012d039f755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Tue, 30 Sep 2025 13:36:34 +0200 Subject: [PATCH] spa: libcamera: device: adapt to libcamera change The interface of string typed controls has recently been changed in libcamera[0], which affects `properties::Model`, so adapt to that change in such a way that is compatible with both the new and old versions. [0]: https://gitlab.freedesktop.org/camera/libcamera/-/commit/f84522d7cd208b5123f0bd249ed1e160d35fdfb8 --- spa/plugins/libcamera/libcamera-device.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/spa/plugins/libcamera/libcamera-device.cpp b/spa/plugins/libcamera/libcamera-device.cpp index 49ef957e1..2d6532f82 100644 --- a/spa/plugins/libcamera/libcamera-device.cpp +++ b/spa/plugins/libcamera/libcamera-device.cpp @@ -60,10 +60,7 @@ const libcamera::Span cameraDevice(const Camera& camera) std::string cameraModel(const Camera& camera) { - if (auto model = camera.properties().get(properties::Model)) - return std::move(model.value()); - - return camera.id(); + return std::string(camera.properties().get(properties::Model).value_or(camera.id())); } const char *cameraLoc(const Camera& camera)