From patchwork Sat Jul 18 13:23:21 2020 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: 8855 X-Patchwork-Delegate: niklas.soderlund@ragnatech.se Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 9A37AC0109 for ; Sat, 18 Jul 2020 13:23:39 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7354060729; Sat, 18 Jul 2020 15:23:39 +0200 (CEST) Received: from bin-mail-out-05.binero.net (bin-mail-out-05.binero.net [195.74.38.228]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 14425605CC for ; Sat, 18 Jul 2020 15:23:35 +0200 (CEST) X-Halon-ID: e0a59279-c8f9-11ea-933e-005056917a89 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (p4fca2eca.dip0.t-ipconnect.de [79.202.46.202]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA id e0a59279-c8f9-11ea-933e-005056917a89; Sat, 18 Jul 2020 15:23:33 +0200 (CEST) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Sat, 18 Jul 2020 15:23:21 +0200 Message-Id: <20200718132324.867815-7-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200718132324.867815-1-niklas.soderlund@ragnatech.se> References: <20200718132324.867815-1-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 6/9] libcamera: pipeline: vimc: Align camera name 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" In preparation to aligning how cameras are named drop the VIMC prefix from the camera name and use the sensor entity name instead of the sensor model. For the sensors in VIMC pipeline the model and entity name are the same as model is derived from entity name with the i2c information (if any) removed. As the VIMC sensors are not attached to a i2c bus there is nothing to remove and the two are the same. Before this change the camera name was 'VIMC Sensor B' After this change the camera name is 'Sensor B' Signed-off-by: Niklas Söderlund --- src/libcamera/pipeline/vimc/vimc.cpp | 4 ++-- test/camera/buffer_import.cpp | 2 +- test/camera/capture.cpp | 2 +- test/camera/configuration_default.cpp | 2 +- test/camera/configuration_set.cpp | 2 +- test/camera/statemachine.cpp | 2 +- test/controls/control_info_map.cpp | 2 +- test/controls/control_list.cpp | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp index 38656d28b357dd1b..6560b632ae55b304 100644 --- a/src/libcamera/pipeline/vimc/vimc.cpp +++ b/src/libcamera/pipeline/vimc/vimc.cpp @@ -432,10 +432,10 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator) return false; /* Create and register the camera. */ - std::string name{ "VIMC " + data->sensor_->model() }; std::set streams{ &data->stream_ }; std::shared_ptr camera = Camera::create(this, data->sensor_->id(), - name, streams); + data->sensor_->entity()->name(), + streams); registerCamera(std::move(camera), std::move(data)); return true; diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp index ad680a83f9187213..04d3bb37a653e7e4 100644 --- a/test/camera/buffer_import.cpp +++ b/test/camera/buffer_import.cpp @@ -28,7 +28,7 @@ class BufferImportTest : public CameraTest, public Test { public: BufferImportTest() - : CameraTest("VIMC Sensor B") + : CameraTest("Sensor B") { } diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp index f6b2f348bda52752..6a0e0e456e321a71 100644 --- a/test/camera/capture.cpp +++ b/test/camera/capture.cpp @@ -18,7 +18,7 @@ class Capture : public CameraTest, public Test { public: Capture() - : CameraTest("VIMC Sensor B") + : CameraTest("Sensor B") { } diff --git a/test/camera/configuration_default.cpp b/test/camera/configuration_default.cpp index 31c908d2449eafe7..b8612134e4bcf497 100644 --- a/test/camera/configuration_default.cpp +++ b/test/camera/configuration_default.cpp @@ -18,7 +18,7 @@ class ConfigurationDefault : public CameraTest, public Test { public: ConfigurationDefault() - : CameraTest("VIMC Sensor B") + : CameraTest("Sensor B") { } diff --git a/test/camera/configuration_set.cpp b/test/camera/configuration_set.cpp index b4b5968115e81f59..35597f4452b18dad 100644 --- a/test/camera/configuration_set.cpp +++ b/test/camera/configuration_set.cpp @@ -18,7 +18,7 @@ class ConfigurationSet : public CameraTest, public Test { public: ConfigurationSet() - : CameraTest("VIMC Sensor B") + : CameraTest("Sensor B") { } diff --git a/test/camera/statemachine.cpp b/test/camera/statemachine.cpp index 325b4674bcc958d8..2816db7b99446549 100644 --- a/test/camera/statemachine.cpp +++ b/test/camera/statemachine.cpp @@ -18,7 +18,7 @@ class Statemachine : public CameraTest, public Test { public: Statemachine() - : CameraTest("VIMC Sensor B") + : CameraTest("Sensor B") { } diff --git a/test/controls/control_info_map.cpp b/test/controls/control_info_map.cpp index e4305f132db7952f..da49553ab41ca996 100644 --- a/test/controls/control_info_map.cpp +++ b/test/controls/control_info_map.cpp @@ -24,7 +24,7 @@ class ControlInfoMapTest : public CameraTest, public Test { public: ControlInfoMapTest() - : CameraTest("VIMC Sensor B") + : CameraTest("Sensor B") { } diff --git a/test/controls/control_list.cpp b/test/controls/control_list.cpp index 5c8485b5dcc31499..25bcf6edc4cbaa82 100644 --- a/test/controls/control_list.cpp +++ b/test/controls/control_list.cpp @@ -24,7 +24,7 @@ class ControlListTest : public CameraTest, public Test { public: ControlListTest() - : CameraTest("VIMC Sensor B") + : CameraTest("Sensor B") { }