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

Side by Side Diff: content/browser/renderer_host/media/audio_input_device_manager.cc

Issue 140843007: Implement browser-side logging to WebRtc log (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/media/audio_input_device_manager.h" 5 #include "content/browser/renderer_host/media/audio_input_device_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/browser/renderer_host/media/media_stream_manager.h"
9 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
10 #include "content/public/common/media_stream_request.h" 11 #include "content/public/common/media_stream_request.h"
11 #include "media/audio/audio_device_name.h" 12 #include "media/audio/audio_device_name.h"
12 #include "media/audio/audio_input_ipc.h" 13 #include "media/audio/audio_input_ipc.h"
13 #include "media/audio/audio_manager_base.h" 14 #include "media/audio/audio_manager_base.h"
14 #include "media/audio/audio_parameters.h" 15 #include "media/audio/audio_parameters.h"
15 #include "media/base/channel_layout.h" 16 #include "media/base/channel_layout.h"
16 #include "media/base/scoped_histogram_timer.h" 17 #include "media/base/scoped_histogram_timer.h"
17 18
18 namespace content { 19 namespace content {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // AudioManager is guaranteed to outlive MediaStreamManager in 132 // AudioManager is guaranteed to outlive MediaStreamManager in
132 // BrowserMainloop. 133 // BrowserMainloop.
133 audio_manager_->GetAudioInputDeviceNames(&device_names); 134 audio_manager_->GetAudioInputDeviceNames(&device_names);
134 break; 135 break;
135 136
136 default: 137 default:
137 NOTREACHED(); 138 NOTREACHED();
138 break; 139 break;
139 } 140 }
140 141
142 MediaStreamManager::AddLogMessage(
perkj_chrome 2014/01/20 11:07:08 Why do we have to log here? Why not do it in Medi
vrk (LEFT CHROMIUM) 2014/01/22 02:25:42 Sure, I can do that. I originally put more logging
143 "AIDM::EODTT found the following devices:");
Henrik Grunell 2014/01/17 08:51:25 Same comments as in VideoCaptureManager for this a
vrk (LEFT CHROMIUM) 2014/01/22 02:25:42 Done.
141 scoped_ptr<StreamDeviceInfoArray> devices(new StreamDeviceInfoArray()); 144 scoped_ptr<StreamDeviceInfoArray> devices(new StreamDeviceInfoArray());
142 for (media::AudioDeviceNames::iterator it = device_names.begin(); 145 for (media::AudioDeviceNames::iterator it = device_names.begin();
143 it != device_names.end(); ++it) { 146 it != device_names.end(); ++it) {
144 // Add device information to device vector. 147 // Add device information to device vector.
145 devices->push_back(StreamDeviceInfo( 148 devices->push_back(StreamDeviceInfo(
146 stream_type, it->device_name, it->unique_id)); 149 stream_type, it->device_name, it->unique_id));
150 MediaStreamManager::AddLogMessage(it->device_name + "(" + it->unique_id);
147 } 151 }
148 152
149 // If the |use_fake_device_| flag is on, inject the fake device if there is 153 // If the |use_fake_device_| flag is on, inject the fake device if there is
150 // no available device on the OS. 154 // no available device on the OS.
151 if (use_fake_device_ && devices->empty()) { 155 if (use_fake_device_ && devices->empty()) {
152 devices->push_back(StreamDeviceInfo( 156 devices->push_back(StreamDeviceInfo(
153 stream_type, media::AudioManagerBase::kDefaultDeviceName, 157 stream_type, media::AudioManagerBase::kDefaultDeviceName,
154 media::AudioManagerBase::kDefaultDeviceId)); 158 media::AudioManagerBase::kDefaultDeviceId));
155 } 159 }
156 160
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 for (StreamDeviceList::iterator i(devices_.begin()); i != devices_.end(); 253 for (StreamDeviceList::iterator i(devices_.begin()); i != devices_.end();
250 ++i) { 254 ++i) {
251 if (i->session_id == session_id) 255 if (i->session_id == session_id)
252 return i; 256 return i;
253 } 257 }
254 258
255 return devices_.end(); 259 return devices_.end();
256 } 260 }
257 261
258 } // namespace content 262 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698