diff options
Diffstat (limited to 'src/apps')
-rw-r--r-- | src/apps/lc-compliance/simple_capture.cpp | 7 | ||||
-rw-r--r-- | src/apps/lc-compliance/simple_capture.h | 1 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/apps/lc-compliance/simple_capture.cpp b/src/apps/lc-compliance/simple_capture.cpp index ab5cb35c..cf4d7cf3 100644 --- a/src/apps/lc-compliance/simple_capture.cpp +++ b/src/apps/lc-compliance/simple_capture.cpp @@ -65,6 +65,7 @@ void SimpleCapture::stop() camera_->requestCompleted.disconnect(this); Stream *stream = config_->at(0).stream(); + requests_.clear(); allocator_->free(stream); } @@ -95,7 +96,6 @@ void SimpleCaptureBalanced::capture(unsigned int numRequests) captureLimit_ = numRequests; /* Queue the recommended number of reqeuests. */ - std::vector<std::unique_ptr<libcamera::Request>> requests; for (const std::unique_ptr<FrameBuffer> &buffer : buffers) { std::unique_ptr<Request> request = camera_->createRequest(); ASSERT_TRUE(request) << "Can't create request"; @@ -104,7 +104,7 @@ void SimpleCaptureBalanced::capture(unsigned int numRequests) ASSERT_EQ(queueRequest(request.get()), 0) << "Failed to queue request"; - requests.push_back(std::move(request)); + requests_.push_back(std::move(request)); } /* Run capture session. */ @@ -156,7 +156,6 @@ void SimpleCaptureUnbalanced::capture(unsigned int numRequests) captureLimit_ = numRequests; /* Queue the recommended number of reqeuests. */ - std::vector<std::unique_ptr<libcamera::Request>> requests; for (const std::unique_ptr<FrameBuffer> &buffer : buffers) { std::unique_ptr<Request> request = camera_->createRequest(); ASSERT_TRUE(request) << "Can't create request"; @@ -165,7 +164,7 @@ void SimpleCaptureUnbalanced::capture(unsigned int numRequests) ASSERT_EQ(camera_->queueRequest(request.get()), 0) << "Failed to queue request"; - requests.push_back(std::move(request)); + requests_.push_back(std::move(request)); } /* Run capture session. */ diff --git a/src/apps/lc-compliance/simple_capture.h b/src/apps/lc-compliance/simple_capture.h index fd9d2a97..2911d601 100644 --- a/src/apps/lc-compliance/simple_capture.h +++ b/src/apps/lc-compliance/simple_capture.h @@ -32,6 +32,7 @@ protected: std::shared_ptr<libcamera::Camera> camera_; std::unique_ptr<libcamera::FrameBufferAllocator> allocator_; std::unique_ptr<libcamera::CameraConfiguration> config_; + std::vector<std::unique_ptr<libcamera::Request>> requests_; }; class SimpleCaptureBalanced : public SimpleCapture |