From patchwork Sun Mar 28 22:45:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 11748 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 DBBE9C32EA for ; Sun, 28 Mar 2021 22:45:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9C3876878B; Mon, 29 Mar 2021 00:45:40 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Aas611ZP"; dkim-atps=neutral Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 87F316878B for ; Mon, 29 Mar 2021 00:45:39 +0200 (CEST) Received: by mail-pl1-x635.google.com with SMTP id d8so3499400plh.11 for ; Sun, 28 Mar 2021 15:45:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MYBHAvX6Lsm9+kuGa3isuRmZ/leiSfywV2SdpD6yFD8=; b=Aas611ZPdVOv+DIAHBhSXxu2mp3pca7v3RLfZ58KVaeXlO75kIurNOvzs1PwYIkoEW TPhHMLOjxocXNVGHl1ruHVWxkWcauezRWYQGaJc3KnbxMVyQVTnsvQnNH9YdbbzNvbvE n96k9c0O2tlUd+3f2rgjNJZZIyKkI14rHinBg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MYBHAvX6Lsm9+kuGa3isuRmZ/leiSfywV2SdpD6yFD8=; b=Q7F/Hy2O8D2fOrOUIRarEXQ6qwh7O/3JwnZSycG6Nj64zHiSWc/rPLuHn7RHwIntXR VKfa0d8qq0qyVOyDbPdv8WaVkMaP+fr68ce4G10rlq4MZacZRalHmviosSGTnsCKeegP CENa7r8WVRDj2gvU4aY/NzDNC8VQgt0sDAEKKcmHhzWSXiE/ZA3IiCoR4bYQFmI5b9fP y1jasTbo48LQoyYlUcwuMzP96jPbK45+a4Lkgq/XkVlJenmRBcPYzdjkrrhqtY3PBeuz aMHyOBOcNFmH0oFBbkvfE0Z/hzV2zcjAg2qbDcw847z1wT4VCcney9wA/oD/+rkMNgDY DPIg== X-Gm-Message-State: AOAM530N3Y5Ie2r5Ra8u8eYEjKvD+4j/Ivx+tfYtkSsCw2Rr1VAzXZwC L4b2ZqfQBi5v0ZKwPR611ecidL8J8NkxZg== X-Google-Smtp-Source: ABdhPJxRjgzHWkrHSn2BUoyfAs3QiUB3zPeukH5lqEq1kwjjSajFcX9XBgVj55emouaSi4K1hiUcig== X-Received: by 2002:a17:90a:c7d5:: with SMTP id gf21mr22980802pjb.165.1616971537402; Sun, 28 Mar 2021 15:45:37 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:1db7:ae60:9288:b906]) by smtp.gmail.com with ESMTPSA id q25sm14814244pff.104.2021.03.28.15.45.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Mar 2021 15:45:37 -0700 (PDT) From: Hirokazu Honda 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 rotation variables in camera3_stream 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" |rotation| and |crop_rotate_scale_degrees| are important info of a configuration. They should be logged. Signed-off-by: Hirokazu Honda Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- src/android/camera_device.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) -- 2.31.0.291.g576ba9dcdaf-goog diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index c5e55a18..d3368b19 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -256,6 +256,20 @@ void sortCamera3StreamConfigs(std::vector &unsortedConfigs, unsortedConfigs = sortedConfigs; } +const char *rotationToString(int rotation) +{ + switch (rotation) { + case CAMERA3_STREAM_ROTATION_0: + return "ROTATION_0"; + case CAMERA3_STREAM_ROTATION_90: + return "ROTATION_90"; + case CAMERA3_STREAM_ROTATION_180: + return "ROTATION_180"; + case CAMERA3_STREAM_ROTATION_270: + return "ROTATION_270"; + } + return "ROTATION_INVALID"; +} /* * Returns where crop_rotate_scale_degrees in all camera3_stream in stream_list * are valid. @@ -1625,6 +1639,9 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list) << ", width: " << stream->width << ", height: " << stream->height << ", format: " << utils::hex(stream->format) + << ", rotation: " << rotationToString(stream->rotation) + << ", crop_rotate_scale_degrees: " + << rotationToString(stream->crop_rotate_scale_degrees) << " (" << format.toString() << ")"; if (!format.isValid())