From patchwork Tue Oct 20 07:42:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 10123 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 38D53BDB13 for ; Tue, 20 Oct 2020 07:42:45 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 03DDA60353; Tue, 20 Oct 2020 09:42:45 +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="EU/ORs1+"; dkim-atps=neutral Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0AB866052F for ; Tue, 20 Oct 2020 09:42:43 +0200 (CEST) Received: by mail-pf1-x435.google.com with SMTP id a200so686986pfa.10 for ; Tue, 20 Oct 2020 00:42:42 -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=QWv+f2AKbdD4kKXg1LU+l+aZjUgqahucd+R0EdJRvEU=; b=EU/ORs1+f0qX/hsbd1YI5kaV135Ht27jREDNn9CKoT2H1BjGsMyUtMXCUIO8luJaVK yuNbGOvSI9IRV1R0qpvwZkb+DstbCjR0sHfE6tsqQ5x0m/S+m+g6TbhvRAK3/MU6FzMu ffL4cxrHkQF9jLwcNfhhnYNBU8IOR0o5BQLYQ= 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=QWv+f2AKbdD4kKXg1LU+l+aZjUgqahucd+R0EdJRvEU=; b=mWVBBAbzjr2+EJGb3PgxFD6XHCNZZsrB301xOiHzPtDJXhy1t3fbMeQMieyrrHR79f M1iirkqKBZFwBF65aR0Ubc8K2i6JO0/iz0M1rwEV8WNQCdeuyV9H9q9f+oXatWGisTPR lJHBl9x77eSBoy8JiF6UXipF84b1+CZGfewY+mNIQ//dF8hzQIx9kDcPSZUS7408ZyOq Q/hZwjvXcAM53VvWZJxFQBGNkWx5iK9bcu3NvoasUZwk5gL8BWIpKWvYJ/43jQSE2j2G Q1kHUYmIBUn7Rofz0aD0ELr6SbK+4S7tYgwV8jMxgymS6RlolfbKzBxuxtRqNEQnIpKv NL5A== X-Gm-Message-State: AOAM533EJlcqXRDB4hI3JKdeYuksfFEWMM4p5RZxyf6oC8XoRT6+ngVG zrhEO9wIuUnJJpz7ysJWvPNb2E8fpwUENA== X-Google-Smtp-Source: ABdhPJwkTtTOV9foeilfoWwHJg//Y7rvfAZ+ygBq9Jqchcnu9scjOt3dbYcIQnufB2s4L13/RlDLMw== X-Received: by 2002:a65:4144:: with SMTP id x4mr1580062pgp.432.1603179761527; Tue, 20 Oct 2020 00:42:41 -0700 (PDT) Received: from hiroh.tok.corp.google.com ([2401:fa00:8f:2:de4a:3eff:fe7d:f78f]) by smtp.gmail.com with ESMTPSA id d26sm1193684pfo.82.2020.10.20.00.42.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 00:42:40 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Tue, 20 Oct 2020 16:42:28 +0900 Message-Id: <20201020074229.119151-3-hiroh@chromium.org> X-Mailer: git-send-email 2.29.0.rc1.297.gfa9743e501-goog In-Reply-To: <20201020074229.119151-1-hiroh@chromium.org> References: <20201020074229.119151-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 3/4] android: post_processor_jpeg: Make |cameraDevice_| constant 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" PostProcessorJpeg doesn't have the ownership of CameraDevice given in the constructor. To clarify it, this makes the member variable constant. Signed-off-by: Hirokazu Honda Reviewed-by: Umang Jain Reviewed-by: Kieran Bingham --- src/android/jpeg/post_processor_jpeg.cpp | 2 +- src/android/jpeg/post_processor_jpeg.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp index 6f33631..f895d1f 100644 --- a/src/android/jpeg/post_processor_jpeg.cpp +++ b/src/android/jpeg/post_processor_jpeg.cpp @@ -20,7 +20,7 @@ using namespace libcamera; LOG_DEFINE_CATEGORY(JPEG); -PostProcessorJpeg::PostProcessorJpeg(CameraDevice *device) +PostProcessorJpeg::PostProcessorJpeg(CameraDevice const *device) : cameraDevice_(device) { } diff --git a/src/android/jpeg/post_processor_jpeg.h b/src/android/jpeg/post_processor_jpeg.h index ae636ff..8e25b29 100644 --- a/src/android/jpeg/post_processor_jpeg.h +++ b/src/android/jpeg/post_processor_jpeg.h @@ -19,7 +19,7 @@ class CameraDevice; class PostProcessorJpeg : public PostProcessor { public: - PostProcessorJpeg(CameraDevice *device); + PostProcessorJpeg(CameraDevice const *device); int configure(const libcamera::StreamConfiguration &incfg, const libcamera::StreamConfiguration &outcfg) override; @@ -28,7 +28,7 @@ public: CameraMetadata *metadata) override; private: - CameraDevice *cameraDevice_; + CameraDevice const *cameraDevice_; std::unique_ptr encoder_; libcamera::Size streamSize_; };