[libcamera-devel] [PATCH v2 1/6] libcamera: camera: Append pipeline name to camera name
Niklas Söderlund
niklas.soderlund at ragnatech.se
Tue Jul 28 02:30:53 CEST 2020
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 <niklas.soderlund at ragnatech.se>
---
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> 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>(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)")
{
}
--
2.27.0
More information about the libcamera-devel
mailing list