[libcamera-devel,RFC,16/17] libcamera: IPAManager: Fetch IPAProxy corresponding to pipeline

Message ID 20200826110926.67192-17-paul.elder@ideasonboard.com
State Superseded
Headers show
Series
  • [libcamera-devel,RFC,01/17] IPA: IPC: raspberrypi: Add data definition and generated header
Related show

Commit Message

Paul Elder Aug. 26, 2020, 11:09 a.m. UTC
Now that each pipeline handler has its own IPAProxy implementation, make
the IPAManager fetch the IPAProxy based on the pipeline handler name.
Also, since the IPAProxy is used regardless of isolation or no
isolation, remove the isolation check from the proxy selection.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
---
 src/libcamera/ipa_manager.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp
index 046fd5c6..2d0ea242 100644
--- a/src/libcamera/ipa_manager.cpp
+++ b/src/libcamera/ipa_manager.cpp
@@ -275,8 +275,8 @@  std::unique_ptr<IPAProxy> IPAManager::createIPA(PipelineHandler *pipe,
 	 *
 	 * \todo Implement a better proxy selection
 	 */
-	const char *proxyName = self_->isSignatureValid(m)
-			      ? "IPAProxyThread" : "IPAProxyLinux";
+	std::string pipeName(pipe->name());
+	const char *proxyName = pipeName.replace(0, 15, "IPAProxy").c_str();
 	IPAProxyFactory *pf = nullptr;
 
 	for (IPAProxyFactory *factory : IPAProxyFactory::factories()) {