summaryrefslogtreecommitdiff
path: root/src/libcamera/ipa_interface.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-20 03:16:18 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-04-14 00:28:28 +0200
commit0219dc71b3c8eea8833f9a8214fac672b54613c2 (patch)
tree3ef4f4dc2226c5679a51ae6858eee16c1a1a351b /src/libcamera/ipa_interface.cpp
parent7b66e5f76d97cc4584bc2c7f79ae5018d87adc65 (diff)
libcamera: ipa_manager: Proxy open-source IPAs to a thread
While closed-source IPA modules will always be sandboxed, open-source IPA modules may be run in the main libcamera process or be sandboxed, depending on platform configuration. These two models exhibit very different timings, which require extensive testing with both configurations. When run into the main libcamera process, IPA modules are executed in the pipeline handler thread (which is currently a global CameraManager thread). Time-consuming operations in the IPA may thus slow down the pipeline handler and compromise real-time behaviour. At least some pipeline handlers will thus likely spawn a thread to isolate the IPA, leading to code duplication in pipeline handlers. Solve both issues by always proxying IPA modules. For open-source IPA modules that run in the libcamera process, a new IPAProxyThread class is added to run the IPA in a separate thread. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> [Niklas: Move thread start/stop of thread into start()/stop()] Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/libcamera/ipa_interface.cpp')
-rw-r--r--src/libcamera/ipa_interface.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcamera/ipa_interface.cpp b/src/libcamera/ipa_interface.cpp
index 0b785bdf..890d4340 100644
--- a/src/libcamera/ipa_interface.cpp
+++ b/src/libcamera/ipa_interface.cpp
@@ -528,6 +528,9 @@ namespace libcamera {
* \a data.operation field, as defined by the IPA protocol, and the rest of the
* \a data is interpreted accordingly. The pipeline handler shall queue the
* action and execute it as appropriate.
+ *
+ * The signal is only emitted when the IPA is running, that is after start() and
+ * before stop() have been called.
*/
} /* namespace libcamera */