From patchwork Sun Jun 27 19:00:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 12717 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 A4E81C321A for ; Sun, 27 Jun 2021 19:00:46 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 248CA684D5; Sun, 27 Jun 2021 21:00:46 +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="Kx1TO3uj"; 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 6D6D6684D0 for ; Sun, 27 Jun 2021 21:00:44 +0200 (CEST) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E614229A for ; Sun, 27 Jun 2021 21:00:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1624820444; bh=88e8dZCHHs8sdxJ8JJn7fbtCEBYNrpveQGONakjtLyY=; h=From:To:Subject:Date:From; b=Kx1TO3uj2iFsbw3wZwb4XCZYsD2xX0feGqOXzSXX3REKYRullt0s+osUOCwxxPDoW Yc+VuclZMIrsPGsFXFWEjzI+4wV4aW9rqnPN/D71ywWQpf/6CxsZEvoF2YkATlhrYU 3EiLYX0/Wgzj3MASq4k1tdb04sfNNis3L77/67jw= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sun, 27 Jun 2021 22:00:09 +0300 Message-Id: <20210627190009.12272-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: pipeline: simple: converter: Improve error message 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" When the configuration of the converter fails due to format mismatch, the error messages only indicates that a failure occurred. Improve it to ease debugging by printing the requested and obtained formats. Signed-off-by: Laurent Pinchart Reviewed-by: Umang Jain Reviewed-by: Paul Elder --- src/libcamera/pipeline/simple/converter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp index 9af1096be834..3baf78f9364c 100644 --- a/src/libcamera/pipeline/simple/converter.cpp +++ b/src/libcamera/pipeline/simple/converter.cpp @@ -64,7 +64,9 @@ int SimpleConverter::Stream::configure(const StreamConfiguration &inputCfg, if (format.fourcc != videoFormat || format.size != inputCfg.size || format.planes[0].bpl != inputCfg.stride) { LOG(SimplePipeline, Error) - << "Input format not supported"; + << "Input format not supported (requested " + << inputCfg.size.toString() << "-" << videoFormat.toString() + << ", got " << format.toString() << ")"; return -EINVAL; }