libcamera: request: In addBuffer() do not fetch stream from Buffer
In the FrameBuffer interface the stream will not be available from the buffer object as the buffer might be allocated externally. The application needs to explicitly state which stream the buffer is being added for to the request. Extend the addBuffer() function to get this information explicitly from the caller. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
13724144f9
commit
dea689e1f2
9 changed files with 13 additions and 13 deletions
|
@ -49,7 +49,7 @@ protected:
|
|||
std::unique_ptr<Buffer> newBuffer = stream->createBuffer(buffer->index());
|
||||
|
||||
request = camera_->createRequest();
|
||||
request->addBuffer(std::move(newBuffer));
|
||||
request->addBuffer(stream, std::move(newBuffer));
|
||||
camera_->queueRequest(request);
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ protected:
|
|||
return TestFail;
|
||||
}
|
||||
|
||||
if (request->addBuffer(std::move(buffer))) {
|
||||
if (request->addBuffer(stream, std::move(buffer))) {
|
||||
cout << "Failed to associating buffer with request" << endl;
|
||||
return TestFail;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue