Title: [249238] branches/safari-608-branch/Source/WebCore
- Revision
- 249238
- Author
- [email protected]
- Date
- 2019-08-28 22:57:06 -0700 (Wed, 28 Aug 2019)
Log Message
Cherry-pick r249154. rdar://problem/54775050
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.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249154 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-608-branch/Source/WebCore/ChangeLog (249237 => 249238)
--- branches/safari-608-branch/Source/WebCore/ChangeLog 2019-08-29 03:14:24 UTC (rev 249237)
+++ branches/safari-608-branch/Source/WebCore/ChangeLog 2019-08-29 05:57:06 UTC (rev 249238)
@@ -1,3 +1,46 @@
+2019-08-28 Kocsen Chung <[email protected]>
+
+ Cherry-pick r249154. rdar://problem/54775050
+
+ 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.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249154 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 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-27 Alan Coon <[email protected]>
Revert r249140. rdar://problem/54749102
Modified: branches/safari-608-branch/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp (249237 => 249238)
--- branches/safari-608-branch/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp 2019-08-29 03:14:24 UTC (rev 249237)
+++ branches/safari-608-branch/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp 2019-08-29 05:57:06 UTC (rev 249238)
@@ -154,7 +154,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: branches/safari-608-branch/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp (249237 => 249238)
--- branches/safari-608-branch/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp 2019-08-29 03:14:24 UTC (rev 249237)
+++ branches/safari-608-branch/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp 2019-08-29 05:57:06 UTC (rev 249238)
@@ -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