| | #pragma once |
| |
|
| | #include <Windows.h> |
| | #include <dshow.h> |
| |
|
| | #pragma comment(lib, "strmiids") |
| |
|
| | #include <map> |
| | #include <string> |
| |
|
| | struct Device { |
| | int id; |
| | std::string devicePath; |
| | std::string deviceName; |
| | }; |
| |
|
| | class DeviceEnumerator { |
| |
|
| | public: |
| |
|
| | DeviceEnumerator() = default; |
| | std::map<int, Device> getDevicesMap(const GUID deviceClass); |
| | std::map<int, Device> getVideoDevicesMap(); |
| | std::map<int, Device> getAudioDevicesMap(); |
| |
|
| | private: |
| |
|
| | std::string ConvertBSTRToMBS(BSTR bstr); |
| | std::string ConvertWCSToMBS(const wchar_t* pstr, long wslen); |
| |
|
| | }; |
| |
|