[{"id":15984,"web_url":"https://patchwork.libcamera.org/comment/15984/","msgid":"<YGFYHi9J6w0OSr1h@pendragon.ideasonboard.com>","date":"2021-03-29T04:31:26","subject":"Re: [libcamera-devel] [PATCH v2 2/3] android: CameraDevice: Log\n\trotation variables in camera3_stream","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Hiro,\n\nThank you for the patch.\n\nOn Mon, Mar 29, 2021 at 07:45:27AM +0900, Hirokazu Honda wrote:\n> |rotation| and |crop_rotate_scale_degrees| are important info of\n> a configuration. They should be logged.\n> \n> Signed-off-by: Hirokazu Honda <hiroh@chromium.org>\n> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/android/camera_device.cpp | 17 +++++++++++++++++\n>  1 file changed, 17 insertions(+)\n> \n> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> index c5e55a18..d3368b19 100644\n> --- a/src/android/camera_device.cpp\n> +++ b/src/android/camera_device.cpp\n> @@ -256,6 +256,20 @@ void sortCamera3StreamConfigs(std::vector<Camera3StreamConfig> &unsortedConfigs,\n>  \tunsortedConfigs = sortedConfigs;\n>  }\n> \n> +const char *rotationToString(int rotation)\n> +{\n> +\tswitch (rotation) {\n> +\tcase CAMERA3_STREAM_ROTATION_0:\n> +\t\treturn \"ROTATION_0\";\n> +\tcase CAMERA3_STREAM_ROTATION_90:\n> +\t\treturn \"ROTATION_90\";\n> +\tcase CAMERA3_STREAM_ROTATION_180:\n> +\t\treturn \"ROTATION_180\";\n> +\tcase CAMERA3_STREAM_ROTATION_270:\n> +\t\treturn \"ROTATION_270\";\n> +\t}\n> +\treturn \"ROTATION_INVALID\";\n\nHow about dropping the ROTATION_ prefix in all of these ? The lines\nprinted to describe each stream are long enough already.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> +}\n>  /*\n>   * Returns where crop_rotate_scale_degrees in all camera3_stream in stream_list\n>   * are valid.\n> @@ -1625,6 +1639,9 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list)\n>  \t\t\t       << \", width: \" << stream->width\n>  \t\t\t       << \", height: \" << stream->height\n>  \t\t\t       << \", format: \" << utils::hex(stream->format)\n> +\t\t\t       << \", rotation: \" << rotationToString(stream->rotation)\n> +\t\t\t       << \", crop_rotate_scale_degrees: \"\n> +\t\t\t       << rotationToString(stream->crop_rotate_scale_degrees)\n>  \t\t\t       << \" (\" << format.toString() << \")\";\n> \n>  \t\tif (!format.isValid())","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 139ACC32EA\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 29 Mar 2021 04:32:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5F0DF68783;\n\tMon, 29 Mar 2021 06:32:11 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 898F9602D2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 29 Mar 2021 06:32:10 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0182731A;\n\tMon, 29 Mar 2021 06:32:09 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"sqyGtOYc\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1616992330;\n\tbh=NL12war5ZzTkqDsW0OpW7Rz13SPBPwM1GE9U5vFOIqw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=sqyGtOYctfNnUFov6OJK3h/Xx4X3d1zpJz20T1uMq7H5RaRDat8NaImRzcxlmQjc7\n\tQussRbWhv2ptIRd9aJcF2ZN2VJ6Lm2ZXK/F4aUcJbg/psrblKqCwKdunIcB2Fc6BJW\n\tqUBKtiC2LSRpUC4rD4SQGuJdxVl1LPtixbd+dHsM=","Date":"Mon, 29 Mar 2021 07:31:26 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Hirokazu Honda <hiroh@chromium.org>","Message-ID":"<YGFYHi9J6w0OSr1h@pendragon.ideasonboard.com>","References":"<20210328224528.55468-1-hiroh@chromium.org>\n\t<20210328224528.55468-3-hiroh@chromium.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210328224528.55468-3-hiroh@chromium.org>","Subject":"Re: [libcamera-devel] [PATCH v2 2/3] android: CameraDevice: Log\n\trotation variables in camera3_stream","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","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]