From patchwork Tue Nov 26 23:36:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 2372 Return-Path: Received: from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net [195.74.38.229]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A1ABB61C59 for ; Wed, 27 Nov 2019 00:39:44 +0100 (CET) X-Halon-ID: 0564c944-10a6-11ea-a0b9-005056917f90 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (p54ac5865.dip0.t-ipconnect.de [84.172.88.101]) by bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA id 0564c944-10a6-11ea-a0b9-005056917f90; Wed, 27 Nov 2019 00:39:43 +0100 (CET) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Wed, 27 Nov 2019 00:36:14 +0100 Message-Id: <20191126233620.1695316-25-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191126233620.1695316-1-niklas.soderlund@ragnatech.se> References: <20191126233620.1695316-1-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 24/30] libcamera: stream: Make FrameBuffer support mandatory X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2019 23:39:44 -0000 All pipelines now uses V4L2Streams, make using a sub-class of Stream which implements the FrameBuffer interface helpers mandatory. Remove the fallback implementations in the Stream base class to prevent the base class to be instantiated directly. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- include/libcamera/stream.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h index 395148e45d342d92..a3c692c347340382 100644 --- a/include/libcamera/stream.h +++ b/include/libcamera/stream.h @@ -7,7 +7,6 @@ #ifndef __LIBCAMERA_STREAM_H__ #define __LIBCAMERA_STREAM_H__ -#include #include #include #include @@ -89,13 +88,10 @@ protected: friend class Camera; virtual int allocateBuffers(const StreamConfiguration &config, - std::vector *buffers) - { - return -EINVAL; - } - virtual void releaseBuffers() { return; } - virtual int start() { return -EINVAL; } - virtual void stop() { return; } + std::vector *buffers) = 0; + virtual void releaseBuffers() = 0; + virtual int start() = 0; + virtual void stop() = 0; int mapBuffer(const Buffer *buffer); void unmapBuffer(const Buffer *buffer);