[libcamera-devel] [PATCH v4 07/13] android: camera_device: Report an error in notifyError()
Kieran Bingham
kieran.bingham at ideasonboard.com
Wed Aug 5 17:15:01 CEST 2020
If an error is generated, try to be verbose about it in the libcamera logs.
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>
Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
v2:
- Add todo to note possible debug info expansion
- Fix typo
- Print .toString() formatted pixel format
v3:
- Remove colon from todo:
---
src/android/camera_device.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 6235ef52df88..60af59ce154c 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;
--
2.25.1
More information about the libcamera-devel
mailing list