From patchwork Tue Jul 28 00:30:53 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: 9035 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 C648ABD86F for ; Tue, 28 Jul 2020 00:31:20 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9B49C617D6; Tue, 28 Jul 2020 02:31:20 +0200 (CEST) Received: from vsp-unauthed02.binero.net (vsp-unauthed02.binero.net [195.74.38.227]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1C2C960939 for ; Tue, 28 Jul 2020 02:31:17 +0200 (CEST) X-Halon-ID: a36d82e2-d069-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 a36d82e2-d069-11ea-933e-005056917a89; Tue, 28 Jul 2020 02:31:12 +0200 (CEST) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Tue, 28 Jul 2020 02:30:53 +0200 Message-Id: <20200728003058.2871461-2-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200728003058.2871461-1-niklas.soderlund@ragnatech.se> References: <20200728003058.2871461-1-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 1/6] libcamera: camera: Append pipeline name to 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" Append the pipeline handler name to each camera name. This is done to create a separate namespace for each pipeline to generate unique camera names in. This change modifies the name of all cameras. Before this change example of camera names: Venus USB2.0 Camera: Venus USB2 Logitech Webcam C930e VIMC Sensor B After this change the same cameras are: Venus USB2.0 Camera: Venus USB2 (PipelineHandlerUVC) Logitech Webcam C930e (PipelineHandlerUVC) VIMC Sensor B (PipelineHandlerVimc) Signed-off-by: Niklas Söderlund --- src/libcamera/camera.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 +- test/serialization/serialization_test.h | 2 +- 9 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index 69a1b4428e3f4eca..81d5816ef6a653b3 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -468,7 +468,9 @@ std::shared_ptr Camera::create(PipelineHandler *pipe, } }; - Camera *camera = new Camera(pipe, name, streams); + std::string fullName = name + " (" + pipe->name() + ")"; + + Camera *camera = new Camera(pipe, fullName, streams); return std::shared_ptr(camera, Deleter()); } diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp index ad680a83f9187213..ab406c35fe9e07e7 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("VIMC Sensor B (PipelineHandlerVimc)") { } diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp index f6b2f348bda52752..1d57201ef83de1aa 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("VIMC Sensor B (PipelineHandlerVimc)") { } diff --git a/test/camera/configuration_default.cpp b/test/camera/configuration_default.cpp index 31c908d2449eafe7..a1159c18d78c8493 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("VIMC Sensor B (PipelineHandlerVimc)") { } diff --git a/test/camera/configuration_set.cpp b/test/camera/configuration_set.cpp index b4b5968115e81f59..63331c0a2c7df799 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("VIMC Sensor B (PipelineHandlerVimc)") { } diff --git a/test/camera/statemachine.cpp b/test/camera/statemachine.cpp index 325b4674bcc958d8..77d021823774a674 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("VIMC Sensor B (PipelineHandlerVimc)") { } diff --git a/test/controls/control_info_map.cpp b/test/controls/control_info_map.cpp index e4305f132db7952f..1d601a827e10e995 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("VIMC Sensor B (PipelineHandlerVimc)") { } diff --git a/test/controls/control_list.cpp b/test/controls/control_list.cpp index 5c8485b5dcc31499..5dad297501d009a5 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("VIMC Sensor B (PipelineHandlerVimc)") { } diff --git a/test/serialization/serialization_test.h b/test/serialization/serialization_test.h index fe77221ef5d07478..621c6d6279525300 100644 --- a/test/serialization/serialization_test.h +++ b/test/serialization/serialization_test.h @@ -20,7 +20,7 @@ class SerializationTest : public CameraTest, public Test { public: SerializationTest() - : CameraTest("VIMC Sensor B") + : CameraTest("VIMC Sensor B (PipelineHandlerVimc)") { }