From afef18d35ab919f7efbb93295a0f8955bceb33b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Sun, 26 May 2019 20:42:12 +0200 Subject: cam: Move camera configuration preparation to CamApp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Most of the camera configuration preparation that is done in the Capture module is not specific to capturing and could be useful for other modules. Extract the generic parts to CamApp and do basic preparation of the configuration before passing it to modules. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- src/cam/capture.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/cam/capture.h') diff --git a/src/cam/capture.h b/src/cam/capture.h index a97d1f44..1d4a25a8 100644 --- a/src/cam/capture.h +++ b/src/cam/capture.h @@ -20,19 +20,18 @@ class Capture { public: - Capture(libcamera::Camera *camera); + Capture(libcamera::Camera *camera, + libcamera::CameraConfiguration *config); int run(EventLoop *loop, const OptionsParser::Options &options); private: - int prepareConfig(const OptionsParser::Options &options); - int capture(EventLoop *loop); void requestComplete(libcamera::Request *request, const std::map &buffers); libcamera::Camera *camera_; - std::unique_ptr config_; + libcamera::CameraConfiguration *config_; std::map streamName_; BufferWriter *writer_; -- cgit v1.2.1