Title: [249154] trunk/Source/WebCore
- Revision
- 249154
- Author
- [email protected]
- Date
- 2019-08-27 11:16:17 -0700 (Tue, 27 Aug 2019)
Log Message
Disabled devices should not be taken into account when searching for a capture device
https://bugs.webkit.org/show_bug.cgi?id=201183
<rdar://problem/54353440>
Reviewed by Jer Noble.
Manually tested.
* platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
(WebCore::CoreAudioCaptureDeviceManager::coreAudioDeviceWithUID):
We currently keep a list of devices, some of which might be disabled.
We should not take into account disabled devices, only enabled devices
when doing this search.
* platform/mediastream/mac/CoreAudioCaptureSource.cpp:
(WebCore::CoreAudioSharedUnit::setupAudioUnit):
Improve logging.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (249153 => 249154)
--- trunk/Source/WebCore/ChangeLog 2019-08-27 18:16:03 UTC (rev 249153)
+++ trunk/Source/WebCore/ChangeLog 2019-08-27 18:16:17 UTC (rev 249154)
@@ -1,3 +1,22 @@
+2019-08-27 Youenn Fablet <[email protected]>
+
+ Disabled devices should not be taken into account when searching for a capture device
+ https://bugs.webkit.org/show_bug.cgi?id=201183
+ <rdar://problem/54353440>
+
+ Reviewed by Jer Noble.
+
+ Manually tested.
+
+ * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
+ (WebCore::CoreAudioCaptureDeviceManager::coreAudioDeviceWithUID):
+ We currently keep a list of devices, some of which might be disabled.
+ We should not take into account disabled devices, only enabled devices
+ when doing this search.
+ * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
+ (WebCore::CoreAudioSharedUnit::setupAudioUnit):
+ Improve logging.
+
2019-08-26 Jer Noble <[email protected]>
Removing fullscreen element in rAF() callback after requestFullscreen() can leave fullscreen in inconsistent state.
Modified: trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp (249153 => 249154)
--- trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp 2019-08-27 18:16:03 UTC (rev 249153)
+++ trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp 2019-08-27 18:16:17 UTC (rev 249154)
@@ -150,7 +150,7 @@
Optional<CoreAudioCaptureDevice> CoreAudioCaptureDeviceManager::coreAudioDeviceWithUID(const String& deviceID)
{
for (auto& device : coreAudioCaptureDevices()) {
- if (device.persistentId() == deviceID)
+ if (device.persistentId() == deviceID && device.enabled())
return device;
}
return WTF::nullopt;
Modified: trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp (249153 => 249154)
--- trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp 2019-08-27 18:16:03 UTC (rev 249153)
+++ trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp 2019-08-27 18:16:17 UTC (rev 249154)
@@ -339,7 +339,7 @@
err = AudioUnitSetProperty(m_ioUnit, kAudioOutputUnitProperty_CurrentDevice, kAudioUnitScope_Global, inputBus, &m_captureDeviceID, sizeof(m_captureDeviceID));
if (err) {
- RELEASE_LOG_ERROR(WebRTC, "CoreAudioSharedUnit::setupAudioUnit(%p) unable to set vpio unit capture device ID, error %d (%.4s)", this, (int)err, (char*)&err);
+ RELEASE_LOG_ERROR(WebRTC, "CoreAudioSharedUnit::setupAudioUnit(%p) unable to set vpio unit capture device ID %d, error %d (%.4s)", this, (int)m_captureDeviceID, (int)err, (char*)&err);
return err;
}
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes