OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 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 3691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3702 stats2.media_bitrate_bps = 321; | 3702 stats2.media_bitrate_bps = 321; |
3703 stats2.substreams[13].total_bitrate_bps = 5; | 3703 stats2.substreams[13].total_bitrate_bps = 5; |
3704 stats2.substreams[13].retransmit_bitrate_bps = 6; | 3704 stats2.substreams[13].retransmit_bitrate_bps = 6; |
3705 stats2.substreams[21].total_bitrate_bps = 7; | 3705 stats2.substreams[21].total_bitrate_bps = 7; |
3706 stats2.substreams[21].retransmit_bitrate_bps = 8; | 3706 stats2.substreams[21].retransmit_bitrate_bps = 8; |
3707 stream2->SetStats(stats2); | 3707 stream2->SetStats(stats2); |
3708 | 3708 |
3709 cricket::VideoMediaInfo info; | 3709 cricket::VideoMediaInfo info; |
3710 ASSERT_TRUE(channel_->GetStats(&info)); | 3710 ASSERT_TRUE(channel_->GetStats(&info)); |
3711 ASSERT_EQ(2u, info.senders.size()); | 3711 ASSERT_EQ(2u, info.senders.size()); |
3712 BandwidthEstimationInfo bwe_info; | |
3713 channel_->FillBitrateInfo(&bwe_info); | |
3714 // Assuming stream and stream2 corresponds to senders[0] and [1] respectively | 3712 // Assuming stream and stream2 corresponds to senders[0] and [1] respectively |
3715 // is OK as std::maps are sorted and AddSendStream() gives increasing SSRCs. | 3713 // is OK as std::maps are sorted and AddSendStream() gives increasing SSRCs. |
3716 EXPECT_EQ(stats.media_bitrate_bps, info.senders[0].nominal_bitrate); | 3714 EXPECT_EQ(stats.media_bitrate_bps, info.senders[0].nominal_bitrate); |
3717 EXPECT_EQ(stats2.media_bitrate_bps, info.senders[1].nominal_bitrate); | 3715 EXPECT_EQ(stats2.media_bitrate_bps, info.senders[1].nominal_bitrate); |
3718 EXPECT_EQ(stats.target_media_bitrate_bps + stats2.target_media_bitrate_bps, | 3716 EXPECT_EQ(stats.target_media_bitrate_bps + stats2.target_media_bitrate_bps, |
3719 bwe_info.target_enc_bitrate); | 3717 info.bw_estimations[0].target_enc_bitrate); |
3720 EXPECT_EQ(stats.media_bitrate_bps + stats2.media_bitrate_bps, | 3718 EXPECT_EQ(stats.media_bitrate_bps + stats2.media_bitrate_bps, |
3721 bwe_info.actual_enc_bitrate); | 3719 info.bw_estimations[0].actual_enc_bitrate); |
3722 EXPECT_EQ(1 + 3 + 5 + 7, bwe_info.transmit_bitrate) | 3720 EXPECT_EQ(1 + 3 + 5 + 7, info.bw_estimations[0].transmit_bitrate) |
3723 << "Bandwidth stats should take all streams into account."; | 3721 << "Bandwidth stats should take all streams into account."; |
3724 EXPECT_EQ(2 + 4 + 6 + 8, bwe_info.retransmit_bitrate) | 3722 EXPECT_EQ(2 + 4 + 6 + 8, info.bw_estimations[0].retransmit_bitrate) |
3725 << "Bandwidth stats should take all streams into account."; | 3723 << "Bandwidth stats should take all streams into account."; |
3726 } | 3724 } |
3727 | 3725 |
3728 TEST_F(WebRtcVideoChannel2Test, DefaultReceiveStreamReconfiguresToUseRtx) { | 3726 TEST_F(WebRtcVideoChannel2Test, DefaultReceiveStreamReconfiguresToUseRtx) { |
3729 EXPECT_TRUE(channel_->SetSendParameters(send_parameters_)); | 3727 EXPECT_TRUE(channel_->SetSendParameters(send_parameters_)); |
3730 | 3728 |
3731 const std::vector<uint32_t> ssrcs = MAKE_VECTOR(kSsrcs1); | 3729 const std::vector<uint32_t> ssrcs = MAKE_VECTOR(kSsrcs1); |
3732 const std::vector<uint32_t> rtx_ssrcs = MAKE_VECTOR(kRtxSsrcs1); | 3730 const std::vector<uint32_t> rtx_ssrcs = MAKE_VECTOR(kRtxSsrcs1); |
3733 | 3731 |
3734 ASSERT_EQ(0u, fake_call_->GetVideoReceiveStreams().size()); | 3732 ASSERT_EQ(0u, fake_call_->GetVideoReceiveStreams().size()); |
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4626 | 4624 |
4627 TEST_F(WebRtcVideoChannel2SimulcastTest, | 4625 TEST_F(WebRtcVideoChannel2SimulcastTest, |
4628 NoSimulcastScreenshareWithoutConference) { | 4626 NoSimulcastScreenshareWithoutConference) { |
4629 webrtc::test::ScopedFieldTrials override_field_trials_( | 4627 webrtc::test::ScopedFieldTrials override_field_trials_( |
4630 "WebRTC-SimulcastScreenshare/Enabled/"); | 4628 "WebRTC-SimulcastScreenshare/Enabled/"); |
4631 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 1, true, | 4629 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 1, true, |
4632 false); | 4630 false); |
4633 } | 4631 } |
4634 | 4632 |
4635 } // namespace cricket | 4633 } // namespace cricket |
OLD | NEW |