From patchwork Mon Aug 3 16:18:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 9146 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id AB547BD86F for ; Mon, 3 Aug 2020 16:18:28 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 733BD61B35; Mon, 3 Aug 2020 18:18:28 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="RTeL4JJM"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2BC65619A6 for ; Mon, 3 Aug 2020 18:18:25 +0200 (CEST) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8AFD8D98; Mon, 3 Aug 2020 18:18:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1596471503; bh=wkI9536wnTTr4ozf9rNXc3a5+hWQMqW9dN1micTDvuE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RTeL4JJMoU94teCcvWsovAGvH839+7mf6gcawEaO4LAKcwhvRGeVLSjwN+M1XHoyq uIrFEXvyNbcYZGzQ67JnQnQG/5Lp23cl/T//e8qhx3Y3Q5QdYvPTh0qxMYyzbT+CIe vk2bekYHs0mZTHGXVmhdvzfXkmSYHR6so9QC7HJ8= From: Kieran Bingham To: libcamera devel Date: Mon, 3 Aug 2020 17:18:10 +0100 Message-Id: <20200803161816.107113-7-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200803161816.107113-1-kieran.bingham@ideasonboard.com> References: <20200803161816.107113-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 06/12] android: camera_device: Report an error in notifyError() X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" If an error is generated, try to be verbose about it in the libcamera logs. Signed-off-by: Kieran Bingham Reviewed-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- v2: - Add todo to note possible debug info expansion - Fix typo - Print .toString() formatted pixel format v3: - Remove colon from todo: Note that the calling point of this function always gives stream zero anyway. 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 cf50821eec71..388945b1075c 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -1198,6 +1198,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;