diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2021-05-04 16:02:33 +0200 |
---|---|---|
committer | Jacopo Mondi <jacopo@jmondi.org> | 2021-06-14 12:26:27 +0200 |
commit | a86d281e52c772c4d40c6b9578c1eec8de8c5ca2 (patch) | |
tree | 7b6952592c362706bf113b720c65aa777aa264ab /src/android/jpeg/thumbnailer.cpp | |
parent | 15196e5b76f184d3d27900749de0bf7010226261 (diff) |
android: Rework request completion notification
The current implementation of CameraDevice::requestComplete() which
handles event notification and calls the framework capture result
callback does not handle error notification precisely enough.
In detail:
- Error notification is an asynchronous callback that has to be notified
to the framework as soon as an error condition is detected, and it
independent from the process_capture_result() callback
- Error notification requires the HAL to report the precise error cause,
by specifying the correct CAMERA3_MSG_ERROR_* error code.
The current implementation only notifies errors of type
CAMERA3_MSG_ERROR_REQUEST at the end of the procedure, before the
callback invocation.
Rework the procedure to:
- Notify CAMERA3_MSG_ERROR_DEVICE and perform library tear-down in case
a Fatal error is detected
- Notify CAMERA3_MSG_ERROR_REQUEST if the libcamera::Request::status is
different than RequestCompleted and immediately call
process_capture_result() with all buffers in error state.
- Notify the shutter event as soon as possible
- Notify CAMERA3_MSG_ERROR_RESULT in case the metadata cannot be
generated correctly and call process_capture_result() with the right
buffer state regardless of metadata availability.
- Notify CAMERA3_MSG_ERROR_BUFFER for buffers whose post-processing
failed
While at it, return the CameraStream buffer by calling
cameraStream->putBuffer() regardless of the post-processing result.
No regression detected when running CTS in LIMITED mode.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/android/jpeg/thumbnailer.cpp')
0 files changed, 0 insertions, 0 deletions