summaryrefslogtreecommitdiff
path: root/src/libcamera/ipa_context_wrapper.cpp
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-03-26 14:28:56 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-04-14 00:28:28 +0200
commit0e577cee9def15d95ad5bd7fce3815a46dad8e81 (patch)
treeb446bdda32f9b0fe63d21e27e6fa497615cc0ce4 /src/libcamera/ipa_context_wrapper.cpp
parent72278369b30af757c8ab756cc6c9cadcf15684d5 (diff)
ipa: Add start() and stop() operations
Add two new operations to the IPA interface to start and stop it. The intention is that these functions shall be used by the IPA to perform actions when the camera is started and stopped. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/ipa_context_wrapper.cpp')
-rw-r--r--src/libcamera/ipa_context_wrapper.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/libcamera/ipa_context_wrapper.cpp b/src/libcamera/ipa_context_wrapper.cpp
index 946a2fd8..ab6ce396 100644
--- a/src/libcamera/ipa_context_wrapper.cpp
+++ b/src/libcamera/ipa_context_wrapper.cpp
@@ -82,6 +82,28 @@ int IPAContextWrapper::init()
return 0;
}
+int IPAContextWrapper::start()
+{
+ if (intf_)
+ return intf_->start();
+
+ if (!ctx_)
+ return 0;
+
+ return ctx_->ops->start(ctx_);
+}
+
+void IPAContextWrapper::stop()
+{
+ if (intf_)
+ return intf_->stop();
+
+ if (!ctx_)
+ return;
+
+ ctx_->ops->stop(ctx_);
+}
+
void IPAContextWrapper::configure(const std::map<unsigned int, IPAStream> &streamConfig,
const std::map<unsigned int, const ControlInfoMap &> &entityControls)
{