From 72263c5203d3a07cc235bc85f586dc14ff46b884 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 28 Jun 2020 23:28:30 +0300 Subject: libcamera: ipa_interface: Add support for custom IPA data to configure() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add two new parameters, ipaConfig and result, to the IPAInterface::configure() function to allow pipeline handlers to pass custom data to their IPA, and receive data back. Wire this through the code base. The C API interface will be addressed separately, likely through automation of the C <-> C++ translation. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Jacopo Mondi --- src/libcamera/proxy/ipa_proxy_linux.cpp | 4 +++- src/libcamera/proxy/ipa_proxy_thread.cpp | 11 ++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'src/libcamera/proxy') diff --git a/src/libcamera/proxy/ipa_proxy_linux.cpp b/src/libcamera/proxy/ipa_proxy_linux.cpp index be34f20a..68eafb30 100644 --- a/src/libcamera/proxy/ipa_proxy_linux.cpp +++ b/src/libcamera/proxy/ipa_proxy_linux.cpp @@ -31,7 +31,9 @@ public: void stop() override {} void configure(const CameraSensorInfo &sensorInfo, const std::map &streamConfig, - const std::map &entityControls) override {} + const std::map &entityControls, + const IPAOperationData &ipaConfig, + IPAOperationData *result) override {} void mapBuffers(const std::vector &buffers) override {} void unmapBuffers(const std::vector &ids) override {} void processEvent(const IPAOperationData &event) override {} diff --git a/src/libcamera/proxy/ipa_proxy_thread.cpp b/src/libcamera/proxy/ipa_proxy_thread.cpp index 6fbebed2..aa403e22 100644 --- a/src/libcamera/proxy/ipa_proxy_thread.cpp +++ b/src/libcamera/proxy/ipa_proxy_thread.cpp @@ -31,7 +31,9 @@ public: void configure(const CameraSensorInfo &sensorInfo, const std::map &streamConfig, - const std::map &entityControls) override; + const std::map &entityControls, + const IPAOperationData &ipaConfig, + IPAOperationData *result) override; void mapBuffers(const std::vector &buffers) override; void unmapBuffers(const std::vector &ids) override; void processEvent(const IPAOperationData &event) override; @@ -129,9 +131,12 @@ void IPAProxyThread::stop() void IPAProxyThread::configure(const CameraSensorInfo &sensorInfo, const std::map &streamConfig, - const std::map &entityControls) + const std::map &entityControls, + const IPAOperationData &ipaConfig, + IPAOperationData *result) { - ipa_->configure(sensorInfo, streamConfig, entityControls); + ipa_->configure(sensorInfo, streamConfig, entityControls, ipaConfig, + result); } void IPAProxyThread::mapBuffers(const std::vector &buffers) -- cgit v1.2.1