summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/rkisp1/rkisp1_path.h
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-09-24 17:24:49 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-09-30 14:24:42 +0200
commit62372b7164999c46bedf8aef75d57746ccd10397 (patch)
tree529522e2d879b97acfd3624b5966df2df51d7bc8 /src/libcamera/pipeline/rkisp1/rkisp1_path.h
parentdbe8d271e7959245f64056d26d95e94fe3ff737d (diff)
libcamera: pipeline: rkisp1: Breakout basic path handling to own class
The self and main paths are very similar and the introduction of support for two simultaneous streams have made it clear their handling could be abstracted in a separate class. This is the first step to create such a class by breaking out the initialization and storage of the video and subdevices. There is no functional change in this patch. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/rkisp1/rkisp1_path.h')
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1_path.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h
new file mode 100644
index 00000000..d3172e22
--- /dev/null
+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h
@@ -0,0 +1,46 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2020, Google Inc.
+ *
+ * rkisp1path.h - Rockchip ISP1 path helper
+ */
+#ifndef __LIBCAMERA_PIPELINE_RKISP1_PATH_H__
+#define __LIBCAMERA_PIPELINE_RKISP1_PATH_H__
+
+namespace libcamera {
+
+class MediaDevice;
+class V4L2Subdevice;
+class V4L2VideoDevice;
+
+class RkISP1Path
+{
+public:
+ RkISP1Path(const char *name);
+ ~RkISP1Path();
+
+ bool init(MediaDevice *media);
+
+ /* \todo Make resizer and video private. */
+ V4L2Subdevice *resizer_;
+ V4L2VideoDevice *video_;
+
+private:
+ const char *name_;
+};
+
+class RkISP1MainPath : public RkISP1Path
+{
+public:
+ RkISP1MainPath();
+};
+
+class RkISP1SelfPath : public RkISP1Path
+{
+public:
+ RkISP1SelfPath();
+};
+
+} /* namespace libcamera */
+
+#endif /* __LIBCAMERA_PIPELINE_RKISP1_PATH_H__ */