libcamera: request: remove prepare()

The association of buffers to a request can be done directly in
addBuffer() instead of when the request is queued to the camera. Keep
the check that a request contains buffers by moving it to
Camera::queueRequest() where prepare() was previously called.

As a bonus we can remove a friend statement in Request.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Niklas Söderlund
2020-01-12 01:10:51 +01:00
parent 96eaad1238
commit 856a4a2527
4 changed files with 9 additions and 34 deletions

View File

@@ -360,7 +360,7 @@ Buffer::Buffer(unsigned int index, const Buffer *metadata)
* The intended callers of this method are buffer completion handlers that
* need to associate a buffer to the request it belongs to.
*
* A Buffer is associated to a request by Request::prepare() and the
* A Buffer is associated to a request by Request::addBuffer() and the
* association is valid until the buffer completes. The returned request
* pointer is valid only during that interval.
*
@@ -397,7 +397,7 @@ void Buffer::cancel()
* \fn Buffer::setRequest()
* \brief Set the request this buffer belongs to
*
* The intended callers are Request::prepare() and Request::completeBuffer().
* The intended callers are Request::addBuffer() and Request::completeBuffer().
*/
} /* namespace libcamera */