From a4e6a5085b465216546b802e6bb9d55ecf278c63 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Thu, 21 Dec 2023 11:12:33 +0100 Subject: libcamera: Add 'required' property to controls Add to the ControlId class a 'required' boolean flag that determine if the control (or property) is mandatory to be supported by a Camera in order to comply with the libcamera API specification. Add support for a 'required' field to the controls and properties yaml file definition and control generation scripts. Also plumb support for the flag in the control serializer component to allow pass the information across IPC borders. Signed-off-by: Jacopo Mondi --- Documentation/guides/pipeline-handler.rst | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'Documentation/guides') diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst index 26dc9358..ad2a5beb 100644 --- a/Documentation/guides/pipeline-handler.rst +++ b/Documentation/guides/pipeline-handler.rst @@ -610,10 +610,15 @@ information can be found in the `ControlInfoMap`_ class documentation. .. _ControlInfoMap: https://libcamera.org/api-html/classlibcamera_1_1ControlInfoMap.html Pipeline handlers register controls to expose the tunable device and IPA -parameters to applications. Our example pipeline handler only exposes trivial -controls of the video device, by registering a ``ControlId`` instance with -associated values for each supported V4L2 control but demonstrates the mapping -of V4L2 Controls to libcamera ControlIDs. +parameters to applications and register properties to expose the Camera +immutable characteristics. Controls and properties which have the ``required`` +field specified in the YAML definition are mandatory to be supported by a Camera +in order for it to comply with the libcamera API specification. + +Our example pipeline handler only exposes trivial controls of the video device, +by registering a ``ControlId`` instance with associated values for each +supported V4L2 control but demonstrates the mapping of V4L2 Controls to +libcamera ControlIDs. Complete the initialization of the ``VividCameraData`` class by adding the following code to the ``VividCameraData::init()`` function to initialise the -- cgit v1.2.1