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 3970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3981 EXPECT_TRUE(capturer.CaptureFrame()); | 3981 EXPECT_TRUE(capturer.CaptureFrame()); |
3982 | 3982 |
3983 std::vector<webrtc::VideoStream> video_streams = stream->GetVideoStreams(); | 3983 std::vector<webrtc::VideoStream> video_streams = stream->GetVideoStreams(); |
3984 ASSERT_EQ(expected_num_streams, video_streams.size()); | 3984 ASSERT_EQ(expected_num_streams, video_streams.size()); |
3985 | 3985 |
3986 std::vector<webrtc::VideoStream> expected_streams; | 3986 std::vector<webrtc::VideoStream> expected_streams; |
3987 if (conference_mode) { | 3987 if (conference_mode) { |
3988 expected_streams = GetSimulcastConfig( | 3988 expected_streams = GetSimulcastConfig( |
3989 num_configured_streams, capture_width, capture_height, 0, | 3989 num_configured_streams, capture_width, capture_height, 0, |
3990 kDefaultQpMax, kDefaultVideoMaxFramerate, screenshare); | 3990 kDefaultQpMax, kDefaultVideoMaxFramerate, screenshare); |
| 3991 if (screenshare) { |
| 3992 for (const webrtc::VideoStream& stream : expected_streams) { |
| 3993 // Never scale screen content. |
| 3994 EXPECT_EQ(stream.width, capture_width); |
| 3995 EXPECT_EQ(stream.height, capture_height); |
| 3996 } |
| 3997 } |
3991 } else { | 3998 } else { |
3992 webrtc::VideoStream stream; | 3999 webrtc::VideoStream stream; |
3993 stream.width = capture_width; | 4000 stream.width = capture_width; |
3994 stream.height = capture_height; | 4001 stream.height = capture_height; |
3995 stream.max_framerate = kDefaultVideoMaxFramerate; | 4002 stream.max_framerate = kDefaultVideoMaxFramerate; |
3996 stream.min_bitrate_bps = cricket::kMinVideoBitrateKbps * 1000; | 4003 stream.min_bitrate_bps = cricket::kMinVideoBitrateKbps * 1000; |
3997 int max_bitrate_kbps; | 4004 int max_bitrate_kbps; |
3998 if (capture_width * capture_height <= 320 * 240) { | 4005 if (capture_width * capture_height <= 320 * 240) { |
3999 max_bitrate_kbps = 600; | 4006 max_bitrate_kbps = 600; |
4000 } else if (capture_width * capture_height <= 640 * 480) { | 4007 } else if (capture_width * capture_height <= 640 * 480) { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4119 } | 4126 } |
4120 | 4127 |
4121 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsForSimulcastScreenshare) { | 4128 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsForSimulcastScreenshare) { |
4122 webrtc::test::ScopedFieldTrials override_field_trials_( | 4129 webrtc::test::ScopedFieldTrials override_field_trials_( |
4123 "WebRTC-SimulcastScreenshare/Enabled/"); | 4130 "WebRTC-SimulcastScreenshare/Enabled/"); |
4124 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 2, true, | 4131 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 2, true, |
4125 true); | 4132 true); |
4126 } | 4133 } |
4127 | 4134 |
4128 } // namespace cricket | 4135 } // namespace cricket |
OLD | NEW |