18#include "../video_device_monitor.h"
37 = {0xe5323777, 0xf976, 0x4f5b, 0x9b, 0x55, 0xb9, 0x46, 0x99, 0xc4, 0x6e, 0x44};
39class VideoDeviceMonitorImpl
54 std::vector<std::string> enumerateVideoInputDevices();
74 thread_ = std::thread(&VideoDeviceMonitorImpl::run,
this);
80 if (thread_.joinable())
90 return std::tolower(c);
136 VideoDeviceMonitorImpl*
pThis;
147 JAMI_ERR() <<
"Cannot register for device change notifications";
167 pThis->monitor_->addDevice(
id);
199VideoDeviceMonitorImpl::run()
202 static const char*
className =
"Message";
205 wx.lpfnWndProc = WinProcCallback;
211 0,
className,
"devicenotifications", 0, 0, 0, 0, 0,
HWND_MESSAGE,
NULL,
NULL,
this);
226std::vector<std::string>
227VideoDeviceMonitorImpl::enumerateVideoInputDevices()
238 JAMI_ERR() <<
"Unable to enumerate webcams";
248 if (FAILED(
hr) ||
pEnum ==
nullptr) {
290 , monitorImpl_(
new VideoDeviceMonitorImpl(
this))
292 monitorImpl_->start();
296VideoDeviceMonitor::~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)