OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 stats->set_added_zero_samples(stats_raw.added_zero_samples); | 85 stats->set_added_zero_samples(stats_raw.added_zero_samples); |
86 stats->set_mean_waiting_time_ms(stats_raw.mean_waiting_time_ms); | 86 stats->set_mean_waiting_time_ms(stats_raw.mean_waiting_time_ms); |
87 stats->set_median_waiting_time_ms(stats_raw.median_waiting_time_ms); | 87 stats->set_median_waiting_time_ms(stats_raw.median_waiting_time_ms); |
88 stats->set_min_waiting_time_ms(stats_raw.min_waiting_time_ms); | 88 stats->set_min_waiting_time_ms(stats_raw.min_waiting_time_ms); |
89 stats->set_max_waiting_time_ms(stats_raw.max_waiting_time_ms); | 89 stats->set_max_waiting_time_ms(stats_raw.max_waiting_time_ms); |
90 } | 90 } |
91 | 91 |
92 void Convert(const webrtc::RtcpStatistics& stats_raw, | 92 void Convert(const webrtc::RtcpStatistics& stats_raw, |
93 webrtc::neteq_unittest::RtcpStatistics* stats) { | 93 webrtc::neteq_unittest::RtcpStatistics* stats) { |
94 stats->set_fraction_lost(stats_raw.fraction_lost); | 94 stats->set_fraction_lost(stats_raw.fraction_lost); |
95 stats->set_cumulative_lost(stats_raw.cumulative_lost); | 95 stats->set_cumulative_lost(stats_raw.packets_lost); |
96 stats->set_extended_max_sequence_number( | 96 stats->set_extended_max_sequence_number( |
97 stats_raw.extended_max_sequence_number); | 97 stats_raw.extended_highest_sequence_number); |
98 stats->set_jitter(stats_raw.jitter); | 98 stats->set_jitter(stats_raw.jitter); |
99 } | 99 } |
100 | 100 |
101 void AddMessage(FILE* file, rtc::MessageDigest* digest, | 101 void AddMessage(FILE* file, rtc::MessageDigest* digest, |
102 const std::string& message) { | 102 const std::string& message) { |
103 int32_t size = message.length(); | 103 int32_t size = message.length(); |
104 if (file) | 104 if (file) |
105 ASSERT_EQ(1u, fwrite(&size, sizeof(size), 1, file)); | 105 ASSERT_EQ(1u, fwrite(&size, sizeof(size), 1, file)); |
106 digest->Update(&size, sizeof(size)); | 106 digest->Update(&size, sizeof(size)); |
107 | 107 |
(...skipping 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1628 // Pull out data once. | 1628 // Pull out data once. |
1629 AudioFrame output; | 1629 AudioFrame output; |
1630 bool muted; | 1630 bool muted; |
1631 ASSERT_EQ(0, neteq_->GetAudio(&output, &muted)); | 1631 ASSERT_EQ(0, neteq_->GetAudio(&output, &muted)); |
1632 | 1632 |
1633 EXPECT_EQ(std::vector<uint32_t>({kRtpTimestamp1, kRtpTimestamp2}), | 1633 EXPECT_EQ(std::vector<uint32_t>({kRtpTimestamp1, kRtpTimestamp2}), |
1634 neteq_->LastDecodedTimestamps()); | 1634 neteq_->LastDecodedTimestamps()); |
1635 } | 1635 } |
1636 | 1636 |
1637 } // namespace webrtc | 1637 } // namespace webrtc |
OLD | NEW |