diff options
Diffstat (limited to 'src/libcamera')
-rw-r--r-- | src/libcamera/include/ipa_context_wrapper.h | 2 | ||||
-rw-r--r-- | src/libcamera/ipa_context_wrapper.cpp | 22 | ||||
-rw-r--r-- | src/libcamera/ipa_interface.cpp | 32 | ||||
-rw-r--r-- | src/libcamera/proxy/ipa_proxy_linux.cpp | 2 |
4 files changed, 58 insertions, 0 deletions
diff --git a/src/libcamera/include/ipa_context_wrapper.h b/src/libcamera/include/ipa_context_wrapper.h index c9e19412..0a48bfe7 100644 --- a/src/libcamera/include/ipa_context_wrapper.h +++ b/src/libcamera/include/ipa_context_wrapper.h @@ -20,6 +20,8 @@ public: ~IPAContextWrapper(); int init() override; + int start() override; + void stop() override; void configure(const std::map<unsigned int, IPAStream> &streamConfig, const std::map<unsigned int, const ControlInfoMap &> &entityControls) override; 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) { diff --git a/src/libcamera/ipa_interface.cpp b/src/libcamera/ipa_interface.cpp index 5959e7de..0b785bdf 100644 --- a/src/libcamera/ipa_interface.cpp +++ b/src/libcamera/ipa_interface.cpp @@ -236,6 +236,20 @@ */ /** + * \var ipa_context_ops::start + * \brief Start the IPA context + * + * \sa libcamera::IPAInterface::start() + */ + +/** + * \var ipa_context_ops::stop + * \brief Stop the IPA context + * + * \sa libcamera::IPAInterface::stop() + */ + +/** * \var ipa_context_ops::register_callbacks * \brief Register callback operation from the IPA to the pipeline handler * \param[in] ctx The IPA context @@ -413,6 +427,24 @@ namespace libcamera { */ /** + * \fn IPAInterface::start() + * \brief Start the IPA + * + * This method informs the IPA module that the camera is about to be started. + * The IPA module shall prepare any resources it needs to operate. + * + * \return 0 on success or a negative error code otherwise + */ + +/** + * \fn IPAInterface::stop() + * \brief Stop the IPA + * + * This method informs the IPA module that the camera is stopped. The IPA module + * shall release resources prepared in start(). + */ + +/** * \fn IPAInterface::configure() * \brief Configure the IPA stream and sensor settings * \param[in] streamConfig Configuration of all active streams diff --git a/src/libcamera/proxy/ipa_proxy_linux.cpp b/src/libcamera/proxy/ipa_proxy_linux.cpp index c7218fb4..2aa80b94 100644 --- a/src/libcamera/proxy/ipa_proxy_linux.cpp +++ b/src/libcamera/proxy/ipa_proxy_linux.cpp @@ -27,6 +27,8 @@ public: ~IPAProxyLinux(); int init() override { return 0; } + int start() override { return 0; } + void stop() override {} void configure(const std::map<unsigned int, IPAStream> &streamConfig, const std::map<unsigned int, const ControlInfoMap &> &entityControls) override {} void mapBuffers(const std::vector<IPABuffer> &buffers) override {} |