From patchwork Tue Jan 29 13:53:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 443 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9E7B260DB9 for ; Tue, 29 Jan 2019 14:54:02 +0100 (CET) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 409AB41; Tue, 29 Jan 2019 14:54:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1548770042; bh=khPrAXSUDdvHG6oC9UX0l6d1zbgeRJ1DZZlS0YUpEvU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D3HtYr/OgjugldA0fpAQ2lbEd/f2grgndEmAFV/GRJOTGnugokIAjvAt3MYVNgQlk TeIq1wnbLcz8pFh4kH9RbM4Bfsm0GtyyWVibljmlG834QdKpVJoerIKsAHDlC6vSpk A9lsoXVfw3csEQmFOl/kfN7N6b23/4ChaehGXqjs= From: Kieran Bingham To: LibCamera Devel Date: Tue, 29 Jan 2019 13:53:56 +0000 Message-Id: <20190129135357.32339-4-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190129135357.32339-1-kieran.bingham@ideasonboard.com> References: <20190129135357.32339-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 3/4] libcamera: buffer: Provide access to the Buffer vector X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jan 2019 13:54:02 -0000 Extend the BufferPool to support retrieving Buffers by receiving a reference to the buffer vector. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- include/libcamera/buffer.h | 1 + src/libcamera/buffer.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h index 97c8025d9e77..dda5075f2879 100644 --- a/include/libcamera/buffer.h +++ b/include/libcamera/buffer.h @@ -42,6 +42,7 @@ public: void free(); unsigned int count() const { return buffers_.size(); }; + const std::vector &buffers() { return buffers_; }; private: virtual int allocateMemory() = 0; diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp index 5c580b540a67..4a870df77e92 100644 --- a/src/libcamera/buffer.cpp +++ b/src/libcamera/buffer.cpp @@ -141,4 +141,9 @@ void BufferPool::free() * \brief Get the number of Buffers contained within this pool */ +/** + * \fn BufferPool::buffers() + * \brief Return a reference to the vector holding all buffers within the pool + */ + } /* namespace libcamera */