From 6e730695deef37b9a66bb9547df41d17d2872028 Mon Sep 17 00:00:00 2001 From: Paul Elder Date: Fri, 5 Jun 2020 14:58:58 +0900 Subject: libcamera: IPAManager: remove instance() and make createIPA() static MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As the only usage of IPAManager::instance() is by the pipeline handlers to call IPAManager::createIPA(), remove the former and make the latter static. Update the pipeline handlers and tests accordingly. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/libcamera/ipa_manager.cpp | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'src/libcamera/ipa_manager.cpp') diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp index e7fddf42..d7a75104 100644 --- a/src/libcamera/ipa_manager.cpp +++ b/src/libcamera/ipa_manager.cpp @@ -99,8 +99,7 @@ IPAManager *IPAManager::self_ = nullptr; * \brief Construct an IPAManager instance * * The IPAManager class is meant to only be instantiated once, by the - * CameraManager. Pipeline handlers shall use the instance() function to access - * the IPAManager instance. + * CameraManager. */ IPAManager::IPAManager() { @@ -159,19 +158,6 @@ IPAManager::~IPAManager() self_ = nullptr; } -/** - * \brief Retrieve the IPA manager instance - * - * The IPAManager is constructed by the CameraManager. This function shall be - * used to retrieve the single instance of the manager. - * - * \return The IPA manager instance - */ -IPAManager *IPAManager::instance() -{ - return self_; -} - /** * \brief Identify shared library objects within a directory * \param[in] libDir The directory to search for shared objects @@ -273,7 +259,7 @@ std::unique_ptr IPAManager::createIPA(PipelineHandler *pipe, { IPAModule *m = nullptr; - for (IPAModule *module : modules_) { + for (IPAModule *module : self_->modules_) { if (module->match(pipe, minVersion, maxVersion)) { m = module; break; @@ -289,7 +275,7 @@ std::unique_ptr IPAManager::createIPA(PipelineHandler *pipe, * * \todo Implement a better proxy selection */ - const char *proxyName = isSignatureValid(m) + const char *proxyName = self_->isSignatureValid(m) ? "IPAProxyThread" : "IPAProxyLinux"; IPAProxyFactory *pf = nullptr; -- cgit v1.2.1