Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Unified Diff: content/browser/renderer_host/media/media_stream_manager.cc

Issue 1532093005: Disable enumeration caching for output devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/media/audio_renderer_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/media_stream_manager.cc
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc
index 7e9796a579c7f68c227a5821aa0e60da9385f3b8..ce749e3229df7c693bb875245aec37bc9c632eda 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -230,8 +230,6 @@ bool CalledOnIOThread() {
!BrowserThread::IsMessageLoopValid(BrowserThread::IO);
}
-void DummyEnumerationCallback(const AudioOutputDeviceEnumeration& e) {}
-
} // namespace
@@ -962,13 +960,6 @@ void MediaStreamManager::StartMonitoring() {
monitoring_started_ = true;
base::SystemMonitor::Get()->AddDevicesChangedObserver(this);
- // Enable caching for audio output device enumerations and do an enumeration
- // to populate the cache.
- audio_output_device_enumerator_->SetCachePolicy(
- AudioOutputDeviceEnumerator::CACHE_POLICY_MANUAL_INVALIDATION);
- audio_output_device_enumerator_->Enumerate(
- base::Bind(&DummyEnumerationCallback));
-
// Enumerate both the audio and video input devices to cache the device lists
// and send them to media observer.
++active_enumeration_ref_count_[MEDIA_DEVICE_AUDIO_CAPTURE];
@@ -2070,7 +2061,6 @@ void MediaStreamManager::OnDevicesChanged(
MediaStreamType stream_type;
if (device_type == base::SystemMonitor::DEVTYPE_AUDIO_CAPTURE) {
stream_type = MEDIA_DEVICE_AUDIO_CAPTURE;
- audio_output_device_enumerator_->InvalidateCache();
} else if (device_type == base::SystemMonitor::DEVTYPE_VIDEO_CAPTURE) {
stream_type = MEDIA_DEVICE_VIDEO_CAPTURE;
} else {
« no previous file with comments | « content/browser/renderer_host/media/audio_renderer_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698