libcamera: device_enumerator: add DeviceEnumeratorUdev class
Provide a DeviceEnumeratorUdev class which is a specialization of DeviceEnumerator which uses udev to enumerate information in the system. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -75,6 +75,21 @@ private:
|
||||
virtual std::string lookupDevnode(int major, int minor) = 0;
|
||||
};
|
||||
|
||||
class DeviceEnumeratorUdev: public DeviceEnumerator
|
||||
{
|
||||
public:
|
||||
DeviceEnumeratorUdev();
|
||||
~DeviceEnumeratorUdev();
|
||||
|
||||
int init() final;
|
||||
int enumerate() final;
|
||||
|
||||
private:
|
||||
struct udev *udev_;
|
||||
|
||||
std::string lookupDevnode(int major, int minor) final;
|
||||
};
|
||||
|
||||
} /* namespace libcamera */
|
||||
|
||||
#endif /* __LIBCAMERA_DEVICE_ENUMERATOR_H__ */
|
||||
|
||||
Reference in New Issue
Block a user