summaryrefslogtreecommitdiff
path: root/src/libcamera/ipa_module.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcamera/ipa_module.cpp')
-rw-r--r--src/libcamera/ipa_module.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp
index 5490f9b6..2663b9ef 100644
--- a/src/libcamera/ipa_module.cpp
+++ b/src/libcamera/ipa_module.cpp
@@ -18,6 +18,7 @@
#include <unistd.h>
#include "log.h"
+#include "pipeline_handler.h"
/**
* \file ipa_module.h
@@ -391,4 +392,23 @@ std::unique_ptr<IPAInterface> IPAModule::createInstance()
return std::unique_ptr<IPAInterface>(ipaCreate_());
}
+/**
+ * \brief Verify if the IPA module maches a given pipeline handler
+ * \param[in] pipe Pipeline handler to match with
+ * \param[in] minVersion Minimum acceptable version of IPA module
+ * \param[in] maxVersion Maximum acceptable version of IPA module
+ *
+ * This method checks if this IPA module matches the \a pipe pipeline handler,
+ * and the input version range.
+ *
+ * \return True if the pipeline handler matches the IPA module, or false otherwise
+ */
+bool IPAModule::match(PipelineHandler *pipe,
+ uint32_t minVersion, uint32_t maxVersion) const
+{
+ return info_.pipelineVersion >= minVersion &&
+ info_.pipelineVersion <= maxVersion &&
+ !strcmp(info_.pipelineName, pipe->name());
+}
+
} /* namespace libcamera */