18#include "../video_device_monitor.h"
36constexpr GUID guidCamera = {0xe5323777, 0xf976, 0x4f5b, 0x9b, 0x55, 0xb9, 0x46, 0x99, 0xc4, 0x6e, 0x44};
38class VideoDeviceMonitorImpl
53 std::vector<std::string> enumerateVideoInputDevices();
73 thread_ = std::thread(&VideoDeviceMonitorImpl::run,
this);
79 if (thread_.joinable())
89 return std::tolower(c);
133 VideoDeviceMonitorImpl*
pThis;
144 JAMI_ERR() <<
"Cannot register for device change notifications";
162 pThis->monitor_->addDevice(
id);
194VideoDeviceMonitorImpl::run()
197 static const char*
className =
"Message";
200 wx.lpfnWndProc = WinProcCallback;
205 hWnd_ =
CreateWindowEx(0,
className,
"devicenotifications", 0, 0, 0, 0, 0,
HWND_MESSAGE,
NULL,
NULL,
this);
220std::vector<std::string>
221VideoDeviceMonitorImpl::enumerateVideoInputDevices()
229 JAMI_ERR() <<
"Unable to enumerate webcams";
239 if (FAILED(
hr) ||
pEnum ==
nullptr) {
281 , monitorImpl_(
new VideoDeviceMonitorImpl(
this))
283 monitorImpl_->start();
287VideoDeviceMonitor::~VideoDeviceMonitor() {}
VideoDeviceMonitorImpl(VideoDeviceMonitor *monitor)
~VideoDeviceMonitorImpl()
bool addDevice(const std::string &node, const std::vector< std::map< std::string, std::string > > &devInfo={})
bool registerDeviceInterfaceToHwnd(HWND hWnd, HDEVNOTIFY *hDeviceNotify)
constexpr GUID guidCamera
static constexpr const char DEVICE_DESKTOP[]
std::string getDeviceUniqueName(PDEV_BROADCAST_DEVICEINTERFACE_A pbdi)
void emitSignal(Args... args)
std::string to_string(double value)
int32_t addDevice(const std::string &accountId, const std::string &uri)
Simple macro to hide class' copy constructor and assignment operator.
#define NON_COPYABLE(ClassName)