mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 07:45:30 +00:00
Bug 1572281 - Remove audio device change notifications from video capture in OSX. r=dminor
Video capture used to provide device change notifications for audio and video devices. From now on, CubebDeviceEnumerator will provide audio device change notifications thus video capture is updated to notify only changes of the video device. This is the OSX part. Differential Revision: https://phabricator.services.mozilla.com/D46273 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
67bc215a66
commit
aa5a82572d
@ -113,7 +113,9 @@
|
|||||||
queue:[NSOperationQueue mainQueue]
|
queue:[NSOperationQueue mainQueue]
|
||||||
usingBlock:^(NSNotification *note) {
|
usingBlock:^(NSNotification *note) {
|
||||||
[_lock lock];
|
[_lock lock];
|
||||||
if(_owner)
|
AVCaptureDevice *device = [note object];
|
||||||
|
BOOL isVideoDevice = [device hasMediaType: AVMediaTypeVideo];
|
||||||
|
if(isVideoDevice && _owner)
|
||||||
_owner->DeviceChange();
|
_owner->DeviceChange();
|
||||||
[_lock unlock];
|
[_lock unlock];
|
||||||
}];
|
}];
|
||||||
@ -123,7 +125,9 @@
|
|||||||
queue:[NSOperationQueue mainQueue]
|
queue:[NSOperationQueue mainQueue]
|
||||||
usingBlock:^(NSNotification *note) {
|
usingBlock:^(NSNotification *note) {
|
||||||
[_lock lock];
|
[_lock lock];
|
||||||
if(_owner)
|
AVCaptureDevice *device = [note object];
|
||||||
|
BOOL isVideoDevice = [device hasMediaType: AVMediaTypeVideo];
|
||||||
|
if(isVideoDevice && _owner)
|
||||||
_owner->DeviceChange();
|
_owner->DeviceChange();
|
||||||
[_lock unlock];
|
[_lock unlock];
|
||||||
}];
|
}];
|
||||||
|
Loading…
Reference in New Issue
Block a user