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

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

Issue 2350693002: Remove device enumeration, caching and monitoring from MediaStreamManager. (Closed)
Patch Set: latest hta@ comments Created 4 years, 3 months 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
Index: content/browser/renderer_host/media/audio_input_renderer_host.cc
diff --git a/content/browser/renderer_host/media/audio_input_renderer_host.cc b/content/browser/renderer_host/media/audio_input_renderer_host.cc
index 155d734b035b925de7434627d4b297749635388d..9008596c5df5cf2f13da5cc7ad79c7e3c2fb35c0 100644
--- a/content/browser/renderer_host/media/audio_input_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_input_renderer_host.cc
@@ -7,6 +7,7 @@
#include <utility>
#include "base/bind.h"
+#include "base/command_line.h"
#include "base/files/file.h"
#include "base/memory/ref_counted.h"
#include "base/memory/shared_memory.h"
@@ -27,6 +28,7 @@
#include "content/public/browser/web_contents_media_capture_id.h"
#include "media/audio/audio_device_description.h"
#include "media/base/audio_bus.h"
+#include "media/base/media_switches.h"
namespace content {
@@ -367,9 +369,10 @@ void AudioInputRendererHost::DoCreateStream(
}
media::AudioParameters audio_params(config.params);
- if (media_stream_manager_->audio_input_device_manager()
- ->ShouldUseFakeDevice())
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kUseFakeDeviceForMediaStream)) {
audio_params.set_format(media::AudioParameters::AUDIO_FAKE);
+ }
// Check if we have the permission to open the device and which device to use.
MediaStreamType type = MEDIA_NO_SERVICE;

Powered by Google App Engine
This is Rietveld 408576698