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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
77 EXPECT_EQ(a.rtp_stats.retransmitted.packets, | 77 EXPECT_EQ(a.rtp_stats.retransmitted.packets, |
78 b.rtp_stats.retransmitted.packets); | 78 b.rtp_stats.retransmitted.packets); |
79 EXPECT_EQ(a.rtp_stats.fec.packets, b.rtp_stats.fec.packets); | 79 EXPECT_EQ(a.rtp_stats.fec.packets, b.rtp_stats.fec.packets); |
80 | 80 |
81 EXPECT_EQ(a.rtcp_stats.fraction_lost, b.rtcp_stats.fraction_lost); | 81 EXPECT_EQ(a.rtcp_stats.fraction_lost, b.rtcp_stats.fraction_lost); |
82 EXPECT_EQ(a.rtcp_stats.cumulative_lost, b.rtcp_stats.cumulative_lost); | 82 EXPECT_EQ(a.rtcp_stats.cumulative_lost, b.rtcp_stats.cumulative_lost); |
83 EXPECT_EQ(a.rtcp_stats.extended_max_sequence_number, | 83 EXPECT_EQ(a.rtcp_stats.extended_max_sequence_number, |
84 b.rtcp_stats.extended_max_sequence_number); | 84 b.rtcp_stats.extended_max_sequence_number); |
85 EXPECT_EQ(a.rtcp_stats.jitter, b.rtcp_stats.jitter); | 85 EXPECT_EQ(a.rtcp_stats.jitter, b.rtcp_stats.jitter); |
86 } | 86 } |
87 } | 87 } |
pbos-webrtc
2016/02/23 15:15:26
Can you add a test for the -= start_stats_ mechani
sprang
2016/02/23 16:42:10
Done.
Also fixed the bug it caught :/
| |
88 | 88 |
89 SimulatedClock fake_clock_; | |
89 rtc::scoped_ptr<SendStatisticsProxy> statistics_proxy_; | 90 rtc::scoped_ptr<SendStatisticsProxy> statistics_proxy_; |
90 SimulatedClock fake_clock_; | |
91 VideoSendStream::Config config_; | 91 VideoSendStream::Config config_; |
92 int avg_delay_ms_; | 92 int avg_delay_ms_; |
93 int max_delay_ms_; | 93 int max_delay_ms_; |
94 VideoSendStream::Stats expected_; | 94 VideoSendStream::Stats expected_; |
95 typedef std::map<uint32_t, VideoSendStream::StreamStats>::const_iterator | 95 typedef std::map<uint32_t, VideoSendStream::StreamStats>::const_iterator |
96 StreamIterator; | 96 StreamIterator; |
97 }; | 97 }; |
98 | 98 |
99 TEST_F(SendStatisticsProxyTest, RtcpStatistics) { | 99 TEST_F(SendStatisticsProxyTest, RtcpStatistics) { |
100 RtcpStatisticsCallback* callback = statistics_proxy_.get(); | 100 RtcpStatisticsCallback* callback = statistics_proxy_.get(); |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
428 VideoSendStream::Stats stats = statistics_proxy_->GetStats(); | 428 VideoSendStream::Stats stats = statistics_proxy_->GetStats(); |
429 EXPECT_EQ(static_cast<int>(bitrate.bitrate_bps), | 429 EXPECT_EQ(static_cast<int>(bitrate.bitrate_bps), |
430 stats.substreams[config_.rtp.ssrcs[0]].total_bitrate_bps); | 430 stats.substreams[config_.rtp.ssrcs[0]].total_bitrate_bps); |
431 EXPECT_EQ(static_cast<int>(bitrate.bitrate_bps), | 431 EXPECT_EQ(static_cast<int>(bitrate.bitrate_bps), |
432 stats.substreams[config_.rtp.ssrcs[0]].retransmit_bitrate_bps); | 432 stats.substreams[config_.rtp.ssrcs[0]].retransmit_bitrate_bps); |
433 EXPECT_EQ(0, stats.substreams[config_.rtp.ssrcs[1]].total_bitrate_bps); | 433 EXPECT_EQ(0, stats.substreams[config_.rtp.ssrcs[1]].total_bitrate_bps); |
434 EXPECT_EQ(0, stats.substreams[config_.rtp.ssrcs[1]].retransmit_bitrate_bps); | 434 EXPECT_EQ(0, stats.substreams[config_.rtp.ssrcs[1]].retransmit_bitrate_bps); |
435 } | 435 } |
436 | 436 |
437 } // namespace webrtc | 437 } // namespace webrtc |
OLD | NEW |