#pragma once #include #include #pragma comment(lib, "strmiids") #include #include struct Device { int id; // This can be used to open the device in OpenCV std::string devicePath; std::string deviceName; // This can be used to show the devices to the user }; class DeviceEnumerator { public: DeviceEnumerator() = default; std::map getDevicesMap(const GUID deviceClass); std::map getVideoDevicesMap(); std::map getAudioDevicesMap(); private: std::string ConvertBSTRToMBS(BSTR bstr); std::string ConvertWCSToMBS(const wchar_t* pstr, long wslen); };