From patchwork Sun Aug 18 01:13:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1845 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 8A95861924 for ; Sun, 18 Aug 2019 03:13:43 +0200 (CEST) Received: from pendragon.bb.dnainternet.fi (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 259BD734 for ; Sun, 18 Aug 2019 03:13:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1566090823; bh=LCZ7qAECO8SDRROe5LwZlUPot5Oh7jYrekN9Wtih9d0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=N8JNZYsBUHmmx1KEks8VscymofYtTqDeuLf4gVyARfBuaEtlEI+ipVPbfKDCn4l/R SvaMxs++pBh3erCcfpZLxhbJPiKrm0G5A0I7GhHpKP3LgJtdF5iqqWDQq3JOd6xRQ7 iW9w+adO/HZ/l9mgcd0PvlkIZnr9U0d1ADdwew04= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sun, 18 Aug 2019 04:13:23 +0300 Message-Id: <20190818011329.14499-9-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190818011329.14499-1-laurent.pinchart@ideasonboard.com> References: <20190818011329.14499-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 08/14] test: camera: Use the CameraManager from the CameraTest base class 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, 18 Aug 2019 01:13:44 -0000 Make the camera manager a protected field of the CameraTest class, and use it instead of CameraManager::instance() in the camera tests. This prepares for the removal of CameraManager::instance(). Signed-off-by: Laurent Pinchart --- test/camera/buffer_import.cpp | 2 +- test/camera/camera_test.h | 4 +--- test/camera/capture.cpp | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp index 98786469428f..9364e3d1bc44 100644 --- a/test/camera/buffer_import.cpp +++ b/test/camera/buffer_import.cpp @@ -375,7 +375,7 @@ protected: return TestFail; } - EventDispatcher *dispatcher = CameraManager::instance()->eventDispatcher(); + EventDispatcher *dispatcher = cm_->eventDispatcher(); Timer timer; timer.start(5000); diff --git a/test/camera/camera_test.h b/test/camera/camera_test.h index ffc8a485bfaf..e57b05eb28a9 100644 --- a/test/camera/camera_test.h +++ b/test/camera/camera_test.h @@ -23,10 +23,8 @@ protected: int init(); void cleanup(); - std::shared_ptr camera_; - -private: CameraManager *cm_; + std::shared_ptr camera_; }; #endif /* __LIBCAMERA_CAMERA_TEST_H__ */ diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp index e6bf7a8d9ebb..791ccad15f70 100644 --- a/test/camera/capture.cpp +++ b/test/camera/capture.cpp @@ -120,7 +120,7 @@ protected: } } - EventDispatcher *dispatcher = CameraManager::instance()->eventDispatcher(); + EventDispatcher *dispatcher = cm_->eventDispatcher(); Timer timer; timer.start(1000);