From a1c5450be573ebcb1a5acc6453b5fcfdaa9593a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Mon, 25 Nov 2019 17:51:06 +0100 Subject: libcamera: camera: Remove the prepared state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the FrameBuffer rework completed there is no reason to keep the camera prepared state around as buffer allocations are now decoupled from the camera state. Remove the camera state simplifying the API. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- src/qcam/main_window.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/qcam') diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp index 047bf15e..1d9c756f 100644 --- a/src/qcam/main_window.cpp +++ b/src/qcam/main_window.cpp @@ -172,13 +172,6 @@ int MainWindow::startCapture() adjustSize(); - ret = camera_->allocateBuffers(); - if (ret) { - std::cerr << "Failed to allocate buffers" - << std::endl; - return ret; - } - ret = allocator_->allocate(stream); if (ret < 0) { std::cerr << "Failed to allocate capture buffers" << std::endl; @@ -244,7 +237,6 @@ error: } mappedBuffers_.clear(); - camera_->freeBuffers(); return ret; } @@ -264,7 +256,6 @@ void MainWindow::stopCapture() } mappedBuffers_.clear(); - camera_->freeBuffers(); isCapturing_ = false; config_.reset(); -- cgit v1.2.1