[{"id":11095,"web_url":"https://patchwork.libcamera.org/comment/11095/","msgid":"<20200702232635.GH3158543@oden.dyn.berto.se>","date":"2020-07-02T23:26:35","subject":"Re: [libcamera-devel] [PATCH v2 5/9] android: camera_device: Create\n\tthe Request and Camera3RequestDescriptor together","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Kieran,\n\nThanks for your work.\n\nOn 2020-07-02 22:36:50 +0100, Kieran Bingham wrote:\n> Move the construction of the Request higher in the code flow\n> so that multiple buffers and streams can be added where required.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n>  src/android/camera_device.cpp | 7 +++++--\n>  1 file changed, 5 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> index 78ecfd7c2ee2..77083219d8a1 100644\n> --- a/src/android/camera_device.cpp\n> +++ b/src/android/camera_device.cpp\n> @@ -1066,6 +1066,10 @@ int CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques\n>  \tCamera3RequestDescriptor *descriptor =\n>  \t\tnew Camera3RequestDescriptor(camera3Request->frame_number,\n>  \t\t\t\t\t     camera3Request->num_output_buffers);\n> +\n> +\tRequest *request =\n> +\t\tcamera_->createRequest(reinterpret_cast<uint64_t>(descriptor));\n> +\n>  \tfor (unsigned int i = 0; i < descriptor->numBuffers; ++i) {\n>  \t\t/*\n>  \t\t * Keep track of which stream the request belongs to and store\n> @@ -1085,12 +1089,11 @@ int CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques\n>  \tFrameBuffer *buffer = newFrameBuffer(*camera3Buffers[0].buffer);\n>  \tif (!buffer) {\n>  \t\tLOG(HAL, Error) << \"Failed to create buffer\";\n> +\t\tdelete request;\n>  \t\tdelete descriptor;\n>  \t\treturn -ENOMEM;\n>  \t}\n>  \n> -\tRequest *request =\n> -\t\tcamera_->createRequest(reinterpret_cast<uint64_t>(descriptor));\n>  \trequest->addBuffer(stream, buffer);\n>  \n>  \tint ret = camera_->queueRequest(request);\n> -- \n> 2.25.1\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 C15AEBFFE2\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  2 Jul 2020 23:26:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8C99660C56;\n\tFri,  3 Jul 2020 01:26:37 +0200 (CEST)","from mail-lj1-x241.google.com (mail-lj1-x241.google.com\n\t[IPv6:2a00:1450:4864:20::241])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CAE3A603B3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  3 Jul 2020 01:26:36 +0200 (CEST)","by mail-lj1-x241.google.com with SMTP id s9so34360110ljm.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 02 Jul 2020 16:26:36 -0700 (PDT)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\tv25sm1967626ljg.95.2020.07.02.16.26.35\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 02 Jul 2020 16:26:35 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"GZTshSAg\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=+Ius6+wH87NAvGlOtJKLvHmmkPglFbfuqFmRmIo6uto=;\n\tb=GZTshSAgh2CQ68phezNPphlVmrhEhyKnGrIuwiuBO2x2InFBwcLCVkg3TSZMbCCwHi\n\tvJKAecvOoiyri8q2iOUNoMx7cIOGtoiepCnTtCA9U+4EVtRxGD25G9qlQHvaJFbJbrzQ\n\tz2VyymUA+AYnJ7xlieJnqD2I3wxb3xHad5Em7v4gLJihlF6RI1wlIeiCpO7tf4zUq2ya\n\tffIlbL7bspp21VHkh0s/o87n6k8LjyreL5MVXkXa9W9PNLQ1H8QgSiczwSy6Bidb0hKX\n\tBEIykoflfAde/RPbiCABAIiA4q4nxi2XidivdQt+tjVVgXlKwKa2a0ZxIjIqYb8gx8J+\n\tpj+g==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=+Ius6+wH87NAvGlOtJKLvHmmkPglFbfuqFmRmIo6uto=;\n\tb=RA2zH/2nc5wg7WbtgdvHqfjJMECZeEyfDKX/18aRaxoW/PtqdjfU7Su+FIzK7XZe5C\n\tN9gnHeR1dvo5AxmblvHIT9+cZ3KJ5mQFrr8LTzBzL7diBRY4phQk67NuPrTJ612btzkb\n\t2Glq1SN7vKrNtubcOohf8xjk9kkCFv4vy4vhuSA/OpWn8rRJxyaLs/Io7ULGkPdg9E6y\n\tK+kfAmlDLnbA/TKbyiiLINE562gT84M4UF3Mtj4YIkdubYSLkNpeqVsXZGEzSTpH2ZP/\n\tbV00i0F6DBI0XtuUo+wirG4l25gJ0mXU6KE4YSnFOTdQ0RG3C6bMtRPd9BtXrpH6uG1C\n\tBzvA==","X-Gm-Message-State":"AOAM530mBV403AZy4hkNbOFOzmxF2ILE2XvZcwoL3GTKgz7oq/JI1QLz\n\tQ5OKRWuT/q3vuBT0sYhyNeoS0g==","X-Google-Smtp-Source":"ABdhPJxY8Q8CG1quo+mtyZ5TFIjCXUqtKsE+DOAJ+bYtyoX3aILzvOkT286kUZQurMUvNHIuqRKNBQ==","X-Received":"by 2002:a05:651c:8c:: with SMTP id\n\t12mr4723240ljq.420.1593732396273; \n\tThu, 02 Jul 2020 16:26:36 -0700 (PDT)","Date":"Fri, 3 Jul 2020 01:26:35 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20200702232635.GH3158543@oden.dyn.berto.se>","References":"<20200702213654.2129054-1-kieran.bingham@ideasonboard.com>\n\t<20200702213654.2129054-6-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200702213654.2129054-6-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 5/9] android: camera_device: Create\n\tthe Request and Camera3RequestDescriptor together","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Content-Type":"text/plain; charset=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]