summaryrefslogtreecommitdiff
path: root/src/libcamera/camera.cpp
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2019-04-09 20:41:40 +0200
committerJacopo Mondi <jacopo@jmondi.org>2019-04-18 15:36:37 +0200
commite671485989cc308998db98ba17fc35224aaf5e14 (patch)
treeef65b7f3c24b3e9c0c6fedf16de6561f00040f83 /src/libcamera/camera.cpp
parent571d16b539df355a572a98bcbbdc2f9f1844a24d (diff)
libcamera: camera: Validate Request before queueing it
Extend the Request::prepare() operation to validate the request before preparing it. Return an error if the request is invalid, which for now is limited to ensuring that the request contains at least one buffer. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/camera.cpp')
-rw-r--r--src/libcamera/camera.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
index 2d0a8066..75a21008 100644
--- a/src/libcamera/camera.cpp
+++ b/src/libcamera/camera.cpp
@@ -713,9 +713,14 @@ Request *Camera::createRequest()
* \brief Queue a request to the camera
* \param[in] request The request to queue to the camera
*
- * This method queues a \a request allocated with createRequest() to the camera
- * for capture. Once the request has been queued, the camera will notify its
- * completion through the \ref requestCompleted signal.
+ * This method queues a \a request to the camera for capture.
+ *
+ * After allocating the request with createRequest(), the application shall
+ * fill it with at least one capture buffer before queuing it. Requests that
+ * contain no buffers are invalid and are rejected without being queued.
+ *
+ * Once the request has been queued, the camera will notify its completion
+ * through the \ref requestCompleted signal.
*
* Ownership of the request is transferred to the camera. It will be deleted
* automatically after it completes.