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]: f84522d7cd
This commit is contained in:
Barnabás Pőcze 2025-09-30 13:36:34 +02:00
parent 4fb0a0aeea
commit dcdb88d7b7

View file

@ -60,10 +60,7 @@ const libcamera::Span<const int64_t> 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)