From 8ad1b9ca2231dc28846bd9e7f05fccfe24a383d3 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Wed, 1 Jul 2020 16:47:58 +0100 Subject: android: camera_device: Report an error in notifyError() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If an error is generated, try to be verbose about it in the libcamera logs. Reviewed-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Signed-off-by: Kieran Bingham --- src/android/camera_device.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/android/camera_device.cpp') diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index 30aec1d8..0a0bcedb 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -1294,6 +1294,13 @@ void CameraDevice::notifyError(uint32_t frameNumber, camera3_stream_t *stream) { camera3_notify_msg_t notify = {}; + /* + * \todo Report and identify the stream number or configuration to + * clarify the stream that failed. + */ + LOG(HAL, Error) << "Error occurred on frame " << frameNumber << " (" + << toPixelFormat(stream->format).toString() << ")"; + notify.type = CAMERA3_MSG_ERROR; notify.message.error.error_stream = stream; notify.message.error.frame_number = frameNumber; -- cgit v1.2.1