From patchwork Wed Feb 6 06:08:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 528 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7848661022 for ; Wed, 6 Feb 2019 07:08:26 +0100 (CET) Received: from pendragon.ideasonboard.com (d51A4137F.access.telenet.be [81.164.19.127]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1BD2741 for ; Wed, 6 Feb 2019 07:08:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1549433306; bh=XcWsS02nA1PgO/Kbaj7TQTam0DlOIYrF2Kd9aUvbrNU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Zg5S9Moit8942puuiLs7dN0VYa52vY4F7YMypzMQbZHy/35W09JdaTKLchoo/xUP2 oZj2WCThHTKMuu7dgOON5RcYbji3+EySCo7277ZbPs0SRXCVH2XsCtU4tfUdzwx/Fr lqzRoYWd25MgXsPdWtk27j3pfEZKKID1CN0ppcBA= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Wed, 6 Feb 2019 08:08:04 +0200 Message-Id: <20190206060818.13907-14-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190206060818.13907-1-laurent.pinchart@ideasonboard.com> References: <20190206060818.13907-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 13/27] libcamera: stream: Construct a stream 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: Wed, 06 Feb 2019 06:08:28 -0000 From: Kieran Bingham Construct a stream object with a default internal pool. Signed-off-by: Kieran Bingham Signed-off-by: Jacopo Mondi Signed-off-by: Laurent Pinchart Signed-off-by: Niklas Söderlund --- include/libcamera/stream.h | 8 ++++++++ src/libcamera/stream.cpp | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h index 890678360ee8..111f2c933efa 100644 --- a/include/libcamera/stream.h +++ b/include/libcamera/stream.h @@ -7,10 +7,18 @@ #ifndef __LIBCAMERA_STREAM_H__ #define __LIBCAMERA_STREAM_H__ +#include + namespace libcamera { class Stream final { +public: + Stream(); + BufferPool &bufferPool() { return bufferPool_; } + +private: + BufferPool bufferPool_; }; struct StreamConfiguration { diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp index dd9092d958d9..b6238946a8d5 100644 --- a/src/libcamera/stream.cpp +++ b/src/libcamera/stream.cpp @@ -47,6 +47,24 @@ namespace libcamera { * optimal stream for the task. */ +/** + * \brief Construct a stream with default parameters + */ +Stream::Stream() +{ +} + +/** + * \fn Stream::bufferPool() + * \brief Retrieve the buffer pool for the stream + * + * The buffer pool handles the buffers used to capture frames at the output of + * the stream. It is initially created empty and shall be populated with + * buffers before being used. + * + * \return A reference to the buffer pool + */ + /** * \struct StreamConfiguration * \brief Configuration parameters for a stream