Skip to content
Snippets Groups Projects
Commit 1a6c97fc authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

macOS: fix add video device

Add device should be called after initializing video device monitor.

Change-Id: I2f4dda929086837ccc1fb1f854b6827d203092d8
parent 48477cd0
Branches
No related tags found
No related merge requests found
......@@ -62,6 +62,10 @@ class VideoDeviceMonitorImpl {
VideoDeviceMonitorImpl::VideoDeviceMonitorImpl(VideoDeviceMonitor* monitor) :
monitor_(monitor)
{
}
void VideoDeviceMonitorImpl::start()
{
/* Enumerate existing devices */
auto myVideoDevices = [[AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]
......@@ -88,11 +92,7 @@ VideoDeviceMonitorImpl::VideoDeviceMonitorImpl(VideoDeviceMonitor* monitor) :
RING_ERR("%s", e.what());
}
}
return;
}
void VideoDeviceMonitorImpl::start()
{
NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
id deviceWasConnectedObserver = [notificationCenter addObserverForName:AVCaptureDeviceWasConnectedNotification
object:nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment