diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-10-14 02:08:44 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-10-15 22:33:33 +0300 |
commit | 319d6ae8e3ad1a47a674e85015de9ea811e84564 (patch) | |
tree | 7d1ccddf9997bb58be692e51bf217d49d8000622 /src/ipa | |
parent | c957c8580a30d5940f0d4893497f38e05c7f8e92 (diff) |
libcamera: controls: Merge ControlInfoMap and V4L2ControlInfoMap
The ControlInfoMap and V4L2ControlInfoMap classes are very similar, with
the latter adding convenience accessors based on numerical IDs for the
former, as well as a cached idmap. Both features can be useful for
ControlInfoMap in the context of serialisation, and merging the two
classes will further simplify the IPA API.
Import all the features of V4L2ControlInfoMap into ControlInfoMap,
turning the latter into a real class. A few new constructors and
assignment operators are added for completeness.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/ipa')
-rw-r--r-- | src/ipa/ipa_vimc.cpp | 2 | ||||
-rw-r--r-- | src/ipa/rkisp1/rkisp1.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/ipa/ipa_vimc.cpp b/src/ipa/ipa_vimc.cpp index 620dc25f..63d578b4 100644 --- a/src/ipa/ipa_vimc.cpp +++ b/src/ipa/ipa_vimc.cpp @@ -31,7 +31,7 @@ public: int init() override; void configure(const std::map<unsigned int, IPAStream> &streamConfig, - const std::map<unsigned int, V4L2ControlInfoMap> &entityControls) override {} + const std::map<unsigned int, ControlInfoMap> &entityControls) override {} void mapBuffers(const std::vector<IPABuffer> &buffers) override {} void unmapBuffers(const std::vector<unsigned int> &ids) override {} void processEvent(const IPAOperationData &event) override {} diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index d64c334c..bd703898 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -33,7 +33,7 @@ public: int init() override { return 0; } void configure(const std::map<unsigned int, IPAStream> &streamConfig, - const std::map<unsigned int, V4L2ControlInfoMap> &entityControls) override; + const std::map<unsigned int, ControlInfoMap> &entityControls) override; void mapBuffers(const std::vector<IPABuffer> &buffers) override; void unmapBuffers(const std::vector<unsigned int> &ids) override; void processEvent(const IPAOperationData &event) override; @@ -49,7 +49,7 @@ private: std::map<unsigned int, BufferMemory> bufferInfo_; - V4L2ControlInfoMap ctrls_; + ControlInfoMap ctrls_; /* Camera sensor controls. */ bool autoExposure_; @@ -62,7 +62,7 @@ private: }; void IPARkISP1::configure(const std::map<unsigned int, IPAStream> &streamConfig, - const std::map<unsigned int, V4L2ControlInfoMap> &entityControls) + const std::map<unsigned int, ControlInfoMap> &entityControls) { if (entityControls.empty()) return; |