Title: [218768] trunk/Source/WebCore
- Revision
- 218768
- Author
- [email protected]
- Date
- 2017-06-23 15:10:27 -0700 (Fri, 23 Jun 2017)
Log Message
[MediaStream macOS] enumerateDevices should only return valid audio capture devices
https://bugs.webkit.org/show_bug.cgi?id=173790
<rdar://problem/32260334>
Reviewed by Youenn Fablet.
* platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
(WebCore::isValidCaptureDevice): A valid device has a name and is not an aggregate device
created by VPIO.
(WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (218767 => 218768)
--- trunk/Source/WebCore/ChangeLog 2017-06-23 22:08:52 UTC (rev 218767)
+++ trunk/Source/WebCore/ChangeLog 2017-06-23 22:10:27 UTC (rev 218768)
@@ -1,3 +1,16 @@
+2017-06-23 Eric Carlson <[email protected]>
+
+ [MediaStream macOS] enumerateDevices should only return valid audio capture devices
+ https://bugs.webkit.org/show_bug.cgi?id=173790
+ <rdar://problem/32260334>
+
+ Reviewed by Youenn Fablet.
+
+ * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
+ (WebCore::isValidCaptureDevice): A valid device has a name and is not an aggregate device
+ created by VPIO.
+ (WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):
+
2017-06-23 Jer Noble <[email protected]>
[WK2] Support -[WebAVPlayerController setMuted:]
Modified: trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp (218767 => 218768)
--- trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp 2017-06-23 22:08:52 UTC (rev 218767)
+++ trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp 2017-06-23 22:10:27 UTC (rev 218768)
@@ -59,6 +59,12 @@
return !err && dataSize;
}
+static bool isValidCaptureDevice(const CoreAudioCaptureDevice& device)
+{
+ // Ignore unnamed devices and aggregate devices created by VPIO.
+ return !device.label().isEmpty() && !device.label().startsWith("VPAUAggregateAudioDevice");
+}
+
Vector<CoreAudioCaptureDevice>& CoreAudioCaptureDeviceManager::coreAudioCaptureDevices()
{
static bool initialized;
@@ -113,10 +119,10 @@
continue;
auto device = CoreAudioCaptureDevice::create(deviceID);
- if (!device)
+ if (!device || !isValidCaptureDevice(device.value()))
continue;
+
m_coreAudioCaptureDevices.append(WTFMove(device.value()));
-
haveDeviceChanges = true;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes