ipa: Pass ControlInfoMap references to IPAInterface::configure()
The IPAInterface::configure() operation receives a map of ControlInfoMap instances. Pass const references instead to avoid copies when not required (the callee can still make manual copies), and to allow for the future serialization layer to keep references to the original object. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
parent
c0b437fd6c
commit
5f90d52d6e
5 changed files with 6 additions and 6 deletions
|
@ -43,7 +43,7 @@ public:
|
|||
virtual int init() = 0;
|
||||
|
||||
virtual void configure(const std::map<unsigned int, IPAStream> &streamConfig,
|
||||
const std::map<unsigned int, ControlInfoMap> &entityControls) = 0;
|
||||
const std::map<unsigned int, const ControlInfoMap &> &entityControls) = 0;
|
||||
|
||||
virtual void mapBuffers(const std::vector<IPABuffer> &buffers) = 0;
|
||||
virtual void unmapBuffers(const std::vector<unsigned int> &ids) = 0;
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
|
||||
int init() override;
|
||||
void configure(const std::map<unsigned int, IPAStream> &streamConfig,
|
||||
const std::map<unsigned int, ControlInfoMap> &entityControls) override {}
|
||||
const std::map<unsigned int, const 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 {}
|
||||
|
|
|
@ -33,7 +33,7 @@ public:
|
|||
int init() override { return 0; }
|
||||
|
||||
void configure(const std::map<unsigned int, IPAStream> &streamConfig,
|
||||
const std::map<unsigned int, ControlInfoMap> &entityControls) override;
|
||||
const std::map<unsigned int, const 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;
|
||||
|
@ -62,7 +62,7 @@ private:
|
|||
};
|
||||
|
||||
void IPARkISP1::configure(const std::map<unsigned int, IPAStream> &streamConfig,
|
||||
const std::map<unsigned int, ControlInfoMap> &entityControls)
|
||||
const std::map<unsigned int, const ControlInfoMap &> &entityControls)
|
||||
{
|
||||
if (entityControls.empty())
|
||||
return;
|
||||
|
|
|
@ -777,7 +777,7 @@ int PipelineHandlerRkISP1::start(Camera *camera)
|
|||
.size = data->stream_.configuration().size,
|
||||
};
|
||||
|
||||
std::map<unsigned int, ControlInfoMap> entityControls;
|
||||
std::map<unsigned int, const ControlInfoMap &> entityControls;
|
||||
entityControls.emplace(0, data->sensor_->controls());
|
||||
|
||||
data->ipa_->configure(streamConfig, entityControls);
|
||||
|
|
|
@ -28,7 +28,7 @@ public:
|
|||
|
||||
int init() override { return 0; }
|
||||
void configure(const std::map<unsigned int, IPAStream> &streamConfig,
|
||||
const std::map<unsigned int, ControlInfoMap> &entityControls) override {}
|
||||
const std::map<unsigned int, const 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 {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue