{"id":16151,"url":"https://patchwork.libcamera.org/api/1.1/patches/16151/?format=json","web_url":"https://patchwork.libcamera.org/patch/16151/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20220604093025.77737-3-jacopo@jmondi.org>","date":"2022-06-04T09:30:22","name":"[libcamera-devel,v3,2/5] android: camera_stream: Create allocator unconditionally","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"2a3748e96013b2eba72b650220191e0bfeba1133","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/1.1/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/16151/mbox/","series":[{"id":3160,"url":"https://patchwork.libcamera.org/api/1.1/series/3160/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3160","date":"2022-06-04T09:30:20","name":"Plumb the YUV processor in","version":3,"mbox":"https://patchwork.libcamera.org/series/3160/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/16151/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/16151/checks/","tags":{},"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 3F989C3273\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  4 Jun 2022 09:30:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6998B6563A;\n\tSat,  4 Jun 2022 11:30:36 +0200 (CEST)","from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[217.70.183.196])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CA54B65631\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  4 Jun 2022 11:30:34 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id E828DE000D;\n\tSat,  4 Jun 2022 09:30:33 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1654335036;\n\tbh=m55zw6+OuVmZDmbJYonbQJ8SdqYMrIlcQKVrlLKGfdo=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=LoDAqo/di+EmhGifDzgz/QsjP3ER/+YaG68jUcloV2ZkOyIAadepaZVIaOJJWPMxc\n\t2XBp/H1GQwI+14vqYSoKydGkT9XZBcM5nzL5RLMBfn6/tQpNbTCsRyl/lAmmM5ACGy\n\tnoj5qDuB1Np9UL3IYasNMkpsmBKbmA9CBF9a2cXWc4m4FNZeybVvrNVr6R1FmWW/OU\n\tBK6Dj15oTk4zZjfv9nY/PBUwd9amc6KS4xeoDbisipDJ5YWd9F5vXBkHSfutVTgPyY\n\tNznHL95kndKlVvQl4z+g75VlBrxTUcP501kEct5x9BvOggCSibaDK5gzorUX8F7rs5\n\twIG+lVn5DeoMw==","To":"libcamera-devel@lists.libcamera.org","Date":"Sat,  4 Jun 2022 11:30:22 +0200","Message-Id":"<20220604093025.77737-3-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.35.1","In-Reply-To":"<20220604093025.77737-1-jacopo@jmondi.org>","References":"<20220604093025.77737-1-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3 2/5] android: camera_stream: Create\n\tallocator unconditionally","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>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Originally buffer allocation was only required for Internal streams\nwhich are not backed by a frame buffer provided by the Android\nframework.\n\nNow that mapped streams can be generated without the corresponding\nsource stream being part of the Android's provided stream list, also\nbuffers of type Mapped can be required to allocate buffers on demand.\n\nCreate CameraStream::allocator_ and the associated mutex unconditionally\nfor all types of stream.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/android/camera_stream.cpp | 6 ++----\n 1 file changed, 2 insertions(+), 4 deletions(-)","diff":"diff --git a/src/android/camera_stream.cpp b/src/android/camera_stream.cpp\nindex 154e088e1b86..045e60061a20 100644\n--- a/src/android/camera_stream.cpp\n+++ b/src/android/camera_stream.cpp\n@@ -128,10 +128,8 @@ int CameraStream::configure()\n \t\tworker_->start();\n \t}\n \n-\tif (type_ == Type::Internal) {\n-\t\tallocator_ = std::make_unique<PlatformFrameBufferAllocator>(cameraDevice_);\n-\t\tmutex_ = std::make_unique<Mutex>();\n-\t}\n+\tallocator_ = std::make_unique<PlatformFrameBufferAllocator>(cameraDevice_);\n+\tmutex_ = std::make_unique<Mutex>();\n \n \tcamera3Stream_->max_buffers = configuration().bufferCount;\n \n","prefixes":["libcamera-devel","v3","2/5"]}