Changeset 251992 in webkit
- Timestamp:
- Nov 4, 2019 8:42:31 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r251991 r251992 1 2019-11-04 Eric Carlson <eric.carlson@apple.com> 2 3 enumerateDevices() doesn't return correct list of devices after device was changed by user in a system preferences 4 https://bugs.webkit.org/show_bug.cgi?id=203407 5 <rdar://problem/56648063> 6 7 Reviewed by Youenn Fablet. 8 9 Tested manually as this doesn't reproduce with mock capture devices. 10 11 * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp: 12 (WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices): Refresh the list of capture 13 devices when the default input device changes. 14 (WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices): Assert if not called 15 on the main thread. 16 1 17 2019-11-04 Andy Estes <aestes@apple.com> 2 18 -
trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp
r249154 r251992 37 37 #include <pal/spi/cf/CoreAudioSPI.h> 38 38 #include <wtf/Assertions.h> 39 #include <wtf/MainThread.h> 39 40 #include <wtf/NeverDestroyed.h> 40 41 … … 123 124 124 125 auto listener = ^(UInt32 count, const AudioObjectPropertyAddress properties[]) { 125 for (UInt32 i = 0; i < count; ++i) { 126 const AudioObjectPropertyAddress& property = properties[i]; 127 128 if (property.mSelector != kAudioHardwarePropertyDevices) 129 continue; 130 126 bool notify = false; 127 for (UInt32 i = 0; i < count; ++i) 128 notify |= (properties[i].mSelector == kAudioHardwarePropertyDevices || properties[i].mSelector == kAudioHardwarePropertyDefaultInputDevice); 129 130 if (notify) 131 131 CoreAudioCaptureDeviceManager::singleton().refreshAudioCaptureDevices(NotifyIfDevicesHaveChanged::Notify); 132 return;133 }134 132 }; 135 133 … … 159 157 void CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices(NotifyIfDevicesHaveChanged notify) 160 158 { 159 ASSERT(isMainThread()); 160 161 161 AudioObjectPropertyAddress address = { kAudioHardwarePropertyDevices, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster }; 162 162 UInt32 dataSize = 0;
Note: See TracChangeset
for help on using the changeset viewer.