summaryrefslogtreecommitdiff
path: root/src/gstreamer/gstlibcamerasrc.cpp
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-08-02 23:57:17 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-08-05 20:07:13 +0200
commit2e7c80a4f9d4f50a82c674863ce159856c748873 (patch)
treeed342559a62d42a4bbdff87be1431f95e23bcf07 /src/gstreamer/gstlibcamerasrc.cpp
parent53d38b19ed5b2650ad419db9cd91cf9d3392c877 (diff)
libcamera: camera: Rename name() to id()
Rename Camera::name() to camera::id() to better describe what it represents, a unique and stable ID for the camera. While at it improve the documentation for the camera ID to describe it needs to be stable for a camera between resets of the system. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/gstreamer/gstlibcamerasrc.cpp')
-rw-r--r--src/gstreamer/gstlibcamerasrc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp
index 9755922a..0c28ae3f 100644
--- a/src/gstreamer/gstlibcamerasrc.cpp
+++ b/src/gstreamer/gstlibcamerasrc.cpp
@@ -241,12 +241,12 @@ gst_libcamera_src_open(GstLibcameraSrc *self)
cam = cm->cameras()[0];
}
- GST_INFO_OBJECT(self, "Using camera named '%s'", cam->name().c_str());
+ GST_INFO_OBJECT(self, "Using camera '%s'", cam->id().c_str());
ret = cam->acquire();
if (ret) {
GST_ELEMENT_ERROR(self, RESOURCE, BUSY,
- ("Camera name '%s' is already in use.", cam->name().c_str()),
+ ("Camera '%s' is already in use.", cam->id().c_str()),
("libcamera::Camera::acquire() failed: %s", g_strerror(ret)));
return false;
}
@@ -495,7 +495,7 @@ gst_libcamera_src_close(GstLibcameraSrc *self)
ret = state->cam_->release();
if (ret) {
GST_ELEMENT_WARNING(self, RESOURCE, BUSY,
- ("Camera name '%s' is still in use.", state->cam_->name().c_str()),
+ ("Camera '%s' is still in use.", state->cam_->id().c_str()),
("libcamera::Camera.release() failed: %s", g_strerror(-ret)));
}