From patchwork Sat Apr 3 13:10:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 11827 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 4C76FC0DA3 for ; Sat, 3 Apr 2021 13:10:28 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0B9CA68796; Sat, 3 Apr 2021 15:10:28 +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="RcPuCn85"; dkim-atps=neutral Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2A5CA602E6 for ; Sat, 3 Apr 2021 15:10:26 +0200 (CEST) Received: by mail-pg1-x52f.google.com with SMTP id d10so351864pgf.12 for ; Sat, 03 Apr 2021 06:10:26 -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=LU/wNcYg4zQL4s3IItBj4TUxdrY1GMeo1gXZ+FUj6lY=; b=RcPuCn85wYth2s7Syu5BHSLBJTpmJ6RtIIVZNud09lqDISklJg0fB8IHxOuSjnR/Fc 4aniNadtBqe9nFmtPoe5ck3C6Wz1DV7OLd1KQWfSyyXrXxk8J40O1C34mLmxrFnSfxpg xr6EbL0xihz1KFFIvqhrwr1E99AG868C4G4hM= 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=LU/wNcYg4zQL4s3IItBj4TUxdrY1GMeo1gXZ+FUj6lY=; b=lWt/iPBbIIwVs0ggOClB2lPuEK2K1PJd8OCowjL8K21xCeXVtJxyR62MNxLwm3stba PTeqNXrVYiH/vzDMxDrxzOEAzziMgrOY+sku9TU6k1cNZyjBHg1emk//br/sHxU95E92 Y0Ow1BjtOtCJW2Wdhk4e5T5IIgcXfPLrW3WzlwyBzLwx88G9vPt2XpZjV3hQKT0R51hD dgktVjr21nr4Ak7jgvw9xIj8+tNPFAxACwuFnA2eSjmOArVdW2z8T6HfoWXJ7I5nwl0O DSv1fHZxOMZ/bWjmA1UEaEpSL7ShvGGYZGp/EQ5ldBreIrX2KzLY2R12yVFpFK7xNajJ rOCw== X-Gm-Message-State: AOAM5321Bj4H21nZtwP2rkIJZd7I/CmqmU0jcH0GDB9Hs7adTEeZ/3XC QNen2M9+5SMjqkFlODVLuPZwFOtUoZ3lAA== X-Google-Smtp-Source: ABdhPJwvXNBGgZ1LNDnWN5y4Wz6L44yYXzVC3OMwOBOqrzNJl1k4oPrsTXeQ+7rUEupQbHNpiLEpCA== X-Received: by 2002:aa7:9f08:0:b029:20c:9997:aeea with SMTP id g8-20020aa79f080000b029020c9997aeeamr16241277pfr.18.1617455424015; Sat, 03 Apr 2021 06:10:24 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:d1f5:1b96:f027:f646]) by smtp.gmail.com with ESMTPSA id h6sm11303271pfb.157.2021.04.03.06.10.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Apr 2021 06:10:23 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Sat, 3 Apr 2021 22:10:14 +0900 Message-Id: <20210403131015.1590399-3-hiroh@chromium.org> X-Mailer: git-send-email 2.31.0.208.g409f899ff0-goog In-Reply-To: <20210403131015.1590399-1-hiroh@chromium.org> References: <20210403131015.1590399-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 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 3f7cce8e..ddac56da 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(OS_CHROMEOS) /* * Check whether the crop_rotate_scale_degrees values for all streams in @@ -1631,6 +1646,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(OS_CHROMEOS) + << ", crop_rotate_scale_degrees: " + << rotationToString(stream->crop_rotate_scale_degrees) +#endif << " (" << format.toString() << ")"; if (!format.isValid())