summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/request.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
index e0e77e97..e5c25d2c 100644
--- a/src/libcamera/request.cpp
+++ b/src/libcamera/request.cpp
@@ -107,6 +107,14 @@ Buffer *Request::findBuffer(Stream *stream) const
*/
/**
+ * \fn Request::hasPendingBuffers()
+ * \brief Check if a request has buffers yet to be completed
+ *
+ * \return True if the request has buffers pending for completion, false
+ * otherwise
+ */
+
+/**
* \brief Prepare the resources for the completion handler
*/
int Request::prepare()
@@ -127,7 +135,7 @@ int Request::prepare()
*/
void Request::complete(Status status)
{
- ASSERT(pending_.empty());
+ ASSERT(!hasPendingBuffers());
status_ = status;
}
@@ -149,7 +157,7 @@ bool Request::completeBuffer(Buffer *buffer)
int ret = pending_.erase(buffer);
ASSERT(ret == 1);
- return pending_.empty();
+ return !hasPendingBuffers();
}
} /* namespace libcamera */