diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2021-07-28 11:59:00 +0200 |
---|---|---|
committer | Jacopo Mondi <jacopo@jmondi.org> | 2021-08-12 10:06:25 +0200 |
commit | b48db3c489d3af5989cc9a71b0843fc69adbcc1f (patch) | |
tree | ba18fa50459de3f09b184973adaafe17b21df49c /src/lc-compliance/meson.build | |
parent | 0e1ff86e78ae1813b29972ce4a682ad99dbb41e3 (diff) |
libcamera: controls: Create ControlInfoMap with ControlIdMap
ControlInfoMap does not have a ControlId map associated, but rather
creates one with the generateIdMap() function at creation time.
As a consequence, when in the need to de-serialize a ControlInfoMap all
the ControlId it contains are created by the deserializer instance, not
being able to discern if the controls the ControlIdMap refers to are the
global libcamera controls (and properties) or instances local to the
V4L2 device that has first initialized the controls.
As a consequence the ControlId stored in a de-serialized map will always
be newly created entities, preventing lookup by ControlId reference on a
de-serialized ControlInfoMap.
In order to make it possible to use globally available ControlId
instances whenever possible, create ControlInfoMap with a reference to
an externally allocated ControlIdMap instead of generating one
internally.
As a consequence the class constructors take and additional argument,
which might be not pleasant to type in, but enforces the concepts that
ControlInfoMap should be created with controls part of the same id map.
As the ControlIdMap the ControlInfoMap refers to needs to be allocated
externally:
- Use the globally available controls::controls (or
properties::properties) id map when referring to libcamera controls
- The V4L2 device that creates ControlInfoMap by parsing the device's
controls has to allocate a ControlIdMap
- The ControlSerializer that de-serializes a ControlInfoMap has to
create and store the ControlIdMap the de-serialized info map refers to
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/lc-compliance/meson.build')
0 files changed, 0 insertions, 0 deletions