From patchwork Tue Mar 30 05:25:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 11783 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 A6FBAC32F0 for ; Tue, 30 Mar 2021 05:25:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5155568787; Tue, 30 Mar 2021 07:25:36 +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="LK5P1HNp"; dkim-atps=neutral Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 99C696877F for ; Tue, 30 Mar 2021 07:25:33 +0200 (CEST) Received: by mail-pg1-x52d.google.com with SMTP id k8so1726694pgf.4 for ; Mon, 29 Mar 2021 22:25:33 -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=uzJ5NBH/VKVvgZ8hs4XPVTW2Cjo7mcmmi+r7ZDRXFN0=; b=LK5P1HNpip8OSedLYC0P9HDPjNUtzP0fvriZvlC5DHFYws8MATbiAARkQAlNF/arMp mcGSdaLF+V4RUNu5GaPid533toK7Wu3bmskrG4w/bRJYfOHYD0vvZ6s/Dx6lBhsV31pm Wb/tjsCuHIe8cInYmYw3gsc0fIG9aOq2N6lQM= 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=uzJ5NBH/VKVvgZ8hs4XPVTW2Cjo7mcmmi+r7ZDRXFN0=; b=eVdzpDoEQMhJEsh39KGJBkd1HywnJE3U8UbC4ej/qSjGdcqOLgurnoVtNBYRPt0BEl CBQufjVAr6VGWDqGsxtEtW8i0SZGWNfkY5JDlXpUb1K7xmadI9dBwhrKrCZaCVWB04lr Ppxy9tSEvo3q0Y2nKurv28CvAE1a13/vADLJeQeucysWE3a0NYHt/SOiF7budplRuNph eISHYKEji9aff7u1TSSxibV3xTtp5YeBsyb/xzfWsMZpSvUc2YRi5FM61f76WOLhzOXx dPMDWJKxZx0+l7GGXb0/lZzH+nyqRm1Y+apO+EXiwORHHCCrb2K2/JVTZBFpuPDGZOae NUUQ== X-Gm-Message-State: AOAM531Q4AMJGiVfSNl37mGgpxLYxJ32YKs0dO/PAvzQr3ZQeMdOcgDj mgjrc7cpdqnpy0dWBfT7vxtPfrFChu+ekQ== X-Google-Smtp-Source: ABdhPJzppM1fI2BVHtW1BNXp8kbW+OYbgSE3d2NDSmKxquGWYv7tqSFUvBOE2kqbmSy3j1YgNJuW+g== X-Received: by 2002:a63:d449:: with SMTP id i9mr26133523pgj.227.1617081932056; Mon, 29 Mar 2021 22:25:32 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:c112:2822:484f:486]) by smtp.gmail.com with ESMTPSA id u79sm19726006pfc.207.2021.03.29.22.25.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Mar 2021 22:25:31 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Tue, 30 Mar 2021 14:25:20 +0900 Message-Id: <20210330052521.381550-4-hiroh@chromium.org> X-Mailer: git-send-email 2.31.0.291.g576ba9dcdaf-goog In-Reply-To: <20210330052521.381550-1-hiroh@chromium.org> References: <20210330052521.381550-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 3/4] 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 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index f88e94bc..e0eaa3b5 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -256,6 +256,21 @@ void sortCamera3StreamConfigs(std::vector &unsortedConfigs, unsortedConfigs = sortedConfigs; } +const char *rotationToString(int rotation) +{ + switch (rotation) { + case CAMERA3_STREAM_ROTATION_0: + return "0"; + case CAMERA3_STREAM_ROTATION_90: + return "90"; + case CAMERA3_STREAM_ROTATION_180: + return "180"; + case CAMERA3_STREAM_ROTATION_270: + return "270"; + } + return "INVALID"; +} + #if defined(CHROMEOS) /* * Check whether the crop_rotate_scale_degrees values for all streams in @@ -1632,6 +1647,11 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list) << ", width: " << stream->width << ", height: " << stream->height << ", format: " << utils::hex(stream->format) + << ", rotation: " << rotationToString(stream->rotation) +#if defined(CHROMEOS) + << ", crop_rotate_scale_degrees: " + << rotationToString(stream->crop_rotate_scale_degrees) +#endif << " (" << format.toString() << ")"; if (!format.isValid())