[{"id":13403,"web_url":"https://patchwork.libcamera.org/comment/13403/","msgid":"<892c5674-6566-d09b-082b-fd0ce1cf3543@uajain.com>","date":"2020-10-22T07:39:24","subject":"Re: [libcamera-devel] [PATCH v3 3/4] android: post_processor_jpeg:\n\tMake |cameraDevice_| constant","submitter":{"id":1,"url":"https://patchwork.libcamera.org/api/people/1/","name":"Umang Jain","email":"email@uajain.com"},"content":"Hi Hiro,\n\nThanks for the patch.\n\nOn 10/21/20 7:09 AM, Hirokazu Honda wrote:\n> PostProcessorJpeg doesn't have the ownership of CameraDevice given\n> in the constructor. To clarify it, this makes the member variable\n> constant.\n>\n> Signed-off-by: Hirokazu Honda <hiroh@chromium.org>\n> Reviewed-by: Umang Jain <email@uajain.com>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>   src/android/jpeg/post_processor_jpeg.cpp | 2 +-\n>   src/android/jpeg/post_processor_jpeg.h   | 4 ++--\n>   2 files changed, 3 insertions(+), 3 deletions(-)\n>\n> diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp\n> index 8b01bd6..fd1c7be 100644\n> --- a/src/android/jpeg/post_processor_jpeg.cpp\n> +++ b/src/android/jpeg/post_processor_jpeg.cpp\n> @@ -20,7 +20,7 @@ using namespace libcamera;\n>   \n>   LOG_DEFINE_CATEGORY(JPEG)\n>   \n> -PostProcessorJpeg::PostProcessorJpeg(CameraDevice *device)\n> +PostProcessorJpeg::PostProcessorJpeg(CameraDevice *const device)\n>   \t: cameraDevice_(device)\n>   {\n>   }\n> diff --git a/src/android/jpeg/post_processor_jpeg.h b/src/android/jpeg/post_processor_jpeg.h\n> index ae636ff..3706cec 100644\n> --- a/src/android/jpeg/post_processor_jpeg.h\n> +++ b/src/android/jpeg/post_processor_jpeg.h\n> @@ -19,7 +19,7 @@ class CameraDevice;\n>   class PostProcessorJpeg : public PostProcessor\n>   {\n>   public:\n> -\tPostProcessorJpeg(CameraDevice *device);\n> +\tPostProcessorJpeg(CameraDevice *const device);\n>   \n>   \tint configure(const libcamera::StreamConfiguration &incfg,\n>   \t\t      const libcamera::StreamConfiguration &outcfg) override;\n> @@ -28,7 +28,7 @@ public:\n>   \t\t    CameraMetadata *metadata) override;\n>   \n>   private:\n> -\tCameraDevice *cameraDevice_;\n> +\tCameraDevice *const cameraDevice_;\nThis (and by extension above changes too) will get realigned to match \nthe format of the prefixed `const` for constant pointer(s). The prefixed \nstyle is used almost through-out the codebase so it is likely we will \ncontinue using that. :)\n>   \tstd::unique_ptr<Encoder> encoder_;\n>   \tlibcamera::Size streamSize_;\n>   };","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 1BC25C3D3C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Oct 2020 07:39:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 840AF61059;\n\tThu, 22 Oct 2020 09:39:30 +0200 (CEST)","from mail.uajain.com (static.126.159.217.95.clients.your-server.de\n\t[95.217.159.126])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9D5C960351\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Oct 2020 09:39:28 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=uajain.com header.i=@uajain.com\n\theader.b=\"oub1SMsE\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=uajain.com; s=mail;\n\tt=1603352367; bh=zx8VTPTYOOEClwDJ7HaRS11+bKCbwhmsL2jHfPpIi1M=;\n\th=Subject:To:Cc:References:From:In-Reply-To;\n\tb=oub1SMsE45zh2zaqWxxfkEjzTXm6rz7OPdEqM1+56lZSeLlrym7QzauGY9Sz1fuO6\n\tH7UmlKvpeKGuhrQ/2/xTTTd0xdEXEqTeoeZwMOqp7oLDUPumXq++v8uTJ1c/GDxcX8\n\tw4h+Z8Dq7uvDUrFx12oVPWs+jM1ylOuAHGytl9BBuAzeGuc3SPTM2pHR4gjl5p7elH\n\tRwlrfyph1pzxWlkv29mTTavMFpkYqFhk4xtSA8ytjtYtXSUAte33lu0w5nn66asGkn\n\tdbPd3CJT708h26lVRwq0enb2nw2ufiaWPjeRjciZaCSvbZ9tqwwV/XFh1P/b1syFZ/\n\tgc+Q6DNVreCxA==","To":"Hirokazu Honda <hiroh@chromium.org>, libcamera-devel@lists.libcamera.org","References":"<20201021013955.301790-1-hiroh@chromium.org>\n\t<20201021013955.301790-3-hiroh@chromium.org>","From":"Umang Jain <email@uajain.com>","Message-ID":"<892c5674-6566-d09b-082b-fd0ce1cf3543@uajain.com>","Date":"Thu, 22 Oct 2020 13:09:24 +0530","Mime-Version":"1.0","In-Reply-To":"<20201021013955.301790-3-hiroh@chromium.org>","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH v3 3/4] android: post_processor_jpeg:\n\tMake |cameraDevice_| constant","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Content-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=\"us-ascii\"; Format=\"flowed\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]