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 23:16:25 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-09-30 14:24:42 +0200
commitdf64542035f7aab6f6d8eec801a9fcb9f19bed60 (patch)
treeea06addf17afe1cd6d8ad0bf040b65f8ddf4a599 /src/libcamera/pipeline/rkisp1/rkisp1_path.h
parentdf2af09050514c64c4af8cef0581423a705490af (diff)
libcamera: pipeline: rkisp1: Move path configuration generation and validation to RkISP1Path
Move the path configuration generation and validation to RkISP1Path. This is done to increase code reuse and to encapsulate the main and self path differences inside the RkISP1Path class. There is no functional change. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> 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.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h
index 6eb01529..7433ad03 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h
+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h
@@ -7,6 +7,13 @@
#ifndef __LIBCAMERA_PIPELINE_RKISP1_PATH_H__
#define __LIBCAMERA_PIPELINE_RKISP1_PATH_H__
+#include <vector>
+
+#include <libcamera/camera.h>
+#include <libcamera/geometry.h>
+#include <libcamera/pixel_format.h>
+#include <libcamera/span.h>
+
namespace libcamera {
class MediaDevice;
@@ -18,11 +25,15 @@ struct V4L2SubdeviceFormat;
class RkISP1Path
{
public:
- RkISP1Path(const char *name);
+ RkISP1Path(const char *name, const Span<const PixelFormat> &formats,
+ const Size &minResolution, const Size &maxResolution);
~RkISP1Path();
bool init(MediaDevice *media);
+ StreamConfiguration generateConfiguration(const Size &resolution);
+ CameraConfiguration::Status validate(StreamConfiguration *cfg);
+
int configure(const StreamConfiguration &config,
const V4L2SubdeviceFormat &inputFormat);
@@ -30,8 +41,14 @@ public:
V4L2VideoDevice *video_;
private:
+ static constexpr unsigned int RKISP1_BUFFER_COUNT = 4;
+
const char *name_;
+ const Span<const PixelFormat> formats_;
+ const Size minResolution_;
+ const Size maxResolution_;
+
V4L2Subdevice *resizer_;
};