libcamera: pipeline_handler: Fix requestComplete on waiting requests on stop
The requestComplete signal is not emitted when the camera is stopped and the request is still in the waitingRequests_ queue. Fix that by calling doQueueRequest() on the waiting requests after marking them as cancelled. This ensures that the requests gets a proper sequence number and are added to the queuedRequests_ list. This list is then iterated in completeRequest() and leads to the requestComplete signal. Closes: https://gitlab.freedesktop.org/camera/libcamera/-/issues/281 Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
This commit is contained in:
@@ -380,7 +380,16 @@ void PipelineHandler::stop(Camera *camera)
|
||||
while (!waitingRequests.empty()) {
|
||||
Request *request = waitingRequests.front();
|
||||
waitingRequests.pop();
|
||||
cancelRequest(request);
|
||||
|
||||
/*
|
||||
* Cancel all requests by marking them as cancelled and calling
|
||||
* doQueueRequest() instead of cancelRequest(). This ensures
|
||||
* that the requests get a sequence number and are temporarily
|
||||
* added to queuedRequests_ so they can be properly completed in
|
||||
* completeRequest().
|
||||
*/
|
||||
request->_d()->cancel();
|
||||
doQueueRequest(request);
|
||||
}
|
||||
|
||||
/* Make sure no requests are pending. */
|
||||
|
||||
Reference in New Issue
Block a user