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

Side by Side Diff: webrtc/media/engine/webrtcvoiceengine_unittest.cc

Issue 3007243002: Add and modify a few ANA stats. (Closed)
Patch Set: Rebase. Created 3 years, 3 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) 2008 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2008 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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 stats.echo_delay_median_ms = 234; 543 stats.echo_delay_median_ms = 234;
544 stats.echo_delay_std_ms = 567; 544 stats.echo_delay_std_ms = 567;
545 stats.echo_return_loss = 890; 545 stats.echo_return_loss = 890;
546 stats.echo_return_loss_enhancement = 1234; 546 stats.echo_return_loss_enhancement = 1234;
547 stats.residual_echo_likelihood = 0.432f; 547 stats.residual_echo_likelihood = 0.432f;
548 stats.residual_echo_likelihood_recent_max = 0.6f; 548 stats.residual_echo_likelihood_recent_max = 0.6f;
549 stats.ana_statistics.bitrate_action_counter = rtc::Optional<uint32_t>(321); 549 stats.ana_statistics.bitrate_action_counter = rtc::Optional<uint32_t>(321);
550 stats.ana_statistics.channel_action_counter = rtc::Optional<uint32_t>(432); 550 stats.ana_statistics.channel_action_counter = rtc::Optional<uint32_t>(432);
551 stats.ana_statistics.dtx_action_counter = rtc::Optional<uint32_t>(543); 551 stats.ana_statistics.dtx_action_counter = rtc::Optional<uint32_t>(543);
552 stats.ana_statistics.fec_action_counter = rtc::Optional<uint32_t>(654); 552 stats.ana_statistics.fec_action_counter = rtc::Optional<uint32_t>(654);
553 stats.ana_statistics.frame_length_action_counter = 553 stats.ana_statistics.frame_length_increase_counter =
554 rtc::Optional<uint32_t>(765); 554 rtc::Optional<uint32_t>(765);
555 stats.ana_statistics.frame_length_decrease_counter =
556 rtc::Optional<uint32_t>(876);
557 stats.ana_statistics.uplink_packet_loss_fraction =
558 rtc::Optional<float>(987.0);
555 stats.typing_noise_detected = true; 559 stats.typing_noise_detected = true;
556 return stats; 560 return stats;
557 } 561 }
558 void SetAudioSendStreamStats() { 562 void SetAudioSendStreamStats() {
559 for (auto* s : call_.GetAudioSendStreams()) { 563 for (auto* s : call_.GetAudioSendStreams()) {
560 s->SetStats(GetAudioSendStreamStats()); 564 s->SetStats(GetAudioSendStreamStats());
561 } 565 }
562 } 566 }
563 void VerifyVoiceSenderInfo(const cricket::VoiceSenderInfo& info, 567 void VerifyVoiceSenderInfo(const cricket::VoiceSenderInfo& info,
564 bool is_sending) { 568 bool is_sending) {
(...skipping 19 matching lines...) Expand all
584 EXPECT_EQ(info.residual_echo_likelihood_recent_max, 588 EXPECT_EQ(info.residual_echo_likelihood_recent_max,
585 stats.residual_echo_likelihood_recent_max); 589 stats.residual_echo_likelihood_recent_max);
586 EXPECT_EQ(info.ana_statistics.bitrate_action_counter, 590 EXPECT_EQ(info.ana_statistics.bitrate_action_counter,
587 stats.ana_statistics.bitrate_action_counter); 591 stats.ana_statistics.bitrate_action_counter);
588 EXPECT_EQ(info.ana_statistics.channel_action_counter, 592 EXPECT_EQ(info.ana_statistics.channel_action_counter,
589 stats.ana_statistics.channel_action_counter); 593 stats.ana_statistics.channel_action_counter);
590 EXPECT_EQ(info.ana_statistics.dtx_action_counter, 594 EXPECT_EQ(info.ana_statistics.dtx_action_counter,
591 stats.ana_statistics.dtx_action_counter); 595 stats.ana_statistics.dtx_action_counter);
592 EXPECT_EQ(info.ana_statistics.fec_action_counter, 596 EXPECT_EQ(info.ana_statistics.fec_action_counter,
593 stats.ana_statistics.fec_action_counter); 597 stats.ana_statistics.fec_action_counter);
594 EXPECT_EQ(info.ana_statistics.frame_length_action_counter, 598 EXPECT_EQ(info.ana_statistics.frame_length_increase_counter,
595 stats.ana_statistics.frame_length_action_counter); 599 stats.ana_statistics.frame_length_increase_counter);
600 EXPECT_EQ(info.ana_statistics.frame_length_decrease_counter,
601 stats.ana_statistics.frame_length_decrease_counter);
602 EXPECT_EQ(info.ana_statistics.uplink_packet_loss_fraction,
603 stats.ana_statistics.uplink_packet_loss_fraction);
596 EXPECT_EQ(info.typing_noise_detected, 604 EXPECT_EQ(info.typing_noise_detected,
597 stats.typing_noise_detected && is_sending); 605 stats.typing_noise_detected && is_sending);
598 } 606 }
599 607
600 webrtc::AudioReceiveStream::Stats GetAudioReceiveStreamStats() const { 608 webrtc::AudioReceiveStream::Stats GetAudioReceiveStreamStats() const {
601 webrtc::AudioReceiveStream::Stats stats; 609 webrtc::AudioReceiveStream::Stats stats;
602 stats.remote_ssrc = 123; 610 stats.remote_ssrc = 123;
603 stats.bytes_rcvd = 456; 611 stats.bytes_rcvd = 456;
604 stats.packets_rcvd = 768; 612 stats.packets_rcvd = 768;
605 stats.packets_lost = 101; 613 stats.packets_lost = 101;
(...skipping 2914 matching lines...) Expand 10 before | Expand all | Expand 10 after
3520 // Without this cast, the comparison turned unsigned and, thus, failed for -1. 3528 // Without this cast, the comparison turned unsigned and, thus, failed for -1.
3521 const int num_specs = static_cast<int>(specs.size()); 3529 const int num_specs = static_cast<int>(specs.size());
3522 EXPECT_GE(find_codec({"cn", 8000, 1}), num_specs); 3530 EXPECT_GE(find_codec({"cn", 8000, 1}), num_specs);
3523 EXPECT_GE(find_codec({"cn", 16000, 1}), num_specs); 3531 EXPECT_GE(find_codec({"cn", 16000, 1}), num_specs);
3524 EXPECT_EQ(find_codec({"cn", 32000, 1}), -1); 3532 EXPECT_EQ(find_codec({"cn", 32000, 1}), -1);
3525 EXPECT_GE(find_codec({"telephone-event", 8000, 1}), num_specs); 3533 EXPECT_GE(find_codec({"telephone-event", 8000, 1}), num_specs);
3526 EXPECT_GE(find_codec({"telephone-event", 16000, 1}), num_specs); 3534 EXPECT_GE(find_codec({"telephone-event", 16000, 1}), num_specs);
3527 EXPECT_GE(find_codec({"telephone-event", 32000, 1}), num_specs); 3535 EXPECT_GE(find_codec({"telephone-event", 32000, 1}), num_specs);
3528 EXPECT_GE(find_codec({"telephone-event", 48000, 1}), num_specs); 3536 EXPECT_GE(find_codec({"telephone-event", 48000, 1}), num_specs);
3529 } 3537 }
OLDNEW
« no previous file with comments | « webrtc/api/statstypes.cc ('k') | webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698