summaryrefslogtreecommitdiff
path: root/src/libcamera/ipa_context_wrapper.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-27 02:36:18 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-28 01:54:49 +0300
commita6de9030893753e5428ee912fe7c52fbf93febd1 (patch)
treee82996e2e87c464919808663c443a3dcb99ea887 /src/libcamera/ipa_context_wrapper.cpp
parent26a4b03ed85e0cc39939028964ae4a8961c05d02 (diff)
ipa: Pass IPA initialization settings to IPAInterface::init()
Add a new IPASettings class to pass IPA initialization settings through the IPAInterface::init() method. The settings currently only contain the name of a configuration file, and are expected to be extended later. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/ipa_context_wrapper.cpp')
-rw-r--r--src/libcamera/ipa_context_wrapper.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libcamera/ipa_context_wrapper.cpp b/src/libcamera/ipa_context_wrapper.cpp
index ab6ce396..5bd5d916 100644
--- a/src/libcamera/ipa_context_wrapper.cpp
+++ b/src/libcamera/ipa_context_wrapper.cpp
@@ -69,15 +69,18 @@ IPAContextWrapper::~IPAContextWrapper()
ctx_->ops->destroy(ctx_);
}
-int IPAContextWrapper::init()
+int IPAContextWrapper::init(const IPASettings &settings)
{
if (intf_)
- return intf_->init();
+ return intf_->init(settings);
if (!ctx_)
return 0;
- ctx_->ops->init(ctx_);
+ struct ipa_settings c_settings;
+ c_settings.configuration_file = settings.configurationFile.c_str();
+
+ ctx_->ops->init(ctx_, &c_settings);
return 0;
}