{"id":1845,"url":"https://patchwork.libcamera.org/api/patches/1845/?format=json","web_url":"https://patchwork.libcamera.org/patch/1845/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20190818011329.14499-9-laurent.pinchart@ideasonboard.com>","date":"2019-08-18T01:13:23","name":"[libcamera-devel,08/14] test: camera: Use the CameraManager from the CameraTest base class","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"ae675633fee898d4d239070b55966a4ab833e1ed","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/1845/mbox/","series":[{"id":464,"url":"https://patchwork.libcamera.org/api/series/464/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=464","date":"2019-08-18T01:13:15","name":"Assorted fixes for Android camera HAL","version":1,"mbox":"https://patchwork.libcamera.org/series/464/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/1845/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/1845/checks/","tags":{},"headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8A95861924\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 18 Aug 2019 03:13:43 +0200 (CEST)","from pendragon.bb.dnainternet.fi\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 259BD734\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 18 Aug 2019 03:13:43 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1566090823;\n\tbh=LCZ7qAECO8SDRROe5LwZlUPot5Oh7jYrekN9Wtih9d0=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=N8JNZYsBUHmmx1KEks8VscymofYtTqDeuLf4gVyARfBuaEtlEI+ipVPbfKDCn4l/R\n\tSvaMxs++pBh3erCcfpZLxhbJPiKrm0G5A0I7GhHpKP3LgJtdF5iqqWDQq3JOd6xRQ7\n\tiW9w+adO/HZ/l9mgcd0PvlkIZnr9U0d1ADdwew04=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","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","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 08/14] test: camera: Use the CameraManager\n\tfrom the CameraTest base class","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Sun, 18 Aug 2019 01:13:44 -0000"},"content":"Make the camera manager a protected field of the CameraTest class, and\nuse it instead of CameraManager::instance() in the camera tests. This\nprepares for the removal of CameraManager::instance().\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n test/camera/buffer_import.cpp | 2 +-\n test/camera/camera_test.h     | 4 +---\n test/camera/capture.cpp       | 2 +-\n 3 files changed, 3 insertions(+), 5 deletions(-)","diff":"diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp\nindex 98786469428f..9364e3d1bc44 100644\n--- a/test/camera/buffer_import.cpp\n+++ b/test/camera/buffer_import.cpp\n@@ -375,7 +375,7 @@ protected:\n \t\t\treturn TestFail;\n \t\t}\n \n-\t\tEventDispatcher *dispatcher = CameraManager::instance()->eventDispatcher();\n+\t\tEventDispatcher *dispatcher = cm_->eventDispatcher();\n \n \t\tTimer timer;\n \t\ttimer.start(5000);\ndiff --git a/test/camera/camera_test.h b/test/camera/camera_test.h\nindex ffc8a485bfaf..e57b05eb28a9 100644\n--- a/test/camera/camera_test.h\n+++ b/test/camera/camera_test.h\n@@ -23,10 +23,8 @@ protected:\n \tint init();\n \tvoid cleanup();\n \n-\tstd::shared_ptr<Camera> camera_;\n-\n-private:\n \tCameraManager *cm_;\n+\tstd::shared_ptr<Camera> camera_;\n };\n \n #endif /* __LIBCAMERA_CAMERA_TEST_H__ */\ndiff --git a/test/camera/capture.cpp b/test/camera/capture.cpp\nindex e6bf7a8d9ebb..791ccad15f70 100644\n--- a/test/camera/capture.cpp\n+++ b/test/camera/capture.cpp\n@@ -120,7 +120,7 @@ protected:\n \t\t\t}\n \t\t}\n \n-\t\tEventDispatcher *dispatcher = CameraManager::instance()->eventDispatcher();\n+\t\tEventDispatcher *dispatcher = cm_->eventDispatcher();\n \n \t\tTimer timer;\n \t\ttimer.start(1000);\n","prefixes":["libcamera-devel","08/14"]}