android: camera_device: Report an error in notifyError()

If an error is generated, try to be verbose about it in the libcamera logs.

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Kieran Bingham 2020-07-01 16:47:58 +01:00
parent 98986e0b57
commit 8ad1b9ca22

View file

@ -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;