mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 07:19:45 +03:00
android: camera_device: Use abortRequest() instead of open-coding it
Call abortRequest() in CameraDevice::requestComplete() instead of open-coding it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
This commit is contained in:
parent
a769684815
commit
b393edb181
1 changed files with 6 additions and 15 deletions
|
@ -802,6 +802,11 @@ void CameraDevice::abortRequest(Camera3RequestDescriptor *descriptor) const
|
|||
notifyError(descriptor->frameNumber_, nullptr, CAMERA3_MSG_ERROR_REQUEST);
|
||||
|
||||
for (auto &buffer : descriptor->buffers_) {
|
||||
/*
|
||||
* Signal to the framework it has to handle fences that have not
|
||||
* been waited on by setting the release fence to the acquire
|
||||
* fence value.
|
||||
*/
|
||||
buffer.buffer.release_fence = buffer.buffer.acquire_fence;
|
||||
buffer.buffer.acquire_fence = -1;
|
||||
buffer.buffer.status = CAMERA3_BUFFER_STATUS_ERROR;
|
||||
|
@ -1083,21 +1088,7 @@ void CameraDevice::requestComplete(Request *request)
|
|||
<< " not successfully completed: "
|
||||
<< request->status();
|
||||
|
||||
notifyError(descriptor->frameNumber_, nullptr,
|
||||
CAMERA3_MSG_ERROR_REQUEST);
|
||||
|
||||
for (auto &buffer : descriptor->buffers_) {
|
||||
/*
|
||||
* Signal to the framework it has to handle fences that
|
||||
* have not been waited on by setting the release fence
|
||||
* to the acquire fence value.
|
||||
*/
|
||||
buffer.buffer.release_fence = buffer.buffer.acquire_fence;
|
||||
buffer.buffer.acquire_fence = -1;
|
||||
buffer.buffer.status = CAMERA3_BUFFER_STATUS_ERROR;
|
||||
}
|
||||
|
||||
descriptor->status_ = Camera3RequestDescriptor::Status::Error;
|
||||
abortRequest(descriptor);
|
||||
sendCaptureResults();
|
||||
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue