| 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 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1647 send_stream->GetEncoderConfig().Copy(); | 1647 send_stream->GetEncoderConfig().Copy(); |
| 1648 EXPECT_EQ(webrtc::VideoEncoderConfig::ContentType::kRealtimeVideo, | 1648 EXPECT_EQ(webrtc::VideoEncoderConfig::ContentType::kRealtimeVideo, |
| 1649 encoder_config.content_type); | 1649 encoder_config.content_type); |
| 1650 std::vector<webrtc::VideoStream> streams = send_stream->GetVideoStreams(); | 1650 std::vector<webrtc::VideoStream> streams = send_stream->GetVideoStreams(); |
| 1651 EXPECT_EQ(capture_format_hd.width, streams.front().width); | 1651 EXPECT_EQ(capture_format_hd.width, streams.front().width); |
| 1652 EXPECT_EQ(capture_format_hd.height, streams.front().height); | 1652 EXPECT_EQ(capture_format_hd.height, streams.front().height); |
| 1653 EXPECT_EQ(0, encoder_config.min_transmit_bitrate_bps) | 1653 EXPECT_EQ(0, encoder_config.min_transmit_bitrate_bps) |
| 1654 << "Non-screenshare shouldn't use min-transmit bitrate."; | 1654 << "Non-screenshare shouldn't use min-transmit bitrate."; |
| 1655 | 1655 |
| 1656 EXPECT_TRUE(channel_->SetVideoSend(last_ssrc_, true, nullptr, nullptr)); | 1656 EXPECT_TRUE(channel_->SetVideoSend(last_ssrc_, true, nullptr, nullptr)); |
| 1657 // Removing a capturer triggers a black frame to be sent. | 1657 EXPECT_EQ(1, send_stream->GetNumberOfSwappedFrames()); |
| 1658 EXPECT_EQ(2, send_stream->GetNumberOfSwappedFrames()); | |
| 1659 VideoOptions screencast_options; | 1658 VideoOptions screencast_options; |
| 1660 screencast_options.is_screencast = rtc::Optional<bool>(true); | 1659 screencast_options.is_screencast = rtc::Optional<bool>(true); |
| 1661 EXPECT_TRUE( | 1660 EXPECT_TRUE( |
| 1662 channel_->SetVideoSend(last_ssrc_, true, &screencast_options, &capturer)); | 1661 channel_->SetVideoSend(last_ssrc_, true, &screencast_options, &capturer)); |
| 1663 EXPECT_TRUE(capturer.CaptureFrame()); | 1662 EXPECT_TRUE(capturer.CaptureFrame()); |
| 1664 // Send stream not recreated after option change. | 1663 // Send stream not recreated after option change. |
| 1665 ASSERT_EQ(send_stream, fake_call_->GetVideoSendStreams().front()); | 1664 ASSERT_EQ(send_stream, fake_call_->GetVideoSendStreams().front()); |
| 1666 EXPECT_EQ(3, send_stream->GetNumberOfSwappedFrames()); | 1665 EXPECT_EQ(2, send_stream->GetNumberOfSwappedFrames()); |
| 1667 | 1666 |
| 1668 // Verify screencast settings. | 1667 // Verify screencast settings. |
| 1669 encoder_config = send_stream->GetEncoderConfig().Copy(); | 1668 encoder_config = send_stream->GetEncoderConfig().Copy(); |
| 1670 EXPECT_EQ(webrtc::VideoEncoderConfig::ContentType::kScreen, | 1669 EXPECT_EQ(webrtc::VideoEncoderConfig::ContentType::kScreen, |
| 1671 encoder_config.content_type); | 1670 encoder_config.content_type); |
| 1672 EXPECT_EQ(kScreenshareMinBitrateKbps * 1000, | 1671 EXPECT_EQ(kScreenshareMinBitrateKbps * 1000, |
| 1673 encoder_config.min_transmit_bitrate_bps); | 1672 encoder_config.min_transmit_bitrate_bps); |
| 1674 | 1673 |
| 1675 streams = send_stream->GetVideoStreams(); | 1674 streams = send_stream->GetVideoStreams(); |
| 1676 EXPECT_EQ(capture_format_hd.width, streams.front().width); | 1675 EXPECT_EQ(capture_format_hd.width, streams.front().width); |
| (...skipping 2381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4058 | 4057 |
| 4059 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWith3SimulcastStreams) { | 4058 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWith3SimulcastStreams) { |
| 4060 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 3); | 4059 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 3); |
| 4061 } | 4060 } |
| 4062 | 4061 |
| 4063 // Test that we normalize send codec format size in simulcast. | 4062 // Test that we normalize send codec format size in simulcast. |
| 4064 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { | 4063 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { |
| 4065 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 541, 271, 2, 2); | 4064 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 541, 271, 2, 2); |
| 4066 } | 4065 } |
| 4067 } // namespace cricket | 4066 } // namespace cricket |
| OLD | NEW |