summaryrefslogtreecommitdiff
path: root/test/camera
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-07-12 15:15:48 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-07-14 16:00:58 +0300
commit5085bc03bc14234bced8b194f4ed61f221d81852 (patch)
tree8033ce7f2db22d18f6cc6fd1df872c387437f00d /test/camera
parent4cb78e712c769e32ca46b5c7e41aa5d3f836bbbb (diff)
libcamera: Stop using Stream::bufferPool to get the number of buffers
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'test/camera')
-rw-r--r--test/camera/capture.cpp3
1 files changed, 1 insertions, 2 deletions
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<Request *> 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;