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:
Niklas Söderlund 2019-11-22 17:31:08 +01:00
parent 13724144f9
commit dea689e1f2
9 changed files with 13 additions and 13 deletions

View file

@ -219,7 +219,7 @@ protected:
Stream *stream = *camera_->streams().begin();
std::unique_ptr<Buffer> buffer = stream->createBuffer(0);
if (request->addBuffer(std::move(buffer)))
if (request->addBuffer(stream, std::move(buffer)))
return TestFail;
if (camera_->queueRequest(request))