From patchwork Wed Oct 21 01:39:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 10153 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 48854BDB13 for ; Wed, 21 Oct 2020 01:40:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1618361DAB; Wed, 21 Oct 2020 03:40:10 +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="eD962NbE"; dkim-atps=neutral Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 406A761D98 for ; Wed, 21 Oct 2020 03:40:08 +0200 (CEST) Received: by mail-pf1-x42b.google.com with SMTP id c20so502182pfr.8 for ; Tue, 20 Oct 2020 18:40:08 -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=B3yYJQA+QTIkRSTx3E4WlxnV44ortnpTrmlhQYrPOwM=; b=eD962NbETmX5QZT0TjOTjbVUm6XoCndAwD6RRc9cXypYYUu2CXRvqynrdLIjbw+0Pg gEkT88JsfZ1sI+fbdseDF/ie/KZ7Y2HtJ7ebfq1NnPyUyG5KV96lwngoKUeCrvXFUf5m RVO5ZbUtG5NCSwa1lZdixRR53sUZdJslCodSE= 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=B3yYJQA+QTIkRSTx3E4WlxnV44ortnpTrmlhQYrPOwM=; b=ggnwqxkOMI+PSMH3v0HzI9vhsBWBIxlQPNo6lAOI4/IkaYrJ9dNsOApZmB6p9GuVjg swgOV5FWNSYuoVhGAoKgUULaMOp5+1FqRREhhf1+idER694JrAXE2Mdds7Zx/zVs1xBS JgkkWkm55X531YKy9rxRe5nju+OKp013QEcaoIY4EXbda1nJF/zfqbvxPjYjmhCJbaqL myPfVWY8jyaQGPPpeN/8halcyXbOZfcCw1BQ/H0QfrLPLEFKJPqW0z7AUHY7Pxvq34CS 5V+gP+XA8BGwIBOgR4zjqInEMqEyZygx/2r/d85wfVqEuWYH4lZX2xT6aGOCvcLy300+ Xf6A== X-Gm-Message-State: AOAM532P4IZ98L2/8E2ftoydqfyvn8fl+S48njZH61666l40oRvJz6RV 7qf0cWkiEem2dooWuE5kKrdfgZQ5cSqolw== X-Google-Smtp-Source: ABdhPJxnBU0B5iINwaWlVqSbcECYmLG3t+5XYeJxaGx+6i/xjt73l/IkBrefcGK5X8rAWR+nomKG3A== X-Received: by 2002:a65:63c5:: with SMTP id n5mr968439pgv.437.1603244406728; Tue, 20 Oct 2020 18:40:06 -0700 (PDT) Received: from hiroh.tok.corp.google.com ([2401:fa00:8f:2:de4a:3eff:fe7d:f78f]) by smtp.gmail.com with ESMTPSA id w2sm368066pgi.56.2020.10.20.18.40.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 18:40:06 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Wed, 21 Oct 2020 10:39:54 +0900 Message-Id: <20201021013955.301790-3-hiroh@chromium.org> X-Mailer: git-send-email 2.29.0.rc1.297.gfa9743e501-goog In-Reply-To: <20201021013955.301790-1-hiroh@chromium.org> References: <20201021013955.301790-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 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 Reviewed-by: Laurent Pinchart --- 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 8b01bd6..fd1c7be 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..3706cec 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_; };