spa: libcamera: device: expose libcamera camera properties

A libcamera camera has a set of static properties found in `Camera::properties()`.
Some of the properties are already available for pipewire clients
(Model, Rotation, Location), most of them are not.

So serialize all properties into a strings and make them available on the
pipewire device. The keys have the form "api.libcamera.property.<vendor>.<name>"
and the values are intended to be valid json values, parsable by
python's `json.loads()` or qt's `QJsonValue::fromJson()`.

Controls of type "rectangle", "size", or "point" are not supported for now since
their json forms are not self-evident. They can be added when the need arises.
This commit is contained in:
Barnabás Pőcze 2026-01-19 17:00:31 +01:00
parent 0ac39e0e5d
commit 151ebb8663
2 changed files with 154 additions and 5 deletions

View file

@ -14,6 +14,7 @@
#define KEY_VERSION_LIBRARY "api.libcamera.version.library"
#define KEY_VERSION_HEADER "api.libcamera.version.header"
#define KEY_PROPERTY_PREFIX "api.libcamera.property"
extern "C" {