From df64542035f7aab6f6d8eec801a9fcb9f19bed60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Thu, 24 Sep 2020 23:16:25 +0200 Subject: libcamera: pipeline: rkisp1: Move path configuration generation and validation to RkISP1Path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Laurent Pinchart --- src/libcamera/pipeline/rkisp1/rkisp1_path.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/libcamera/pipeline/rkisp1/rkisp1_path.h') 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 + +#include +#include +#include +#include + namespace libcamera { class MediaDevice; @@ -18,11 +25,15 @@ struct V4L2SubdeviceFormat; class RkISP1Path { public: - RkISP1Path(const char *name); + RkISP1Path(const char *name, const Span &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 formats_; + const Size minResolution_; + const Size maxResolution_; + V4L2Subdevice *resizer_; }; -- cgit v1.2.1