{"id":15267,"url":"https://patchwork.libcamera.org/api/1.1/patches/15267/?format=json","web_url":"https://patchwork.libcamera.org/patch/15267/","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":"<20220110165524.72978-3-jacopo@jmondi.org>","date":"2022-01-10T16:55:21","name":"[libcamera-devel,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":{"id":15,"url":"https://patchwork.libcamera.org/api/1.1/users/15/?format=json","username":"jmondi","first_name":"Jacopo","last_name":"Mondi","email":"jacopo@jmondi.org"},"mbox":"https://patchwork.libcamera.org/patch/15267/mbox/","series":[{"id":2887,"url":"https://patchwork.libcamera.org/api/1.1/series/2887/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2887","date":"2022-01-10T16:55:19","name":"android: Plumb the YUV processor in","version":1,"mbox":"https://patchwork.libcamera.org/series/2887/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/15267/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/15267/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 0393CBE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 10 Jan 2022 16:54:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6395F6021A;\n\tMon, 10 Jan 2022 17:54:35 +0100 (CET)","from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net\n\t[217.70.183.193])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 65A4A60931\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 10 Jan 2022 17:54:30 +0100 (CET)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay1-d.mail.gandi.net (Postfix) with ESMTPSA id C0AA7240007;\n\tMon, 10 Jan 2022 16:54:29 +0000 (UTC)"],"From":"Jacopo Mondi <jacopo@jmondi.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 10 Jan 2022 17:55:21 +0100","Message-Id":"<20220110165524.72978-3-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20220110165524.72978-1-jacopo@jmondi.org>","References":"<20220110165524.72978-1-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"With the introduction of PlatformBufferAllocator all CameraStream can\nbe used to allocate buffers on-demand.\n\nCreate CameraStream::allocator_ and the associated mutex for all types\nof stream.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\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 032b0407bd32..eeeb238f395c 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","2/5"]}