{"id":485,"url":"https://patchwork.libcamera.org/api/patches/485/?format=json","web_url":"https://patchwork.libcamera.org/patch/485/","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":"<20190203105517.5355-5-kieran.bingham@ideasonboard.com>","date":"2019-02-03T10:55:16","name":"[libcamera-devel,v2,4/5] libcamera: buffer: Provide access to the Buffer vector","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"f25b01a31c03340f56a8e0d4182383c9f1c0f184","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/485/mbox/","series":[{"id":164,"url":"https://patchwork.libcamera.org/api/series/164/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=164","date":"2019-02-03T10:55:12","name":"libcamera: Buffer Objects","version":2,"mbox":"https://patchwork.libcamera.org/series/164/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/485/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/485/checks/","tags":{},"headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2F10E60DB5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  3 Feb 2019 11:55:22 +0100 (CET)","from localhost.localdomain\n\t(218.182-78-194.adsl-static.isp.belgacom.be [194.78.182.218])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C01CDE08;\n\tSun,  3 Feb 2019 11:55:21 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1549191321;\n\tbh=0J1VS/+qBua/3pFS5Nfzf2Oh384fiN+pESxb3aLGGdA=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=ZCWppbrfPwZKKNZhEH/rxQdUzncGH8vx3BSzjzB/61GdsiKn5z3DD81ne8p0JYZQv\n\tOp5vV36hQHWqoXBakhkAOMrCD6gQ0CDTnU0aGXFHoRaEAKREWXzIjvFUuKW9aMCBVu\n\tPQ55T97KYZZeVomE+d1sAipprxI5yszmLqYuSGgM=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Date":"Sun,  3 Feb 2019 11:55:16 +0100","Message-Id":"<20190203105517.5355-5-kieran.bingham@ideasonboard.com>","X-Mailer":"git-send-email 2.19.1","In-Reply-To":"<20190203105517.5355-1-kieran.bingham@ideasonboard.com>","References":"<20190203105517.5355-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 4/5] libcamera: buffer: Provide access\n\tto the Buffer vector","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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>","X-List-Received-Date":"Sun, 03 Feb 2019 10:55:22 -0000"},"content":"Extend the BufferPool to support retrieving Buffers by receiving a reference to\nthe buffer vector.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n include/libcamera/buffer.h | 1 +\n src/libcamera/buffer.cpp   | 6 ++++++\n 2 files changed, 7 insertions(+)","diff":"diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h\nindex 97c8025d9e77..dda5075f2879 100644\n--- a/include/libcamera/buffer.h\n+++ b/include/libcamera/buffer.h\n@@ -42,6 +42,7 @@ public:\n \tvoid free();\n \n \tunsigned int count() const { return buffers_.size(); };\n+\tconst std::vector<Buffer *> &buffers() { return buffers_; };\n \n private:\n \tvirtual int allocateMemory() = 0;\ndiff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp\nindex 5abc2a68e978..08deaa97e4af 100644\n--- a/src/libcamera/buffer.cpp\n+++ b/src/libcamera/buffer.cpp\n@@ -150,4 +150,10 @@ void BufferPool::free()\n  * \\brief Get the number of Buffers contained within this pool\n  */\n \n+/**\n+ * \\fn BufferPool::buffers()\n+ * \\brief Retrieve all the buffers in the pool\n+ * \\return A vector containing all the buffers in the pool.\n+ */\n+\n } /* namespace libcamera */\n","prefixes":["libcamera-devel","v2","4/5"]}