OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 194 |
195 EXPECT_EQ(0u, callback.num_calls_); | 195 EXPECT_EQ(0u, callback.num_calls_); |
196 | 196 |
197 // Call GetStatistics, simulating a timed rtcp sender thread. | 197 // Call GetStatistics, simulating a timed rtcp sender thread. |
198 RtcpStatistics statistics; | 198 RtcpStatistics statistics; |
199 receive_statistics_->GetStatistician(kSsrc1) | 199 receive_statistics_->GetStatistician(kSsrc1) |
200 ->GetStatistics(&statistics, true); | 200 ->GetStatistics(&statistics, true); |
201 | 201 |
202 EXPECT_EQ(1u, callback.num_calls_); | 202 EXPECT_EQ(1u, callback.num_calls_); |
203 EXPECT_EQ(callback.ssrc_, kSsrc1); | 203 EXPECT_EQ(callback.ssrc_, kSsrc1); |
204 EXPECT_EQ(statistics.cumulative_lost, callback.stats_.cumulative_lost); | 204 EXPECT_EQ(statistics.packets_lost, callback.stats_.packets_lost); |
205 EXPECT_EQ(statistics.extended_max_sequence_number, | 205 EXPECT_EQ(statistics.extended_highest_sequence_number, |
206 callback.stats_.extended_max_sequence_number); | 206 callback.stats_.extended_highest_sequence_number); |
207 EXPECT_EQ(statistics.fraction_lost, callback.stats_.fraction_lost); | 207 EXPECT_EQ(statistics.fraction_lost, callback.stats_.fraction_lost); |
208 EXPECT_EQ(statistics.jitter, callback.stats_.jitter); | 208 EXPECT_EQ(statistics.jitter, callback.stats_.jitter); |
209 EXPECT_EQ(51, statistics.fraction_lost); | 209 EXPECT_EQ(51, statistics.fraction_lost); |
210 EXPECT_EQ(1u, statistics.cumulative_lost); | 210 EXPECT_EQ(1u, statistics.packets_lost); |
211 EXPECT_EQ(5u, statistics.extended_max_sequence_number); | 211 EXPECT_EQ(5u, statistics.extended_highest_sequence_number); |
212 EXPECT_EQ(4u, statistics.jitter); | 212 EXPECT_EQ(4u, statistics.jitter); |
213 | 213 |
214 receive_statistics_->RegisterRtcpStatisticsCallback(NULL); | 214 receive_statistics_->RegisterRtcpStatisticsCallback(NULL); |
215 | 215 |
216 // Add some more data. | 216 // Add some more data. |
217 header1_.sequenceNumber = 1; | 217 header1_.sequenceNumber = 1; |
218 clock_.AdvanceTimeMilliseconds(7); | 218 clock_.AdvanceTimeMilliseconds(7); |
219 header1_.timestamp += 3; | 219 header1_.timestamp += 3; |
220 receive_statistics_->IncomingPacket(header1_, kPacketSize1, false); | 220 receive_statistics_->IncomingPacket(header1_, kPacketSize1, false); |
221 header1_.sequenceNumber += 2; | 221 header1_.sequenceNumber += 2; |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 callback.Matches(1, kSsrc1, expected); | 373 callback.Matches(1, kSsrc1, expected); |
374 | 374 |
375 receive_statistics_->FecPacketReceived(header1_, | 375 receive_statistics_->FecPacketReceived(header1_, |
376 kPacketSize1 + kHeaderLength); | 376 kPacketSize1 + kHeaderLength); |
377 expected.fec.payload_bytes = kPacketSize1; | 377 expected.fec.payload_bytes = kPacketSize1; |
378 expected.fec.header_bytes = kHeaderLength; | 378 expected.fec.header_bytes = kHeaderLength; |
379 expected.fec.packets = 1; | 379 expected.fec.packets = 1; |
380 callback.Matches(2, kSsrc1, expected); | 380 callback.Matches(2, kSsrc1, expected); |
381 } | 381 } |
382 } // namespace webrtc | 382 } // namespace webrtc |
OLD | NEW |