From 5085bc03bc14234bced8b194f4ed61f221d81852 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 12 Jul 2019 15:15:48 +0300 Subject: libcamera: Stop using Stream::bufferPool to get the number of buffers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The cam and qcam applications, as well as the camera capture test case, access the Stream::bufferPool in order to know how many requests to initially queue. As part of an effort to remove access to the buffer pool from applications, use the buffer count from the stream configuration instead. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- test/camera/capture.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test/camera') diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp index ff1cbd6c..e6bf7a8d 100644 --- a/test/camera/capture.cpp +++ b/test/camera/capture.cpp @@ -80,9 +80,8 @@ protected: } Stream *stream = cfg.stream(); - BufferPool &pool = stream->bufferPool(); std::vector requests; - for (unsigned int i = 0; i < pool.count(); ++i) { + for (unsigned int i = 0; i < cfg.bufferCount; ++i) { Request *request = camera_->createRequest(); if (!request) { cout << "Failed to create request" << endl; -- cgit v1.2.1