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

Side by Side Diff: webrtc/audio/audio_send_stream.cc

Issue 2964593002: Adding stats that can be used to compute output audio levels. (Closed)
Patch Set: Remove unnecessary TODOs and address style feedback. Created 3 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 break; 272 break;
273 } 273 }
274 } 274 }
275 } 275 }
276 276
277 ScopedVoEInterface<VoEBase> base(voice_engine()); 277 ScopedVoEInterface<VoEBase> base(voice_engine());
278 RTC_DCHECK(base->transmit_mixer()); 278 RTC_DCHECK(base->transmit_mixer());
279 stats.audio_level = base->transmit_mixer()->AudioLevelFullRange(); 279 stats.audio_level = base->transmit_mixer()->AudioLevelFullRange();
280 RTC_DCHECK_LE(0, stats.audio_level); 280 RTC_DCHECK_LE(0, stats.audio_level);
281 281
282 // TODO(zstein): Consistent use of input/output in names.
Taylor Brandstetter 2017/07/06 17:57:56 Can this be fixed before this CL lands? I'd consis
Zach Stein 2017/07/06 18:07:34 Done.
283 stats.total_output_energy = base->transmit_mixer()->GetTotalInputEnergy();
284 stats.total_output_duration = base->transmit_mixer()->GetTotalInputDuration();
285
282 RTC_DCHECK(audio_state_->audio_processing()); 286 RTC_DCHECK(audio_state_->audio_processing());
283 auto audio_processing_stats = 287 auto audio_processing_stats =
284 audio_state_->audio_processing()->GetStatistics(); 288 audio_state_->audio_processing()->GetStatistics();
285 stats.echo_delay_median_ms = audio_processing_stats.delay_median; 289 stats.echo_delay_median_ms = audio_processing_stats.delay_median;
286 stats.echo_delay_std_ms = audio_processing_stats.delay_standard_deviation; 290 stats.echo_delay_std_ms = audio_processing_stats.delay_standard_deviation;
287 stats.echo_return_loss = audio_processing_stats.echo_return_loss.instant(); 291 stats.echo_return_loss = audio_processing_stats.echo_return_loss.instant();
288 stats.echo_return_loss_enhancement = 292 stats.echo_return_loss_enhancement =
289 audio_processing_stats.echo_return_loss_enhancement.instant(); 293 audio_processing_stats.echo_return_loss_enhancement.instant();
290 stats.residual_echo_likelihood = 294 stats.residual_echo_likelihood =
291 audio_processing_stats.residual_echo_likelihood; 295 audio_processing_stats.residual_echo_likelihood;
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 if (rtp_rtcp_module_->RegisterSendPayload(codec) != 0) { 611 if (rtp_rtcp_module_->RegisterSendPayload(codec) != 0) {
608 LOG(LS_ERROR) << "RegisterCngPayloadType() failed to register CN to " 612 LOG(LS_ERROR) << "RegisterCngPayloadType() failed to register CN to "
609 "RTP/RTCP module"; 613 "RTP/RTCP module";
610 } 614 }
611 } 615 }
612 } 616 }
613 617
614 618
615 } // namespace internal 619 } // namespace internal
616 } // namespace webrtc 620 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698