From patchwork Sun Feb 3 10:55:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 485 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2F10E60DB5 for ; Sun, 3 Feb 2019 11:55:22 +0100 (CET) Received: from localhost.localdomain (218.182-78-194.adsl-static.isp.belgacom.be [194.78.182.218]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C01CDE08; Sun, 3 Feb 2019 11:55:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1549191321; bh=0J1VS/+qBua/3pFS5Nfzf2Oh384fiN+pESxb3aLGGdA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZCWppbrfPwZKKNZhEH/rxQdUzncGH8vx3BSzjzB/61GdsiKn5z3DD81ne8p0JYZQv Op5vV36hQHWqoXBakhkAOMrCD6gQ0CDTnU0aGXFHoRaEAKREWXzIjvFUuKW9aMCBVu PQ55T97KYZZeVomE+d1sAipprxI5yszmLqYuSGgM= From: Kieran Bingham To: LibCamera Devel 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 Subject: [libcamera-devel] [PATCH v2 4/5] 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: Sun, 03 Feb 2019 10:55:22 -0000 Extend the BufferPool to support retrieving Buffers by receiving a reference to the buffer vector. Reviewed-by: Laurent Pinchart Signed-off-by: Kieran Bingham --- include/libcamera/buffer.h | 1 + src/libcamera/buffer.cpp | 6 ++++++ 2 files changed, 7 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 5abc2a68e978..08deaa97e4af 100644 --- a/src/libcamera/buffer.cpp +++ b/src/libcamera/buffer.cpp @@ -150,4 +150,10 @@ void BufferPool::free() * \brief Get the number of Buffers contained within this pool */ +/** + * \fn BufferPool::buffers() + * \brief Retrieve all the buffers in the pool + * \return A vector containing all the buffers in the pool. + */ + } /* namespace libcamera */