{"id":11748,"url":"https://patchwork.libcamera.org/api/1.1/patches/11748/?format=json","web_url":"https://patchwork.libcamera.org/patch/11748/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20210328224528.55468-3-hiroh@chromium.org>","date":"2021-03-28T22:45:27","name":"[libcamera-devel,v2,2/3] android: CameraDevice: Log rotation variables in camera3_stream","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"6de2b38bfd9c91cf38eecba40162d2d5151a5d5f","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/1.1/people/63/?format=json","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/11748/mbox/","series":[{"id":1855,"url":"https://patchwork.libcamera.org/api/1.1/series/1855/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1855","date":"2021-03-28T22:45:25","name":"Regard crop_rotate_scale_degrees in configuration","version":2,"mbox":"https://patchwork.libcamera.org/series/1855/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/11748/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/11748/checks/","tags":{},"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 DBBE9C32EA\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 28 Mar 2021 22:45:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9C3876878B;\n\tMon, 29 Mar 2021 00:45:40 +0200 (CEST)","from mail-pl1-x635.google.com (mail-pl1-x635.google.com\n\t[IPv6:2607:f8b0:4864:20::635])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 87F316878B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 29 Mar 2021 00:45:39 +0200 (CEST)","by mail-pl1-x635.google.com with SMTP id d8so3499400plh.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 28 Mar 2021 15:45:39 -0700 (PDT)","from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:2:1db7:ae60:9288:b906])\n\tby smtp.gmail.com with ESMTPSA id\n\tq25sm14814244pff.104.2021.03.28.15.45.36\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSun, 28 Mar 2021 15:45:37 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"Aas611ZP\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=MYBHAvX6Lsm9+kuGa3isuRmZ/leiSfywV2SdpD6yFD8=;\n\tb=Aas611ZPdVOv+DIAHBhSXxu2mp3pca7v3RLfZ58KVaeXlO75kIurNOvzs1PwYIkoEW\n\tTPhHMLOjxocXNVGHl1ruHVWxkWcauezRWYQGaJc3KnbxMVyQVTnsvQnNH9YdbbzNvbvE\n\tn96k9c0O2tlUd+3f2rgjNJZZIyKkI14rHinBg=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=MYBHAvX6Lsm9+kuGa3isuRmZ/leiSfywV2SdpD6yFD8=;\n\tb=Q7F/Hy2O8D2fOrOUIRarEXQ6qwh7O/3JwnZSycG6Nj64zHiSWc/rPLuHn7RHwIntXR\n\tVKfa0d8qq0qyVOyDbPdv8WaVkMaP+fr68ce4G10rlq4MZacZRalHmviosSGTnsCKeegP\n\tCENa7r8WVRDj2gvU4aY/NzDNC8VQgt0sDAEKKcmHhzWSXiE/ZA3IiCoR4bYQFmI5b9fP\n\ty1jasTbo48LQoyYlUcwuMzP96jPbK45+a4Lkgq/XkVlJenmRBcPYzdjkrrhqtY3PBeuz\n\taMHyOBOcNFmH0oFBbkvfE0Z/hzV2zcjAg2qbDcw847z1wT4VCcney9wA/oD/+rkMNgDY\n\tDPIg==","X-Gm-Message-State":"AOAM530N3Y5Ie2r5Ra8u8eYEjKvD+4j/Ivx+tfYtkSsCw2Rr1VAzXZwC\n\tL4b2ZqfQBi5v0ZKwPR611ecidL8J8NkxZg==","X-Google-Smtp-Source":"ABdhPJxRjgzHWkrHSn2BUoyfAs3QiUB3zPeukH5lqEq1kwjjSajFcX9XBgVj55emouaSi4K1hiUcig==","X-Received":"by 2002:a17:90a:c7d5:: with SMTP id\n\tgf21mr22980802pjb.165.1616971537402; \n\tSun, 28 Mar 2021 15:45:37 -0700 (PDT)","From":"Hirokazu Honda <hiroh@chromium.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 29 Mar 2021 07:45:27 +0900","Message-Id":"<20210328224528.55468-3-hiroh@chromium.org>","X-Mailer":"git-send-email 2.31.0.291.g576ba9dcdaf-goog","In-Reply-To":"<20210328224528.55468-1-hiroh@chromium.org>","References":"<20210328224528.55468-1-hiroh@chromium.org>","MIME-Version":"1.0","Subject":"[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>","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>"},"content":"|rotation| and |crop_rotate_scale_degrees| are important info of\na configuration. They should be logged.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/android/camera_device.cpp | 17 +++++++++++++++++\n 1 file changed, 17 insertions(+)\n\n--\n2.31.0.291.g576ba9dcdaf-goog","diff":"diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 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+}\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())\n","prefixes":["libcamera-devel","v2","2/3"]}