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

Side by Side Diff: webrtc/api/statscollector_unittest.cc

Issue 2431443003: Add a placeholder stat for logging the estimated residual echo likelihood. (Closed)
Patch Set: Fredrik's comments. Created 4 years, 2 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 | « webrtc/api/statscollector.cc ('k') | webrtc/api/statstypes.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 /* 1 /*
2 * Copyright 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2014 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 value_in_report); 395 value_in_report);
396 EXPECT_TRUE(GetValue( 396 EXPECT_TRUE(GetValue(
397 report, StatsReport::kStatsValueNameEchoReturnLoss, &value_in_report)); 397 report, StatsReport::kStatsValueNameEchoReturnLoss, &value_in_report));
398 EXPECT_EQ(rtc::ToString<int>(sinfo.echo_return_loss), 398 EXPECT_EQ(rtc::ToString<int>(sinfo.echo_return_loss),
399 value_in_report); 399 value_in_report);
400 EXPECT_TRUE(GetValue( 400 EXPECT_TRUE(GetValue(
401 report, StatsReport::kStatsValueNameEchoReturnLossEnhancement, 401 report, StatsReport::kStatsValueNameEchoReturnLossEnhancement,
402 &value_in_report)); 402 &value_in_report));
403 EXPECT_EQ(rtc::ToString<int>(sinfo.echo_return_loss_enhancement), 403 EXPECT_EQ(rtc::ToString<int>(sinfo.echo_return_loss_enhancement),
404 value_in_report); 404 value_in_report);
405 EXPECT_TRUE(GetValue( 405 EXPECT_TRUE(GetValue(report,
406 report, StatsReport::kStatsValueNameAudioInputLevel, &value_in_report)); 406 StatsReport::kStatsValueNameResidualEchoLikelihood,
407 &value_in_report));
408 EXPECT_EQ(rtc::ToString<float>(sinfo.residual_echo_likelihood),
409 value_in_report);
410 EXPECT_TRUE(GetValue(report, StatsReport::kStatsValueNameAudioInputLevel,
411 &value_in_report));
407 EXPECT_EQ(rtc::ToString<int>(sinfo.audio_level), value_in_report); 412 EXPECT_EQ(rtc::ToString<int>(sinfo.audio_level), value_in_report);
408 EXPECT_TRUE(GetValue( 413 EXPECT_TRUE(GetValue(
409 report, StatsReport::kStatsValueNameTypingNoiseState, &value_in_report)); 414 report, StatsReport::kStatsValueNameTypingNoiseState, &value_in_report));
410 std::string typing_detected = sinfo.typing_noise_detected ? "true" : "false"; 415 std::string typing_detected = sinfo.typing_noise_detected ? "true" : "false";
411 EXPECT_EQ(typing_detected, value_in_report); 416 EXPECT_EQ(typing_detected, value_in_report);
412 } 417 }
413 418
414 // Helper methods to avoid duplication of code. 419 // Helper methods to avoid duplication of code.
415 void InitVoiceSenderInfo(cricket::VoiceSenderInfo* voice_sender_info) { 420 void InitVoiceSenderInfo(cricket::VoiceSenderInfo* voice_sender_info) {
416 voice_sender_info->add_ssrc(kSsrcOfTrack); 421 voice_sender_info->add_ssrc(kSsrcOfTrack);
(...skipping 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after
1885 cricket::VoiceSenderInfo new_voice_sender_info; 1890 cricket::VoiceSenderInfo new_voice_sender_info;
1886 InitVoiceSenderInfo(&new_voice_sender_info); 1891 InitVoiceSenderInfo(&new_voice_sender_info);
1887 cricket::VoiceMediaInfo new_stats_read; 1892 cricket::VoiceMediaInfo new_stats_read;
1888 reports.clear(); 1893 reports.clear();
1889 SetupAndVerifyAudioTrackStats( 1894 SetupAndVerifyAudioTrackStats(
1890 new_audio_track.get(), stream_.get(), &stats, &voice_channel, kVcName, 1895 new_audio_track.get(), stream_.get(), &stats, &voice_channel, kVcName,
1891 media_channel, &new_voice_sender_info, NULL, &new_stats_read, &reports); 1896 media_channel, &new_voice_sender_info, NULL, &new_stats_read, &reports);
1892 } 1897 }
1893 1898
1894 } // namespace webrtc 1899 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/statscollector.cc ('k') | webrtc/api/statstypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698