[{"id":712,"web_url":"https://patchwork.libcamera.org/comment/712/","msgid":"<20190131090847.GA4197@pendragon.ideasonboard.com>","date":"2019-01-31T09:08:47","subject":"Re: [libcamera-devel] [PATCH 3/4] libcamera: buffer: Provide access\n\tto the Buffer vector","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Tue, Jan 29, 2019 at 01:53:56PM +0000, Kieran Bingham wrote:\n> Extend the BufferPool to support retrieving Buffers by receiving a reference to\n> the buffer vector.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  include/libcamera/buffer.h | 1 +\n>  src/libcamera/buffer.cpp   | 5 +++++\n>  2 files changed, 6 insertions(+)\n> \n> diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h\n> index 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;\n> diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp\n> index 5c580b540a67..4a870df77e92 100644\n> --- a/src/libcamera/buffer.cpp\n> +++ b/src/libcamera/buffer.cpp\n> @@ -141,4 +141,9 @@ void BufferPool::free()\n>   * \\brief Get the number of Buffers contained within this pool\n>   */\n>  \n> +/**\n> + * \\fn BufferPool::buffers()\n> + * \\brief Return a reference to the vector holding all buffers within the pool\n\n * \\brief Retrieve all the buffers in the pool\n * \\return A vector containing all the buffers in the pool.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> + */\n> +\n>  } /* namespace libcamera */","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["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 B1FC560B2D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 31 Jan 2019 10:08:51 +0100 (CET)","from pendragon.ideasonboard.com (85-76-34-136-nat.elisa-mobile.fi\n\t[85.76.34.136])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0BFC641;\n\tThu, 31 Jan 2019 10:08:49 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1548925731;\n\tbh=/gXfhiVSyCE5AlWBcSwkMtpeJ7r1MjfPayBzEMrNRRM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=EjI3+n0XPdVQJpF0iaZddQgUJN5iEG81qcmpVGPFuJuTbK/UL6MeNyTmPemdK4buu\n\t0x4s+kE9oHKkI4lRkiiaQNqb4r3JAig5UXWQMI6002hmm0MTcuwbtrdGBkyRUZTJXr\n\tsjuhYAmcryDvMDDNGdM5MwxiHv0ZZAFjwcD8e3NA=","Date":"Thu, 31 Jan 2019 11:08:47 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20190131090847.GA4197@pendragon.ideasonboard.com>","References":"<20190129135357.32339-1-kieran.bingham@ideasonboard.com>\n\t<20190129135357.32339-4-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190129135357.32339-4-kieran.bingham@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 3/4] 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":"Thu, 31 Jan 2019 09:08:51 -0000"}}]