[libcamera-devel,RFC,07/10] libcamera: ipa: shim: add dummy shim

Message ID 20190605221817.966-8-paul.elder@ideasonboard.com
State Superseded
Headers show
Series
  • Add IPA process isolation
Related show

Commit Message

Paul Elder June 5, 2019, 10:18 p.m. UTC
Add a dummy shim.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
---
 src/ipa/shim_dummy.cpp | 53 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 src/ipa/shim_dummy.cpp

Patch

diff --git a/src/ipa/shim_dummy.cpp b/src/ipa/shim_dummy.cpp
new file mode 100644
index 0000000..4d28c2d
--- /dev/null
+++ b/src/ipa/shim_dummy.cpp
@@ -0,0 +1,53 @@ 
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2019, Google Inc.
+ *
+ * ipa_dummy.cpp - Dummy Image Processing Algorithm module
+ */
+
+#include <iostream>
+
+#include <libcamera/ipa/ipa_interface.h>
+#include <libcamera/ipa/ipa_module_info.h>
+
+namespace libcamera {
+
+class ShimDummy : public IPAInterface
+{
+public:
+	int init();
+	int init(const char *path);
+};
+
+int ShimDummy::init()
+{
+	std::cout << "okay shim init without path" << std::endl;
+	return 0;
+}
+
+int ShimDummy::init(const char *path)
+{
+	std::cout << "initializing dummy shim!" << std::endl;
+	return 0;
+}
+
+/*
+ * External IPA module interface
+ */
+
+extern "C" {
+const struct IPAModuleInfo ipaModuleInfo = {
+	IPA_MODULE_API_VERSION,
+	0,
+	"Shim",
+	"Dummy Shim",
+	1,
+};
+
+IPAInterface *ipaCreate()
+{
+	return new ShimDummy();
+}
+};
+
+}; /* namespace libcamera */