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

Unified Diff: content/renderer/media/webrtc_local_audio_track.cc

Issue 857093002: Set audio format before adding pepper sink to audio track. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/webrtc_local_audio_track.cc
diff --git a/content/renderer/media/webrtc_local_audio_track.cc b/content/renderer/media/webrtc_local_audio_track.cc
index 13aee2d50cd9af4b08edd0ebe9248d791b7ec879..63bdc39e7db5fffb6a39ad1af39e700f3194c416 100644
--- a/content/renderer/media/webrtc_local_audio_track.cc
+++ b/content/renderer/media/webrtc_local_audio_track.cc
@@ -40,6 +40,15 @@ WebRtcLocalAudioTrack::~WebRtcLocalAudioTrack() {
Stop();
}
+const media::AudioParameters WebRtcLocalAudioTrack::GetOutputFormat() const {
+ DCHECK(main_render_thread_checker_.CalledOnValidThread());
+ if (webaudio_source_.get()) {
DaleCurtis 2015/01/27 19:50:09 Is .get() necessary? I prefer ternary for this, bu
Anand Mistry (off Chromium) 2015/01/27 23:14:50 .get() appears to be the convention in this file,
+ return media::AudioParameters();
+ } else {
+ return capturer_->GetOutputFormat();
+ }
+}
+
void WebRtcLocalAudioTrack::Capture(const media::AudioBus& audio_bus,
base::TimeTicks estimated_capture_time,
bool force_report_nonzero_energy) {

Powered by Google App Engine
This is Rietveld 408576698