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

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

Issue 293673004: Remove unused RenderIO() interface. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 7 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
« no previous file with comments | « content/renderer/media/webrtc_audio_renderer.cc ('k') | media/audio/audio_output_device.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 base::AutoLock auto_lock(thread_lock_); 281 base::AutoLock auto_lock(thread_lock_);
282 282
283 // Clear up the old data in the FIFO. 283 // Clear up the old data in the FIFO.
284 loopback_fifo_->Clear(); 284 loopback_fifo_->Clear();
285 285
286 if (!sink_params_.IsValid() || !playing_ || !volume_ || sink_started_) 286 if (!sink_params_.IsValid() || !playing_ || !volume_ || sink_started_)
287 return; 287 return;
288 288
289 DVLOG(1) << "WebRtcLocalAudioRenderer::MaybeStartSink() -- Starting sink_."; 289 DVLOG(1) << "WebRtcLocalAudioRenderer::MaybeStartSink() -- Starting sink_.";
290 sink_->InitializeUnifiedStream(sink_params_, this, session_id_); 290 sink_->InitializeWithSessionId(sink_params_, this, session_id_);
291 sink_->Start(); 291 sink_->Start();
292 sink_started_ = true; 292 sink_started_ = true;
293 UMA_HISTOGRAM_ENUMERATION("Media.LocalRendererSinkStates", 293 UMA_HISTOGRAM_ENUMERATION("Media.LocalRendererSinkStates",
294 kSinkStarted, kSinkStatesMax); 294 kSinkStarted, kSinkStatesMax);
295 } 295 }
296 296
297 void WebRtcLocalAudioRenderer::ReconfigureSink( 297 void WebRtcLocalAudioRenderer::ReconfigureSink(
298 const media::AudioParameters& params) { 298 const media::AudioParameters& params) {
299 DCHECK(message_loop_->BelongsToCurrentThread()); 299 DCHECK(message_loop_->BelongsToCurrentThread());
300 300
301 DVLOG(1) << "WebRtcLocalAudioRenderer::ReconfigureSink()"; 301 DVLOG(1) << "WebRtcLocalAudioRenderer::ReconfigureSink()";
302 302
303 if (!sink_) 303 if (!sink_)
304 return; // WebRtcLocalAudioRenderer has not yet been started. 304 return; // WebRtcLocalAudioRenderer has not yet been started.
305 305
306 // Stop |sink_| and re-create a new one to be initialized with different audio 306 // Stop |sink_| and re-create a new one to be initialized with different audio
307 // parameters. Then, invoke MaybeStartSink() to restart everything again. 307 // parameters. Then, invoke MaybeStartSink() to restart everything again.
308 if (sink_started_) { 308 if (sink_started_) {
309 sink_->Stop(); 309 sink_->Stop();
310 sink_started_ = false; 310 sink_started_ = false;
311 } 311 }
312 sink_ = AudioDeviceFactory::NewOutputDevice(source_render_view_id_, 312 sink_ = AudioDeviceFactory::NewOutputDevice(source_render_view_id_,
313 source_render_frame_id_); 313 source_render_frame_id_);
314 MaybeStartSink(); 314 MaybeStartSink();
315 } 315 }
316 316
317 } // namespace content 317 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc_audio_renderer.cc ('k') | media/audio/audio_output_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698