From patchwork Thu Mar 25 05:19:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 11704 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 2EBEDC32E9 for ; Thu, 25 Mar 2021 05:19:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E1ABA68D6C; Thu, 25 Mar 2021 06:19:46 +0100 (CET) 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="R//9ZwEF"; dkim-atps=neutral Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8DCF1602D7 for ; Thu, 25 Mar 2021 06:19:44 +0100 (CET) Received: by mail-pj1-x1034.google.com with SMTP id il9-20020a17090b1649b0290114bcb0d6c2so2247319pjb.0 for ; Wed, 24 Mar 2021 22:19:44 -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=PZPYhm58v8yg1n+/LPY7yqvGtfUspXKfM7MF2dvZ+yk=; b=R//9ZwEFacpRU+rzkMKmGzfu3nLag7hsqnA60s651fI7jZ2RdmWDQrSirg3jSp1oIv mSiP9pqDqrl1HdcLLcBhBOwzAPeSVHcqW/UlTxnv6ub5JTkAkGewOZXzokjqxUB6mQeY 4qSI2NVaCfQ+nd9EVtoZ7nbq4jacNFArC5+T8= 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=PZPYhm58v8yg1n+/LPY7yqvGtfUspXKfM7MF2dvZ+yk=; b=QwQ4rpia80g5dgyJ+Shf/P3uSYcvmey+FjXYe4lyZuuY2ENJsfgTRt39UyP6Tlm2XX NQrtPzGHxIXqRqA0gbsnBnJufD0zQsDfNsQuHhop9MGa2K+7E/+6A/RaIxM1rdF6jypd ZJqpAtAgnVzDL8sz9IeTEDV19rdqstvb8TRVgr+zXZGznDeeYkpwriRYBZ7ejSx+Fvnr rRB2mB0CW+L36iWRBXTlt2qhGHd4VCMHekGWVpdsvasDZZl8IiNj0WBhvyIQL15D0x8V 8wgcLk9fVSp/1VzwYIl/EGqbfmJSgHBEQR60tayEdOCT+0UIpQhDcBoLQrsmCG89kxWJ saqA== X-Gm-Message-State: AOAM532LZZWFH6P8J0Z4dj+FgG8pmtLGfr1JsJND8MWx1Q59KejxI2vD Z9IodNIw+uH4cuzqPaHjym0pKQF+dNOuow== X-Google-Smtp-Source: ABdhPJxhlLUn+Lhn8U1zCPA/tvd9E5ghVDK8MOSIKtDQjJVYocLCSLGpVzu+WDEZeA83dVZS1FxwZA== X-Received: by 2002:a17:90b:38f:: with SMTP id ga15mr6993422pjb.149.1616649583035; Wed, 24 Mar 2021 22:19:43 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:7c07:24cd:c637:7fab]) by smtp.gmail.com with ESMTPSA id fs9sm3999250pjb.40.2021.03.24.22.19.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 22:19:42 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Thu, 25 Mar 2021 14:19:30 +0900 Message-Id: <20210325051931.3748204-3-hiroh@chromium.org> X-Mailer: git-send-email 2.31.0.291.g576ba9dcdaf-goog In-Reply-To: <20210325051931.3748204-1-hiroh@chromium.org> References: <20210325051931.3748204-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 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 --- 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 1414bfef..d24b0b23 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"; +} /* * verifyCropRotateScaleDegrees returns where |crop_rotate_scale_degrees| in * all camera3_stream in stream_list are valid. @@ -1635,6 +1649,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())