From fd554f9dba3171b624e584d50c7554f9c5f9cc52 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Fri, 24 Apr 2020 12:01:49 +0200 Subject: libcamera: ipa: Add support for CameraSensorInfo Add support for camera sensor information in the libcamera IPA protocol. Define a new 'struct ipa_sensor_info' structure in the IPA context and use it to perform translation between the C and the C++ API. Update the IPAInterface::configure() operation to accept a new CameraSensorInfo parameter and port all users of that function to the new interface. Signed-off-by: Jacopo Mondi --- src/libcamera/proxy/ipa_proxy_linux.cpp | 3 ++- src/libcamera/proxy/ipa_proxy_thread.cpp | 8 +++++--- 2 files changed, 7 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 cd8ac824..9e0f44cf 100644 --- a/src/libcamera/proxy/ipa_proxy_linux.cpp +++ b/src/libcamera/proxy/ipa_proxy_linux.cpp @@ -29,7 +29,8 @@ public: int init(const IPASettings &settings) override { return 0; } int start() override { return 0; } void stop() override {} - void configure(const std::map &streamConfig, + void configure(const CameraSensorInfo &sensorInfo, + const std::map &streamConfig, const std::map &entityControls) override {} void mapBuffers(const std::vector &buffers) override {} void unmapBuffers(const std::vector &ids) override {} diff --git a/src/libcamera/proxy/ipa_proxy_thread.cpp b/src/libcamera/proxy/ipa_proxy_thread.cpp index be82fde3..81d2d68e 100644 --- a/src/libcamera/proxy/ipa_proxy_thread.cpp +++ b/src/libcamera/proxy/ipa_proxy_thread.cpp @@ -29,7 +29,8 @@ public: int start() override; void stop() override; - void configure(const std::map &streamConfig, + void configure(const CameraSensorInfo &sensorInfo, + const std::map &streamConfig, const std::map &entityControls) override; void mapBuffers(const std::vector &buffers) override; void unmapBuffers(const std::vector &ids) override; @@ -126,10 +127,11 @@ void IPAProxyThread::stop() thread_.wait(); } -void IPAProxyThread::configure(const std::map &streamConfig, +void IPAProxyThread::configure(const CameraSensorInfo &sensorInfo, + const std::map &streamConfig, const std::map &entityControls) { - ipa_->configure(streamConfig, entityControls); + ipa_->configure(sensorInfo, streamConfig, entityControls); } void IPAProxyThread::mapBuffers(const std::vector &buffers) -- cgit v1.2.1