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

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

Issue 1487983002: Forward the number of skipped frames by the OS in audio playout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review fixes. Loads of files updated due to interface changes. Created 5 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
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_renderer.h" 5 #include "content/renderer/media/webrtc_audio_renderer.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/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 408
409 media::OutputDeviceStatus WebRtcAudioRenderer::GetDeviceStatus() { 409 media::OutputDeviceStatus WebRtcAudioRenderer::GetDeviceStatus() {
410 DCHECK(thread_checker_.CalledOnValidThread()); 410 DCHECK(thread_checker_.CalledOnValidThread());
411 if (!sink_.get()) 411 if (!sink_.get())
412 return media::OUTPUT_DEVICE_STATUS_ERROR_INTERNAL; 412 return media::OUTPUT_DEVICE_STATUS_ERROR_INTERNAL;
413 413
414 return sink_->GetDeviceStatus(); 414 return sink_->GetDeviceStatus();
415 } 415 }
416 416
417 int WebRtcAudioRenderer::Render(media::AudioBus* audio_bus, 417 int WebRtcAudioRenderer::Render(media::AudioBus* audio_bus,
418 int audio_delay_milliseconds) { 418 int audio_delay_milliseconds,
419 uint32_t frames_skipped) {
419 DCHECK(audio_renderer_thread_checker_.CalledOnValidThread()); 420 DCHECK(audio_renderer_thread_checker_.CalledOnValidThread());
420 base::AutoLock auto_lock(lock_); 421 base::AutoLock auto_lock(lock_);
421 if (!source_) 422 if (!source_)
422 return 0; 423 return 0;
423 424
424 DVLOG(2) << "WebRtcAudioRenderer::Render()"; 425 DVLOG(2) << "WebRtcAudioRenderer::Render()";
425 DVLOG(2) << "audio_delay_milliseconds: " << audio_delay_milliseconds; 426 DVLOG(2) << "audio_delay_milliseconds: " << audio_delay_milliseconds;
426 427
427 audio_delay_milliseconds_ = audio_delay_milliseconds; 428 audio_delay_milliseconds_ = audio_delay_milliseconds;
428 429
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 sink_params_ = sink_params; 636 sink_params_ = sink_params;
636 fifo_delay_milliseconds_ = fifo_delay_milliseconds; 637 fifo_delay_milliseconds_ = fifo_delay_milliseconds;
637 if (audio_fifo.get()) 638 if (audio_fifo.get())
638 audio_fifo_ = audio_fifo.Pass(); 639 audio_fifo_ = audio_fifo.Pass();
639 } 640 }
640 641
641 sink_->Initialize(sink_params, this); 642 sink_->Initialize(sink_params, this);
642 } 643 }
643 644
644 } // namespace content 645 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698