summaryrefslogtreecommitdiff
path: root/src/libcamera/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcamera/include')
-rw-r--r--src/libcamera/include/device_enumerator.h4
-rw-r--r--src/libcamera/include/device_enumerator_sysfs.h2
-rw-r--r--src/libcamera/include/device_enumerator_udev.h8
3 files changed, 7 insertions, 7 deletions
diff --git a/src/libcamera/include/device_enumerator.h b/src/libcamera/include/device_enumerator.h
index 770f4277..433e357a 100644
--- a/src/libcamera/include/device_enumerator.h
+++ b/src/libcamera/include/device_enumerator.h
@@ -44,8 +44,8 @@ public:
std::shared_ptr<MediaDevice> search(const DeviceMatch &dm);
protected:
- std::shared_ptr<MediaDevice> createDevice(const std::string &deviceNode);
- void addDevice(const std::shared_ptr<MediaDevice> &media);
+ std::unique_ptr<MediaDevice> createDevice(const std::string &deviceNode);
+ void addDevice(std::unique_ptr<MediaDevice> &&media);
void removeDevice(const std::string &deviceNode);
private:
diff --git a/src/libcamera/include/device_enumerator_sysfs.h b/src/libcamera/include/device_enumerator_sysfs.h
index 9063f6a7..5a5c9b0f 100644
--- a/src/libcamera/include/device_enumerator_sysfs.h
+++ b/src/libcamera/include/device_enumerator_sysfs.h
@@ -23,7 +23,7 @@ public:
int enumerate();
private:
- int populateMediaDevice(const std::shared_ptr<MediaDevice> &media);
+ int populateMediaDevice(MediaDevice *media);
std::string lookupDeviceNode(int major, int minor);
};
diff --git a/src/libcamera/include/device_enumerator_udev.h b/src/libcamera/include/device_enumerator_udev.h
index efaefe5d..fdce4520 100644
--- a/src/libcamera/include/device_enumerator_udev.h
+++ b/src/libcamera/include/device_enumerator_udev.h
@@ -43,9 +43,9 @@ private:
using DependencyMap = std::map<dev_t, std::list<MediaEntity *>>;
struct MediaDeviceDeps {
- MediaDeviceDeps(const std::shared_ptr<MediaDevice> &media,
- const DependencyMap &deps)
- : media_(media), deps_(deps)
+ MediaDeviceDeps(std::unique_ptr<MediaDevice> &&media,
+ DependencyMap &&deps)
+ : media_(std::move(media)), deps_(std::move(deps))
{
}
@@ -54,7 +54,7 @@ private:
return media_ == other.media_;
}
- std::shared_ptr<MediaDevice> media_;
+ std::unique_ptr<MediaDevice> media_;
DependencyMap deps_;
};