new file mode 100644
@@ -0,0 +1,36 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2018, Google Inc.
+ *
+ * ipu3_pipeline_manager.cpp - Intel IPU3 pipeline manager
+ */
+
+#include "hw/ipu3/ipu3_pipeline_manager.h"
+
+/**
+ * \file ipu3_pipeline_manager.h
+ * \brief Intel IPU3 pipeline manager
+ */
+
+namespace libcamera {
+
+/**
+ * \class IPU3PipelineManager
+ * \brief Intel IPU3 pipeline manager
+ */
+
+/**
+ * \fn int IPU3PipelineManager::init()
+ * \brief Initialize the IPU3 pipeline manager
+ *
+ * The Intel IPU3 ISP exposes two media controllers, one for the
+ * cio2 interface, and one for the imgU unit.
+ *
+ * Open and enumerate entities from both the media graphs.
+ */
+int IPU3PipelineManager::init()
+{
+ return 0;
+}
+
+} /* namespace libcamera */
new file mode 100644
@@ -0,0 +1,3 @@
+libcamera_sources += files([
+ 'ipu3_pipeline_manager.cpp',
+])
new file mode 100644
@@ -0,0 +1 @@
+subdir('ipu3')
new file mode 100644
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2018, Google Inc.
+ *
+ * ipu3_pipeline_manager.h - Intel IPU3 pipeline manager
+ */
+#ifndef __LIBCAMERA_HW_IPU3_PIPELINE_MANAGER_H__
+#define __LIBCAMERA_HW_IPU3_PIPELINE_MANAGER_H__
+
+#include "pipeline_manager.h"
+
+namespace libcamera {
+
+class IPU3PipelineManager : public PipelineManager
+{
+public:
+ ~IPU3PipelineManager() { }
+ int init(void);
+};
+
+} /* namespace libcamera */
+#endif /* __LIBCAMERA_HW_IPU3_PIPELINE_MANAGER_H__ */
new file mode 100644
@@ -0,0 +1,36 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2018, Google Inc.
+ *
+ * pipeline_manager.h - Media pipeline managers interface definition
+ */
+#ifndef __LIBCAMERA_PIPELINE_MANAGER_H__
+#define __LIBCAMERA_PIPELINE_MANAGER_H__
+
+/**
+ * \file pipeline_manager.h
+ */
+
+namespace libcamera {
+
+/**
+ * \class PipelineManager
+ * \brief Pure virtual pipeline manager base class
+ *
+ * The PipelineManager abstract class defines the pipeline manager
+ * interface that HW-specific implementations have to realize.
+ */
+class PipelineManager
+{
+public:
+ virtual ~PipelineManager() { };
+
+ /**
+ * \fn int PipelineManager::init()
+ * \brief Initialize the pipeline manager
+ */
+ virtual int init(void) = 0;
+};
+
+} /* namespace libcamera */
+#endif /* __LIBCAMERA_PIPELINE_MANAGER_H__ */
@@ -8,11 +8,18 @@
#include <libcamera/libcamera.h>
#include "log.h"
+#include "pipeline_manager.h"
+#include "hw/ipu3/ipu3_pipeline_manager.h"
namespace libcamera {
void libcamera::init_lib(void)
{
+ PipelineManager *pipeline = new IPU3PipelineManager;
+ int ret = pipeline->init();
+ if (ret)
+ LOG(Error) << "Failed to initialize pipeline manager: " << ret;
+
LOG(Info) << "Lib Camera Init";
}
@@ -13,6 +13,8 @@ includes = [
include_directories('include'),
]
+subdir('hw')
+
libcamera = shared_library('camera',
libcamera_sources,
install : true,
Add a pure virtual base class to define the PipelineManager interface and an empty IPU3 implementation of the hierarchy. This commit mostly validates the file hierarchy, build system and doxygen documentation. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> --- Patch based on current master + Laurent's Doxygen series + mine std=c++11 patch The resulting file hierarchy in the 'src' dir is the following one: $ tree src/ src/ ├── libcamera │ ├── hw │ │ ├── ipu3 │ │ │ ├── ipu3_pipeline_manager.cpp │ │ │ └── meson.build │ │ └── meson.build │ ├── include │ │ ├── hw │ │ │ └── ipu3 │ │ │ └── ipu3_pipeline_manager.h │ │ ├── log.h │ │ ├── pipeline_manager.h │ │ └── utils.h │ ├── log.cpp │ ├── main.cpp │ └── meson.build └── meson.build 6 directories, 11 files --- src/libcamera/hw/ipu3/ipu3_pipeline_manager.cpp | 36 ++++++++++++++++++++++ src/libcamera/hw/ipu3/meson.build | 3 ++ src/libcamera/hw/meson.build | 1 + .../include/hw/ipu3/ipu3_pipeline_manager.h | 22 +++++++++++++ src/libcamera/include/pipeline_manager.h | 36 ++++++++++++++++++++++ src/libcamera/main.cpp | 7 +++++ src/libcamera/meson.build | 2 ++ 7 files changed, 107 insertions(+) create mode 100644 src/libcamera/hw/ipu3/ipu3_pipeline_manager.cpp create mode 100644 src/libcamera/hw/ipu3/meson.build create mode 100644 src/libcamera/hw/meson.build create mode 100644 src/libcamera/include/hw/ipu3/ipu3_pipeline_manager.h create mode 100644 src/libcamera/include/pipeline_manager.h -- 2.7.4