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 10 matching lines...) Expand all Loading... |
21 | 21 |
22 class SendStatisticsProxyTest : public ::testing::Test { | 22 class SendStatisticsProxyTest : public ::testing::Test { |
23 public: | 23 public: |
24 SendStatisticsProxyTest() | 24 SendStatisticsProxyTest() |
25 : fake_clock_(1234), config_(GetTestConfig()), avg_delay_ms_(0), | 25 : fake_clock_(1234), config_(GetTestConfig()), avg_delay_ms_(0), |
26 max_delay_ms_(0) {} | 26 max_delay_ms_(0) {} |
27 virtual ~SendStatisticsProxyTest() {} | 27 virtual ~SendStatisticsProxyTest() {} |
28 | 28 |
29 protected: | 29 protected: |
30 virtual void SetUp() { | 30 virtual void SetUp() { |
31 statistics_proxy_.reset( | 31 statistics_proxy_.reset(new SendStatisticsProxy( |
32 new SendStatisticsProxy(&fake_clock_, GetTestConfig())); | 32 &fake_clock_, GetTestConfig(), |
| 33 VideoEncoderConfig::ContentType::kRealtimeVideo)); |
33 expected_ = VideoSendStream::Stats(); | 34 expected_ = VideoSendStream::Stats(); |
34 } | 35 } |
35 | 36 |
36 VideoSendStream::Config GetTestConfig() { | 37 VideoSendStream::Config GetTestConfig() { |
37 VideoSendStream::Config config(nullptr); | 38 VideoSendStream::Config config(nullptr); |
38 config.rtp.ssrcs.push_back(17); | 39 config.rtp.ssrcs.push_back(17); |
39 config.rtp.ssrcs.push_back(42); | 40 config.rtp.ssrcs.push_back(42); |
40 config.rtp.rtx.ssrcs.push_back(18); | 41 config.rtp.rtx.ssrcs.push_back(18); |
41 config.rtp.rtx.ssrcs.push_back(43); | 42 config.rtp.rtx.ssrcs.push_back(43); |
42 return config; | 43 return config; |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 VideoSendStream::Stats stats = statistics_proxy_->GetStats(); | 397 VideoSendStream::Stats stats = statistics_proxy_->GetStats(); |
397 EXPECT_EQ(static_cast<int>(bitrate.bitrate_bps), | 398 EXPECT_EQ(static_cast<int>(bitrate.bitrate_bps), |
398 stats.substreams[config_.rtp.ssrcs[0]].total_bitrate_bps); | 399 stats.substreams[config_.rtp.ssrcs[0]].total_bitrate_bps); |
399 EXPECT_EQ(static_cast<int>(bitrate.bitrate_bps), | 400 EXPECT_EQ(static_cast<int>(bitrate.bitrate_bps), |
400 stats.substreams[config_.rtp.ssrcs[0]].retransmit_bitrate_bps); | 401 stats.substreams[config_.rtp.ssrcs[0]].retransmit_bitrate_bps); |
401 EXPECT_EQ(0, stats.substreams[config_.rtp.ssrcs[1]].total_bitrate_bps); | 402 EXPECT_EQ(0, stats.substreams[config_.rtp.ssrcs[1]].total_bitrate_bps); |
402 EXPECT_EQ(0, stats.substreams[config_.rtp.ssrcs[1]].retransmit_bitrate_bps); | 403 EXPECT_EQ(0, stats.substreams[config_.rtp.ssrcs[1]].retransmit_bitrate_bps); |
403 } | 404 } |
404 | 405 |
405 } // namespace webrtc | 406 } // namespace webrtc |
OLD | NEW |