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

Side by Side Diff: content/renderer/media/webrtc_audio_capturer.cc

Issue 11359196: Associate audio streams with their source/destination RenderView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restored AudioDeviceFactory. Created new RendererAudioOutputDevice. Created 8 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 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/renderer/media/webrtc_audio_capturer.h" 5 #include "content/renderer/media/webrtc_audio_capturer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "content/renderer/media/audio_device_factory.h" 10 #include "content/renderer/media/audio_device_factory.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 base::AutoLock auto_lock(lock_); 88 base::AutoLock auto_lock(lock_);
89 for (SinkList::iterator it = sinks_.begin(); it != sinks_.end(); ++it) { 89 for (SinkList::iterator it = sinks_.begin(); it != sinks_.end(); ++it) {
90 if (sink == *it) { 90 if (sink == *it) {
91 sinks_.erase(it); 91 sinks_.erase(it);
92 break; 92 break;
93 } 93 }
94 } 94 }
95 } 95 }
96 96
97 void WebRtcAudioCapturer::SetCapturerSource( 97 void WebRtcAudioCapturer::SetCapturerSource(
98 media::AudioCapturerSource* source) { 98 const scoped_refptr<media::AudioCapturerSource>& source) {
99 DVLOG(1) << "SetCapturerSource()"; 99 DVLOG(1) << "SetCapturerSource()";
100 scoped_refptr<media::AudioCapturerSource> old_source; 100 scoped_refptr<media::AudioCapturerSource> old_source;
101 { 101 {
102 base::AutoLock auto_lock(lock_); 102 base::AutoLock auto_lock(lock_);
103 if (source_ == source) 103 if (source_ == source)
104 return; 104 return;
105 105
106 source_.swap(old_source); 106 source_.swap(old_source);
107 source_ = source; 107 source_ = source;
108 } 108 }
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 248
249 void WebRtcAudioCapturer::OnDeviceStarted(const std::string& device_id) { 249 void WebRtcAudioCapturer::OnDeviceStarted(const std::string& device_id) {
250 device_id_ = device_id; 250 device_id_ = device_id;
251 } 251 }
252 252
253 void WebRtcAudioCapturer::OnDeviceStopped() { 253 void WebRtcAudioCapturer::OnDeviceStopped() {
254 NOTIMPLEMENTED(); 254 NOTIMPLEMENTED();
255 } 255 }
256 256
257 } // namespace content 257 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698