[{"id":15898,"web_url":"https://patchwork.libcamera.org/comment/15898/","msgid":"<20210325105149.fxfltcp2s3d45zsf@uno.localdomain>","date":"2021-03-25T10:51:49","subject":"Re: [libcamera-devel] [PATCH 2/3] android: CameraDevice: Log\n\trotation variables in camera3_stream","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Hiro,\n\nOn Thu, Mar 25, 2021 at 02:19:30PM +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> ---\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 1414bfef..d24b0b23 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> +}\n>  /*\n>   *  verifyCropRotateScaleDegrees returns where |crop_rotate_scale_degrees| in\n>   * all camera3_stream in stream_list are valid.\n> @@ -1635,6 +1649,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\nOk, we also have rotation, not only crop_rotate_scale_degrees /-.-\\\nheadache++\n\nfor the patch\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n   j\n\n\n>  \t\t\t       << \" (\" << format.toString() << \")\";\n>\n>  \t\tif (!format.isValid())\n> --\n> 2.31.0.291.g576ba9dcdaf-goog\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 21869C32E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 25 Mar 2021 10:51:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6BCC168D6C;\n\tThu, 25 Mar 2021 11:51:17 +0100 (CET)","from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net\n\t[217.70.183.193])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8114968D58\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 25 Mar 2021 11:51:16 +0100 (CET)","from uno.localdomain (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay1-d.mail.gandi.net (Postfix) with ESMTPSA id D7B81240009;\n\tThu, 25 Mar 2021 10:51:15 +0000 (UTC)"],"X-Originating-IP":"93.61.96.190","Date":"Thu, 25 Mar 2021 11:51:49 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Hirokazu Honda <hiroh@chromium.org>","Message-ID":"<20210325105149.fxfltcp2s3d45zsf@uno.localdomain>","References":"<20210325051931.3748204-1-hiroh@chromium.org>\n\t<20210325051931.3748204-3-hiroh@chromium.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210325051931.3748204-3-hiroh@chromium.org>","Subject":"Re: [libcamera-devel] [PATCH 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>"}}]