diff options
Diffstat (limited to 'src/libcamera/include/device_enumerator_udev.h')
-rw-r--r-- | src/libcamera/include/device_enumerator_udev.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libcamera/include/device_enumerator_udev.h b/src/libcamera/include/device_enumerator_udev.h index 80f9372b..5bdcdea6 100644 --- a/src/libcamera/include/device_enumerator_udev.h +++ b/src/libcamera/include/device_enumerator_udev.h @@ -7,16 +7,23 @@ #ifndef __LIBCAMERA_DEVICE_ENUMERATOR_UDEV_H__ #define __LIBCAMERA_DEVICE_ENUMERATOR_UDEV_H__ +#include <list> +#include <map> +#include <memory> #include <string> +#include <sys/types.h> #include "device_enumerator.h" struct udev; +struct udev_device; struct udev_monitor; namespace libcamera { class EventNotifier; +class MediaDevice; +class MediaEntity; class DeviceEnumeratorUdev : public DeviceEnumerator { @@ -32,8 +39,17 @@ private: struct udev_monitor *monitor_; EventNotifier *notifier_; + std::map<std::shared_ptr<MediaDevice>, std::list<dev_t>> deps_; + std::map<dev_t, std::shared_ptr<MediaDevice>> devnumToDevice_; + std::map<dev_t, MediaEntity *> devnumToEntity_; + + std::list<dev_t> orphans_; + + int addUdevDevice(struct udev_device *dev); + int populateMediaDevice(const std::shared_ptr<MediaDevice> &media); std::string lookupDeviceNode(int major, int minor) final; + int addV4L2Device(dev_t devnum); void udevNotify(EventNotifier *notifier); }; |