OLD | NEW |
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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 stats.jitter_ms = 12; | 539 stats.jitter_ms = 12; |
540 stats.rtt_ms = 345; | 540 stats.rtt_ms = 345; |
541 stats.audio_level = 678; | 541 stats.audio_level = 678; |
542 stats.aec_quality_min = 9.01f; | 542 stats.aec_quality_min = 9.01f; |
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); |
| 550 stats.ana_statistics.channel_action_counter = rtc::Optional<uint32_t>(432); |
| 551 stats.ana_statistics.dtx_action_counter = rtc::Optional<uint32_t>(543); |
| 552 stats.ana_statistics.fec_action_counter = rtc::Optional<uint32_t>(654); |
| 553 stats.ana_statistics.frame_length_action_counter = |
| 554 rtc::Optional<uint32_t>(765); |
549 stats.typing_noise_detected = true; | 555 stats.typing_noise_detected = true; |
550 return stats; | 556 return stats; |
551 } | 557 } |
552 void SetAudioSendStreamStats() { | 558 void SetAudioSendStreamStats() { |
553 for (auto* s : call_.GetAudioSendStreams()) { | 559 for (auto* s : call_.GetAudioSendStreams()) { |
554 s->SetStats(GetAudioSendStreamStats()); | 560 s->SetStats(GetAudioSendStreamStats()); |
555 } | 561 } |
556 } | 562 } |
557 void VerifyVoiceSenderInfo(const cricket::VoiceSenderInfo& info, | 563 void VerifyVoiceSenderInfo(const cricket::VoiceSenderInfo& info, |
558 bool is_sending) { | 564 bool is_sending) { |
(...skipping 11 matching lines...) Expand all Loading... |
570 EXPECT_EQ(info.audio_level, stats.audio_level); | 576 EXPECT_EQ(info.audio_level, stats.audio_level); |
571 EXPECT_EQ(info.aec_quality_min, stats.aec_quality_min); | 577 EXPECT_EQ(info.aec_quality_min, stats.aec_quality_min); |
572 EXPECT_EQ(info.echo_delay_median_ms, stats.echo_delay_median_ms); | 578 EXPECT_EQ(info.echo_delay_median_ms, stats.echo_delay_median_ms); |
573 EXPECT_EQ(info.echo_delay_std_ms, stats.echo_delay_std_ms); | 579 EXPECT_EQ(info.echo_delay_std_ms, stats.echo_delay_std_ms); |
574 EXPECT_EQ(info.echo_return_loss, stats.echo_return_loss); | 580 EXPECT_EQ(info.echo_return_loss, stats.echo_return_loss); |
575 EXPECT_EQ(info.echo_return_loss_enhancement, | 581 EXPECT_EQ(info.echo_return_loss_enhancement, |
576 stats.echo_return_loss_enhancement); | 582 stats.echo_return_loss_enhancement); |
577 EXPECT_EQ(info.residual_echo_likelihood, stats.residual_echo_likelihood); | 583 EXPECT_EQ(info.residual_echo_likelihood, stats.residual_echo_likelihood); |
578 EXPECT_EQ(info.residual_echo_likelihood_recent_max, | 584 EXPECT_EQ(info.residual_echo_likelihood_recent_max, |
579 stats.residual_echo_likelihood_recent_max); | 585 stats.residual_echo_likelihood_recent_max); |
| 586 EXPECT_EQ(info.ana_statistics.bitrate_action_counter, |
| 587 stats.ana_statistics.bitrate_action_counter); |
| 588 EXPECT_EQ(info.ana_statistics.channel_action_counter, |
| 589 stats.ana_statistics.channel_action_counter); |
| 590 EXPECT_EQ(info.ana_statistics.dtx_action_counter, |
| 591 stats.ana_statistics.dtx_action_counter); |
| 592 EXPECT_EQ(info.ana_statistics.fec_action_counter, |
| 593 stats.ana_statistics.fec_action_counter); |
| 594 EXPECT_EQ(info.ana_statistics.frame_length_action_counter, |
| 595 stats.ana_statistics.frame_length_action_counter); |
580 EXPECT_EQ(info.typing_noise_detected, | 596 EXPECT_EQ(info.typing_noise_detected, |
581 stats.typing_noise_detected && is_sending); | 597 stats.typing_noise_detected && is_sending); |
582 } | 598 } |
583 | 599 |
584 webrtc::AudioReceiveStream::Stats GetAudioReceiveStreamStats() const { | 600 webrtc::AudioReceiveStream::Stats GetAudioReceiveStreamStats() const { |
585 webrtc::AudioReceiveStream::Stats stats; | 601 webrtc::AudioReceiveStream::Stats stats; |
586 stats.remote_ssrc = 123; | 602 stats.remote_ssrc = 123; |
587 stats.bytes_rcvd = 456; | 603 stats.bytes_rcvd = 456; |
588 stats.packets_rcvd = 768; | 604 stats.packets_rcvd = 768; |
589 stats.packets_lost = 101; | 605 stats.packets_lost = 101; |
(...skipping 2914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3504 // Without this cast, the comparison turned unsigned and, thus, failed for -1. | 3520 // Without this cast, the comparison turned unsigned and, thus, failed for -1. |
3505 const int num_specs = static_cast<int>(specs.size()); | 3521 const int num_specs = static_cast<int>(specs.size()); |
3506 EXPECT_GE(find_codec({"cn", 8000, 1}), num_specs); | 3522 EXPECT_GE(find_codec({"cn", 8000, 1}), num_specs); |
3507 EXPECT_GE(find_codec({"cn", 16000, 1}), num_specs); | 3523 EXPECT_GE(find_codec({"cn", 16000, 1}), num_specs); |
3508 EXPECT_EQ(find_codec({"cn", 32000, 1}), -1); | 3524 EXPECT_EQ(find_codec({"cn", 32000, 1}), -1); |
3509 EXPECT_GE(find_codec({"telephone-event", 8000, 1}), num_specs); | 3525 EXPECT_GE(find_codec({"telephone-event", 8000, 1}), num_specs); |
3510 EXPECT_GE(find_codec({"telephone-event", 16000, 1}), num_specs); | 3526 EXPECT_GE(find_codec({"telephone-event", 16000, 1}), num_specs); |
3511 EXPECT_GE(find_codec({"telephone-event", 32000, 1}), num_specs); | 3527 EXPECT_GE(find_codec({"telephone-event", 32000, 1}), num_specs); |
3512 EXPECT_GE(find_codec({"telephone-event", 48000, 1}), num_specs); | 3528 EXPECT_GE(find_codec({"telephone-event", 48000, 1}), num_specs); |
3513 } | 3529 } |
OLD | NEW |