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

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

Issue 12440027: Do not pass the string device_id via IPC message to create an audio input stream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed the nits. Created 7 years, 9 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/renderer/media/webrtc_local_audio_renderer.h" 5 #include "content/renderer/media/webrtc_local_audio_renderer.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 DVLOG(1) << "FIFO is full"; 78 DVLOG(1) << "FIFO is full";
79 } 79 }
80 } 80 }
81 } 81 }
82 82
83 void WebRtcLocalAudioRenderer::SetCaptureFormat( 83 void WebRtcLocalAudioRenderer::SetCaptureFormat(
84 const media::AudioParameters& params) { 84 const media::AudioParameters& params) {
85 NOTIMPLEMENTED() << "WebRtcLocalAudioRenderer::SetCaptureFormat()"; 85 NOTIMPLEMENTED() << "WebRtcLocalAudioRenderer::SetCaptureFormat()";
86 } 86 }
87 87
88 void WebRtcLocalAudioRenderer::OnCaptureDeviceStopped() {
89 DVLOG(1) << "WebRtcLocalAudioRenderer::OnCaptureDeviceStopped()";
90 DCHECK(thread_checker_.CalledOnValidThread());
91 {
92 base::AutoLock auto_lock(thread_lock_);
93 if (!sink_)
94 return;
95
96 if (loopback_fifo_)
97 loopback_fifo_->Clear();
98 }
99 }
100
101 // webrtc::ObserverInterface implementation 88 // webrtc::ObserverInterface implementation
102 void WebRtcLocalAudioRenderer::OnChanged() { 89 void WebRtcLocalAudioRenderer::OnChanged() {
103 DVLOG(1) << "WebRtcLocalAudioRenderer::OnChanged()"; 90 DVLOG(1) << "WebRtcLocalAudioRenderer::OnChanged()";
104 DCHECK(thread_checker_.CalledOnValidThread()); 91 DCHECK(thread_checker_.CalledOnValidThread());
105 base::AutoLock auto_lock(thread_lock_); 92 base::AutoLock auto_lock(thread_lock_);
106 track_is_enabled_ = audio_track_->enabled(); 93 track_is_enabled_ = audio_track_->enabled();
107 } 94 }
108 95
109 // WebRtcLocalAudioRenderer::WebRtcLocalAudioRenderer implementation. 96 // WebRtcLocalAudioRenderer::WebRtcLocalAudioRenderer implementation.
110 WebRtcLocalAudioRenderer::WebRtcLocalAudioRenderer( 97 WebRtcLocalAudioRenderer::WebRtcLocalAudioRenderer(
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 if (!sink_) 248 if (!sink_)
262 return base::TimeDelta(); 249 return base::TimeDelta();
263 return total_render_time(); 250 return total_render_time();
264 } 251 }
265 252
266 bool WebRtcLocalAudioRenderer::IsLocalRenderer() const { 253 bool WebRtcLocalAudioRenderer::IsLocalRenderer() const {
267 return true; 254 return true;
268 } 255 }
269 256
270 } // namespace content 257 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698