{"id":13461,"url":"https://patchwork.libcamera.org/api/patches/13461/?format=json","web_url":"https://patchwork.libcamera.org/patch/13461/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20210824142450.3157833-4-kieran.bingham@ideasonboard.com>","date":"2021-08-24T14:24:49","name":"[libcamera-devel,SimpleCam,3/4] simple-cam: Fix the Buffer Allocation guidance","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"150c48f6e7dfd21601746c05a3a8828167984239","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/?format=json","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/13461/mbox/","series":[{"id":2388,"url":"https://patchwork.libcamera.org/api/series/2388/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2388","date":"2021-08-24T14:24:46","name":"Improve CameraManager usage and Doc","version":1,"mbox":"https://patchwork.libcamera.org/series/2388/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/13461/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/13461/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 51589C3241\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 24 Aug 2021 14:24:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A45E568915;\n\tTue, 24 Aug 2021 16:24:58 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0B7CC688AC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 24 Aug 2021 16:24:55 +0200 (CEST)","from Monstersaurus.local\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8A5E82A5;\n\tTue, 24 Aug 2021 16:24:55 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"mu6uTAK2\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1629815095;\n\tbh=SXqO+Ipt5H3+sDUt8BwZBIa/fGhEht3o/pU33f5A9u4=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=mu6uTAK2HQKKheBHUieYKe3l2QhgrGH1YHzjNjGo7YKySc7u+c6X+FNabnukjkXCX\n\tyheESYP/yu9rwGec0Fw6nz+v6G1BxDzajbroJ0pB6Yed8K15jnegEbesX6P/AFFDXw\n\tTCqZAnA9Hh/xtKnB/xGB3V64qRXwwlYChqa0H/+Y=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"libcamera devel <libcamera-devel@lists.libcamera.org>","Date":"Tue, 24 Aug 2021 15:24:49 +0100","Message-Id":"<20210824142450.3157833-4-kieran.bingham@ideasonboard.com>","X-Mailer":"git-send-email 2.30.2","In-Reply-To":"<20210824142450.3157833-1-kieran.bingham@ideasonboard.com>","References":"<20210824142450.3157833-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [SimpleCam PATCH 3/4] simple-cam: Fix the Buffer\n\tAllocation guidance","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":"The Buffer Allocation notes contains a TODO. Improve the notes regarding\nthe FrameBufferAllocation and remove the todo.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n simple-cam.cpp | 12 +++++++++---\n 1 file changed, 9 insertions(+), 3 deletions(-)","diff":"diff --git a/simple-cam.cpp b/simple-cam.cpp\nindex 2e646a5485c9..47c5dc9987bc 100644\n--- a/simple-cam.cpp\n+++ b/simple-cam.cpp\n@@ -274,10 +274,16 @@ int main()\n \t * Buffer Allocation\n \t *\n \t * Now that a camera has been configured, it knows all about its\n-\t * Streams sizes and formats, so we now have to ask it to reserve\n-\t * memory for all of them.\n+\t * Streams sizes and formats. We need to provide buffers to store\n+\t * captured images in. An application might choose to provide buffers\n+\t * externally, for instance from a display driver which will render the\n+\t * captured images, however libcamera can also provide buffers from a\n+\t * configured camera.\n+\t *\n+\t * To request buffers from libcamera, we use the FrameBufferAllocator,\n+\t * and reference the (configured) camera for which we wish to allocate\n+\t * buffers for.\n \t */\n-\t/* TODO: Update the comment here too */\n \tFrameBufferAllocator *allocator = new FrameBufferAllocator(camera);\n \n \tfor (StreamConfiguration &cfg : *config) {\n","prefixes":["libcamera-devel","SimpleCam","3/4"]}