@@ -108,7 +108,8 @@ FrameBufferAllocator::~FrameBufferAllocator()
* Upon successful allocation, the allocated buffers can be retrieved with the
* buffers() method.
*
- * \return 0 on success or a negative error code otherwise
+ * \return The number of allocated buffers on success or a negative error code
+ * otherwise
* \retval -EACCES The camera is not in a state where buffers can be allocated
* \retval -EINVAL The \a stream does not belong to the camera or the stream is
* not part of the active camera configuration
@@ -140,12 +141,8 @@ int FrameBufferAllocator::allocate(Stream *stream)
return -EBUSY;
}
- int ret = camera_->pipe_->exportFrameBuffers(camera_.get(), stream,
- &buffers_[stream]);
- if (ret)
- return ret;
-
- return 0;
+ return camera_->pipe_->exportFrameBuffers(camera_.get(), stream,
+ &buffers_[stream]);
}
/**
@@ -316,7 +316,8 @@ const ControlInfoMap &PipelineHandler::controls(Camera *camera)
*
* The only intended caller is the FrameBufferAllocator helper.
*
- * \return 0 on success or a negative error code otherwise
+ * \return The number of allocated buffers on success or a negative error code
+ * otherwise
*/
/**
@@ -973,7 +973,8 @@ int V4L2VideoDevice::requestBuffers(unsigned int count)
* \brief Allocate buffers from the video device
* \param[in] count Number of buffers to allocate
* \param[out] buffers Vector to store allocated buffers
- * \return 0 on success or a negative error code otherwise
+ * \return The number of allocated buffers on success or a negative error code
+ * otherwise
*/
int V4L2VideoDevice::exportBuffers(unsigned int count,
std::vector<std::unique_ptr<FrameBuffer>> *buffers)