[{"id":17851,"web_url":"https://patchwork.libcamera.org/comment/17851/","msgid":"<32296ed7-20b4-43b0-07d0-2bb8f320c3b6@ideasonboard.com>","date":"2021-06-28T04:28:47","subject":"Re: [libcamera-devel] [PATCH] libcamera: pipeline: simple:\n\tconverter: Improve error message","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Laurent,\n\nThank you for the patch.\n\nOn 6/28/21 12:30 AM, Laurent Pinchart wrote:\n> When the configuration of the converter fails due to format mismatch,\n> the error messages only indicates that a failure occurred. Improve it to\n> ease debugging by printing the requested and obtained formats.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n> ---\n>   src/libcamera/pipeline/simple/converter.cpp | 4 +++-\n>   1 file changed, 3 insertions(+), 1 deletion(-)\n>\n> diff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp\n> index 9af1096be834..3baf78f9364c 100644\n> --- a/src/libcamera/pipeline/simple/converter.cpp\n> +++ b/src/libcamera/pipeline/simple/converter.cpp\n> @@ -64,7 +64,9 @@ int SimpleConverter::Stream::configure(const StreamConfiguration &inputCfg,\n>   \tif (format.fourcc != videoFormat || format.size != inputCfg.size ||\n>   \t    format.planes[0].bpl != inputCfg.stride) {\n>   \t\tLOG(SimplePipeline, Error)\n> -\t\t\t<< \"Input format not supported\";\n> +\t\t\t<< \"Input format not supported (requested \"\n> +\t\t\t<< inputCfg.size.toString() << \"-\" << videoFormat.toString()\n> +\t\t\t<< \", got \" << format.toString() << \")\";\n>   \t\treturn -EINVAL;\n>   \t}\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 712FEC321A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Jun 2021 04:28:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2FF91684D7;\n\tMon, 28 Jun 2021 06:28:55 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9961E6028C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Jun 2021 06:28:53 +0200 (CEST)","from [IPv6:2409:4041:2d81:a1f7:cd6e:3470:7a1e:8c71] (unknown\n\t[IPv6:2409:4041:2d81:a1f7:cd6e:3470:7a1e:8c71])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 676F5B8A;\n\tMon, 28 Jun 2021 06:28:51 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"X9EEvrOG\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624854533;\n\tbh=OLNASp1poaavxETS2o3PmmoAKL528bY8Uh+M4zL48qM=;\n\th=Subject:To:References:From:Date:In-Reply-To:From;\n\tb=X9EEvrOGu5DoKCmkE7v0HUPTIY33Z3wFpla/3VGGgYxcaRu/Xn0ziYF67mLHuOSra\n\tiyqbkhzgHjgPfQO/AecspLtaN0fc3OqBoLdq0SyaYoNWx38JiFO6VN10Va03FzIbqV\n\t5CsO4KyxUjWZb1Rb0ECt+uYFWsyMj1L7KljeacA8=","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20210627190009.12272-1-laurent.pinchart@ideasonboard.com>","From":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<32296ed7-20b4-43b0-07d0-2bb8f320c3b6@ideasonboard.com>","Date":"Mon, 28 Jun 2021 09:58:47 +0530","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.10.2","MIME-Version":"1.0","In-Reply-To":"<20210627190009.12272-1-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Transfer-Encoding":"7bit","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH] libcamera: pipeline: simple:\n\tconverter: Improve error message","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17857,"web_url":"https://patchwork.libcamera.org/comment/17857/","msgid":"<20210628045741.GV2599@pyrite.rasen.tech>","date":"2021-06-28T04:57:41","subject":"Re: [libcamera-devel] [PATCH] libcamera: pipeline: simple:\n\tconverter: Improve error message","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Laurent,\n\nOn Sun, Jun 27, 2021 at 10:00:09PM +0300, Laurent Pinchart wrote:\n> When the configuration of the converter fails due to format mismatch,\n> the error messages only indicates that a failure occurred. Improve it to\n> ease debugging by printing the requested and obtained formats.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  src/libcamera/pipeline/simple/converter.cpp | 4 +++-\n>  1 file changed, 3 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp\n> index 9af1096be834..3baf78f9364c 100644\n> --- a/src/libcamera/pipeline/simple/converter.cpp\n> +++ b/src/libcamera/pipeline/simple/converter.cpp\n> @@ -64,7 +64,9 @@ int SimpleConverter::Stream::configure(const StreamConfiguration &inputCfg,\n>  \tif (format.fourcc != videoFormat || format.size != inputCfg.size ||\n>  \t    format.planes[0].bpl != inputCfg.stride) {\n>  \t\tLOG(SimplePipeline, Error)\n> -\t\t\t<< \"Input format not supported\";\n> +\t\t\t<< \"Input format not supported (requested \"\n> +\t\t\t<< inputCfg.size.toString() << \"-\" << videoFormat.toString()\n> +\t\t\t<< \", got \" << format.toString() << \")\";\n>  \t\treturn -EINVAL;\n>  \t}\n>  \n> -- \n> Regards,\n> \n> Laurent Pinchart\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 11888C321E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Jun 2021 04:57:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B7D43684D5;\n\tMon, 28 Jun 2021 06:57:50 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DE9466028C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Jun 2021 06:57:48 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 79C89B8A;\n\tMon, 28 Jun 2021 06:57:47 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"YfM3/+oq\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624856268;\n\tbh=pawrYGThhrG8zhtg4jo+I5hho7wJeOFxrvJe9k0gbuA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=YfM3/+oqzrjSJVxwqOTBAtf294l7OM39dcgYYmJs0c/vKj/6WhpFs6crk60bkmsSP\n\toapBNhIVu29SL0MuANKPaz6L08kjxo97pgCXQqOiM7HTNc25n8q9c16Sc9zyeU0c16\n\tGce0ZmERxMkyLVDM9PQ7EEzlkSWm220jYRI/Bw/8=","Date":"Mon, 28 Jun 2021 13:57:41 +0900","From":"paul.elder@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20210628045741.GV2599@pyrite.rasen.tech>","References":"<20210627190009.12272-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20210627190009.12272-1-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: pipeline: simple:\n\tconverter: Improve error message","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]