From patchwork Tue Nov 26 23:36:13 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: 2371 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 22C7961C58 for ; Wed, 27 Nov 2019 00:39:44 +0100 (CET) X-Halon-ID: 050961bd-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 050961bd-10a6-11ea-a0b9-005056917f90; Wed, 27 Nov 2019 00:39:42 +0100 (CET) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Wed, 27 Nov 2019 00:36:13 +0100 Message-Id: <20191126233620.1695316-24-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 23/30] libcamera: pipelines: Switch to V4L2Stream 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 Prepare to switch to the FrameBuffer interface by using V4L2Stream. This does not break current operations as changes in applications are needed to switch interface. Signed-off-by: Niklas Söderlund --- src/libcamera/pipeline/ipu3/ipu3.cpp | 5 +++-- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +- src/libcamera/pipeline/uvcvideo.cpp | 2 +- src/libcamera/pipeline/vimc.cpp | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 094c4db6bc32b683..5080ac6c4d0abe3b 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -135,11 +135,12 @@ public: BufferPool pool_; }; -class IPU3Stream : public Stream +class IPU3Stream : public V4L2Stream { public: IPU3Stream(ImgUDevice::ImgUOutput *device, const std::string &name) - : active_(false), name_(name), device_(device) + : V4L2Stream(device->dev), active_(false), name_(name), + device_(device) { } diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 1ae50bec0d401b3f..ca3d92c7ad637c3a 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -888,7 +888,7 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor) std::unique_ptr data = utils::make_unique(this); - data->stream_ = new Stream(); + data->stream_ = new V4L2Stream(video_); ControlInfoMap::Map ctrls; ctrls.emplace(std::piecewise_construct, diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp index 64fc488912e5a82f..9cc90bf454cb4392 100644 --- a/src/libcamera/pipeline/uvcvideo.cpp +++ b/src/libcamera/pipeline/uvcvideo.cpp @@ -331,7 +331,7 @@ int UVCCameraData::init(MediaEntity *entity) if (ret) return ret; - stream_ = new Stream(); + stream_ = new V4L2Stream(video_); video_->bufferReady.connect(this, &UVCCameraData::bufferReady); diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp index 3f9e92163642f0c2..b1222bd21fb629a0 100644 --- a/src/libcamera/pipeline/vimc.cpp +++ b/src/libcamera/pipeline/vimc.cpp @@ -420,7 +420,7 @@ int VimcCameraData::init(MediaDevice *media) if (video_->open()) return -ENODEV; - stream_ = new Stream(); + stream_ = new V4L2Stream(video_); video_->bufferReady.connect(this, &VimcCameraData::bufferReady);