[libcamera-devel] [PATCH 19/38] libcamera: IPAProxy: Add isolate parameter to create()
Paul Elder
paul.elder at ideasonboard.com
Tue Sep 22 15:35:18 CEST 2020
Since IPAProxy implementations now always encapsulate IPA modules, add a
parameter to create() to signal if the proxy should isolate the IPA or not.
Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
---
Changes in v2:
- document isolate argument
---
include/libcamera/internal/ipa_proxy.h | 22 +++++++++++-----------
src/libcamera/ipa_proxy.cpp | 4 +++-
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/include/libcamera/internal/ipa_proxy.h b/include/libcamera/internal/ipa_proxy.h
index aec8f04f..1903150e 100644
--- a/include/libcamera/internal/ipa_proxy.h
+++ b/include/libcamera/internal/ipa_proxy.h
@@ -42,7 +42,7 @@ public:
IPAProxyFactory(const char *name);
virtual ~IPAProxyFactory() {}
- virtual std::unique_ptr<IPAProxy> create(IPAModule *ipam) = 0;
+ virtual std::unique_ptr<IPAProxy> create(IPAModule *ipam, bool isolate) = 0;
const std::string &name() const { return name_; }
@@ -53,16 +53,16 @@ private:
std::string name_;
};
-#define REGISTER_IPA_PROXY(proxy) \
-class proxy##Factory final : public IPAProxyFactory \
-{ \
-public: \
- proxy##Factory() : IPAProxyFactory(#proxy) {} \
- std::unique_ptr<IPAProxy> create(IPAModule *ipam) \
- { \
- return std::make_unique<proxy>(ipam); \
- } \
-}; \
+#define REGISTER_IPA_PROXY(proxy) \
+class proxy##Factory final : public IPAProxyFactory \
+{ \
+public: \
+ proxy##Factory() : IPAProxyFactory(#proxy) {} \
+ std::unique_ptr<IPAProxy> create(IPAModule *ipam, bool isolate) \
+ { \
+ return std::make_unique<proxy>(ipam, isolate); \
+ } \
+}; \
static proxy##Factory global_##proxy##Factory;
} /* namespace libcamera */
diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp
index 23be24ad..ee5e6f3e 100644
--- a/src/libcamera/ipa_proxy.cpp
+++ b/src/libcamera/ipa_proxy.cpp
@@ -250,10 +250,12 @@ IPAProxyFactory::IPAProxyFactory(const char *name)
* \fn IPAProxyFactory::create()
* \brief Create an instance of the IPAProxy corresponding to the factory
* \param[in] ipam The IPA module
+ * \param[in] isolate Flag to isolate the IPA module
*
* This virtual function is implemented by the REGISTER_IPA_PROXY() macro.
* It creates a IPAProxy instance that isolates an IPA interface designated
- * by the IPA module \a ipam.
+ * by the IPA module \a ipam. If \a isolate is true, then the IPA module will
+ * be isolated.
*
* \return A pointer to a newly constructed instance of the IPAProxy subclass
* corresponding to the factory
--
2.27.0
More information about the libcamera-devel
mailing list