{"id":484,"url":"https://patchwork.libcamera.org/api/1.1/patches/484/?format=json","web_url":"https://patchwork.libcamera.org/patch/484/","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":"<20190203105517.5355-4-kieran.bingham@ideasonboard.com>","date":"2019-02-03T10:55:15","name":"[libcamera-devel,v2,3/5] libcamera: buffer: Document the BufferPool","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"81581e742d004216c0b47ed05f582dab12aaa26d","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/1.1/people/4/?format=json","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/484/mbox/","series":[{"id":164,"url":"https://patchwork.libcamera.org/api/1.1/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/484/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/484/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 EB62960DBB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  3 Feb 2019 11:55:21 +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 88322D4B;\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=35bii0CJhMK4PSa+eowHSiDQzo7TB3r3oh9XcibmUC0=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=LT6D/iK4lhWmHL6KAeEKr8rzrSS71b6syyZ3A4hDLJrlWcehMFBU/BLhhT+a7v5Tu\n\tsMmbwMZF3is+ZgDl2vE8WAmM/dqjiU4U/uLdW5R6DegGmDDO4sUAzyRKgqihjlCTUS\n\tpuNTrZS9Snn0uuhPPEWybNFJa/09VW7E77WqpPkU=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Date":"Sun,  3 Feb 2019 11:55:15 +0100","Message-Id":"<20190203105517.5355-4-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 3/5] libcamera: buffer: Document the\n\tBufferPool","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":"Add Doxygen documentation for the existing code in the BufferPool class.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/buffer.cpp | 42 ++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 42 insertions(+)","diff":"diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp\nindex c86847daf193..5abc2a68e978 100644\n--- a/src/libcamera/buffer.cpp\n+++ b/src/libcamera/buffer.cpp\n@@ -73,6 +73,37 @@ int Buffer::setDmabuf(int fd)\n /**\n  * \\class BufferPool\n  * \\brief A pool of buffers\n+ *\n+ * The BufferPool class groups together a collection of Buffers for passing\n+ * between devices. The buffers must be exported by a device before they can be\n+ * imported into another device for further use.\n+ */\n+\n+/**\n+ * \\enum BufferPool::Memory\n+ * \\brief Identify the memory type used in the BufferPool\n+ */\n+\n+/**\n+ * \\var BufferPool::Internal\n+ * \\brief The memory for the Buffers in this pool is allocated internally by the\n+ * device associated with the pool\n+ */\n+\n+/**\n+ * \\var BufferPool::External\n+ * \\brief The memory for the Buffers in this pool is allocated externally by\n+ * another device and can be imported for use by other devices.\n+ *\n+ * The buffers in the pool have been exported to make them available for sharing\n+ * with other devices, and can be managed using their own file descriptors.\n+ */\n+\n+/**\n+ * \\brief Construct a buffer pool. The \\a memory argument declares the intent of\n+ * the pool to be either internal or external to a device.\n+ *\n+ * \\sa BufferPool::Memory\n  */\n BufferPool::BufferPool(BufferPool::Memory memory)\n \t: memory_(memory)\n@@ -84,6 +115,9 @@ BufferPool::~BufferPool()\n \tfree();\n }\n \n+/**\n+ * \\brief Allocate buffers in a pool\n+ */\n int BufferPool::allocate(unsigned int count)\n {\n \tfor (unsigned int i = 0; i < count; ++i) {\n@@ -100,6 +134,9 @@ int BufferPool::allocate(unsigned int count)\n \treturn 0;\n }\n \n+/**\n+ * \\brief Release all buffers from pool.\n+ */\n void BufferPool::free()\n {\n \tfor (Buffer *buffer : buffers_)\n@@ -108,4 +145,9 @@ void BufferPool::free()\n \tbuffers_.clear();\n }\n \n+/**\n+ * \\fn BufferPool::count()\n+ * \\brief Get the number of Buffers contained within this pool\n+ */\n+\n } /* namespace libcamera */\n","prefixes":["libcamera-devel","v2","3/5"]}