summaryrefslogtreecommitdiff
path: root/src/libcamera/include
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2019-05-10 19:09:29 -0400
committerPaul Elder <paul.elder@ideasonboard.com>2019-05-21 18:31:37 -0400
commitc1bbbd3b5b4706a31a7505fdd9ad65786764e2d7 (patch)
treea7324253b1bc1d621b61be3e0c68f7a8600b5498 /src/libcamera/include
parent06387039d6f59f8cb1829edfc09d2d9c8b33d62c (diff)
libcamera: ipa_module: add IPA shared library module
Implement a class to wrap around an IPA module shared object. For now, just load a struct IPAModuleInfo with symbol name ipaModuleInfo from an IPA module .so shared object. Also provide a public header file including the struct IPAModuleInfo, structured such that both C and C++ IPA modules are supported. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/include')
-rw-r--r--src/libcamera/include/ipa_module.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/libcamera/include/ipa_module.h b/src/libcamera/include/ipa_module.h
new file mode 100644
index 00000000..a4c6dbdf
--- /dev/null
+++ b/src/libcamera/include/ipa_module.h
@@ -0,0 +1,36 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2019, Google Inc.
+ *
+ * ipa_module.h - Image Processing Algorithm module
+ */
+#ifndef __LIBCAMERA_IPA_MODULE_H__
+#define __LIBCAMERA_IPA_MODULE_H__
+
+#include <string>
+
+#include <libcamera/ipa/ipa_module_info.h>
+
+namespace libcamera {
+
+class IPAModule
+{
+public:
+ explicit IPAModule(const std::string &libPath);
+
+ bool isValid() const;
+
+ const struct IPAModuleInfo &info() const;
+
+private:
+ struct IPAModuleInfo info_;
+
+ std::string libPath_;
+ bool valid_;
+
+ int loadIPAModuleInfo();
+};
+
+} /* namespace libcamera */
+
+#endif /* __LIBCAMERA_IPA_MODULE_H__ */