{"id":9035,"url":"https://patchwork.libcamera.org/api/1.1/patches/9035/?format=json","web_url":"https://patchwork.libcamera.org/patch/9035/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20200728003058.2871461-2-niklas.soderlund@ragnatech.se>","date":"2020-07-28T00:30:53","name":"[libcamera-devel,v2,1/6] libcamera: camera: Append pipeline name to camera name","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"3992b3ed60cd17f418664c02770309f2f10183d0","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/1.1/people/5/?format=json","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/9035/mbox/","series":[{"id":1155,"url":"https://patchwork.libcamera.org/api/1.1/series/1155/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1155","date":"2020-07-28T00:30:52","name":"libcamera: Generate unique and stable camera names","version":2,"mbox":"https://patchwork.libcamera.org/series/1155/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/9035/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/9035/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id C648ABD86F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 28 Jul 2020 00:31:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9B49C617D6;\n\tTue, 28 Jul 2020 02:31:20 +0200 (CEST)","from vsp-unauthed02.binero.net (vsp-unauthed02.binero.net\n\t[195.74.38.227])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1C2C960939\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 28 Jul 2020 02:31:17 +0200 (CEST)","from bismarck.berto.se (p4fca2eca.dip0.t-ipconnect.de\n\t[79.202.46.202]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA\n\tid a36d82e2-d069-11ea-933e-005056917a89;\n\tTue, 28 Jul 2020 02:31:12 +0200 (CEST)"],"X-Halon-ID":"a36d82e2-d069-11ea-933e-005056917a89","Authorized-sender":"niklas@soderlund.pp.se","From":"=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","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\n\tname to camera name","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","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>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Append the pipeline handler name to each camera name. This is done to\ncreate a separate namespace for each pipeline to generate unique camera\nnames in. This change modifies the name of all cameras.\n\nBefore this change example of camera names:\n\nVenus USB2.0 Camera: Venus USB2\nLogitech Webcam C930e\nVIMC Sensor B\n\nAfter this change the same cameras are:\n\nVenus USB2.0 Camera: Venus USB2 (PipelineHandlerUVC)\nLogitech Webcam C930e (PipelineHandlerUVC)\nVIMC Sensor B (PipelineHandlerVimc)\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n src/libcamera/camera.cpp                | 4 +++-\n test/camera/buffer_import.cpp           | 2 +-\n test/camera/capture.cpp                 | 2 +-\n test/camera/configuration_default.cpp   | 2 +-\n test/camera/configuration_set.cpp       | 2 +-\n test/camera/statemachine.cpp            | 2 +-\n test/controls/control_info_map.cpp      | 2 +-\n test/controls/control_list.cpp          | 2 +-\n test/serialization/serialization_test.h | 2 +-\n 9 files changed, 11 insertions(+), 9 deletions(-)","diff":"diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\nindex 69a1b4428e3f4eca..81d5816ef6a653b3 100644\n--- a/src/libcamera/camera.cpp\n+++ b/src/libcamera/camera.cpp\n@@ -468,7 +468,9 @@ std::shared_ptr<Camera> Camera::create(PipelineHandler *pipe,\n \t\t}\n \t};\n \n-\tCamera *camera = new Camera(pipe, name, streams);\n+\tstd::string fullName = name + \" (\" + pipe->name() + \")\";\n+\n+\tCamera *camera = new Camera(pipe, fullName, streams);\n \n \treturn std::shared_ptr<Camera>(camera, Deleter());\n }\ndiff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp\nindex ad680a83f9187213..ab406c35fe9e07e7 100644\n--- a/test/camera/buffer_import.cpp\n+++ b/test/camera/buffer_import.cpp\n@@ -28,7 +28,7 @@ class BufferImportTest : public CameraTest, public Test\n {\n public:\n \tBufferImportTest()\n-\t\t: CameraTest(\"VIMC Sensor B\")\n+\t\t: CameraTest(\"VIMC Sensor B (PipelineHandlerVimc)\")\n \t{\n \t}\n \ndiff --git a/test/camera/capture.cpp b/test/camera/capture.cpp\nindex f6b2f348bda52752..1d57201ef83de1aa 100644\n--- a/test/camera/capture.cpp\n+++ b/test/camera/capture.cpp\n@@ -18,7 +18,7 @@ class Capture : public CameraTest, public Test\n {\n public:\n \tCapture()\n-\t\t: CameraTest(\"VIMC Sensor B\")\n+\t\t: CameraTest(\"VIMC Sensor B (PipelineHandlerVimc)\")\n \t{\n \t}\n \ndiff --git a/test/camera/configuration_default.cpp b/test/camera/configuration_default.cpp\nindex 31c908d2449eafe7..a1159c18d78c8493 100644\n--- a/test/camera/configuration_default.cpp\n+++ b/test/camera/configuration_default.cpp\n@@ -18,7 +18,7 @@ class ConfigurationDefault : public CameraTest, public Test\n {\n public:\n \tConfigurationDefault()\n-\t\t: CameraTest(\"VIMC Sensor B\")\n+\t\t: CameraTest(\"VIMC Sensor B (PipelineHandlerVimc)\")\n \t{\n \t}\n \ndiff --git a/test/camera/configuration_set.cpp b/test/camera/configuration_set.cpp\nindex b4b5968115e81f59..63331c0a2c7df799 100644\n--- a/test/camera/configuration_set.cpp\n+++ b/test/camera/configuration_set.cpp\n@@ -18,7 +18,7 @@ class ConfigurationSet : public CameraTest, public Test\n {\n public:\n \tConfigurationSet()\n-\t\t: CameraTest(\"VIMC Sensor B\")\n+\t\t: CameraTest(\"VIMC Sensor B (PipelineHandlerVimc)\")\n \t{\n \t}\n \ndiff --git a/test/camera/statemachine.cpp b/test/camera/statemachine.cpp\nindex 325b4674bcc958d8..77d021823774a674 100644\n--- a/test/camera/statemachine.cpp\n+++ b/test/camera/statemachine.cpp\n@@ -18,7 +18,7 @@ class Statemachine : public CameraTest, public Test\n {\n public:\n \tStatemachine()\n-\t\t: CameraTest(\"VIMC Sensor B\")\n+\t\t: CameraTest(\"VIMC Sensor B (PipelineHandlerVimc)\")\n \t{\n \t}\n \ndiff --git a/test/controls/control_info_map.cpp b/test/controls/control_info_map.cpp\nindex e4305f132db7952f..1d601a827e10e995 100644\n--- a/test/controls/control_info_map.cpp\n+++ b/test/controls/control_info_map.cpp\n@@ -24,7 +24,7 @@ class ControlInfoMapTest : public CameraTest, public Test\n {\n public:\n \tControlInfoMapTest()\n-\t\t: CameraTest(\"VIMC Sensor B\")\n+\t\t: CameraTest(\"VIMC Sensor B (PipelineHandlerVimc)\")\n \t{\n \t}\n \ndiff --git a/test/controls/control_list.cpp b/test/controls/control_list.cpp\nindex 5c8485b5dcc31499..5dad297501d009a5 100644\n--- a/test/controls/control_list.cpp\n+++ b/test/controls/control_list.cpp\n@@ -24,7 +24,7 @@ class ControlListTest : public CameraTest, public Test\n {\n public:\n \tControlListTest()\n-\t\t: CameraTest(\"VIMC Sensor B\")\n+\t\t: CameraTest(\"VIMC Sensor B (PipelineHandlerVimc)\")\n \t{\n \t}\n \ndiff --git a/test/serialization/serialization_test.h b/test/serialization/serialization_test.h\nindex fe77221ef5d07478..621c6d6279525300 100644\n--- a/test/serialization/serialization_test.h\n+++ b/test/serialization/serialization_test.h\n@@ -20,7 +20,7 @@ class SerializationTest : public CameraTest, public Test\n {\n public:\n \tSerializationTest()\n-\t\t: CameraTest(\"VIMC Sensor B\")\n+\t\t: CameraTest(\"VIMC Sensor B (PipelineHandlerVimc)\")\n \t{\n \t}\n \n","prefixes":["libcamera-devel","v2","1/6"]}