Index: content/renderer/media/audio_device_factory.cc |
diff --git a/content/renderer/media/audio_device_factory.cc b/content/renderer/media/audio_device_factory.cc |
index 40d8455f5c402a2c1a02af593bd174ab333add57..ffe459c9f21c3e381e9c069b613fa65506fdb2e2 100644 |
--- a/content/renderer/media/audio_device_factory.cc |
+++ b/content/renderer/media/audio_device_factory.cc |
@@ -135,22 +135,16 @@ AudioDeviceFactory::NewAudioCapturerSource(int render_frame_id) { |
} |
// static |
-// TODO(http://crbug.com/587461): Find a better way to check if device exists |
-// and is authorized. |
media::OutputDeviceInfo AudioDeviceFactory::GetOutputDeviceInfo( |
int render_frame_id, |
int session_id, |
const std::string& device_id, |
const url::Origin& security_origin) { |
- scoped_refptr<media::AudioRendererSink> sink = NewFinalAudioRendererSink( |
+ RenderThreadImpl* render_thread = RenderThreadImpl::current(); |
+ DCHECK(render_thread) << "RenderThreadImpl is not instantiated, or " |
+ << "GetOutputDeviceInfo() is called on a wrong thread "; |
+ return render_thread->GetAudioRendererMixerManager()->GetOutputDeviceInfo( |
render_frame_id, session_id, device_id, security_origin); |
- |
- const media::OutputDeviceInfo& device_info = sink->GetOutputDeviceInfo(); |
- |
- // TODO(olka): Cache it and reuse, http://crbug.com/586161 |
- sink->Stop(); // Must be stopped. |
- |
- return device_info; |
} |
AudioDeviceFactory::AudioDeviceFactory() { |