| 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 4106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4117 EXPECT_TRUE(capturer.CaptureFrame()); | 4117 EXPECT_TRUE(capturer.CaptureFrame()); |
| 4118 | 4118 |
| 4119 std::vector<webrtc::VideoStream> video_streams = stream->GetVideoStreams(); | 4119 std::vector<webrtc::VideoStream> video_streams = stream->GetVideoStreams(); |
| 4120 ASSERT_EQ(expected_num_streams, video_streams.size()); | 4120 ASSERT_EQ(expected_num_streams, video_streams.size()); |
| 4121 | 4121 |
| 4122 std::vector<webrtc::VideoStream> expected_streams; | 4122 std::vector<webrtc::VideoStream> expected_streams; |
| 4123 if (conference_mode) { | 4123 if (conference_mode) { |
| 4124 expected_streams = GetSimulcastConfig( | 4124 expected_streams = GetSimulcastConfig( |
| 4125 num_configured_streams, capture_width, capture_height, 0, | 4125 num_configured_streams, capture_width, capture_height, 0, |
| 4126 kDefaultQpMax, kDefaultVideoMaxFramerate, screenshare); | 4126 kDefaultQpMax, kDefaultVideoMaxFramerate, screenshare); |
| 4127 if (screenshare) { |
| 4128 for (const webrtc::VideoStream& stream : expected_streams) { |
| 4129 // Never scale screen content. |
| 4130 EXPECT_EQ(stream.width, capture_width); |
| 4131 EXPECT_EQ(stream.height, capture_height); |
| 4132 } |
| 4133 } |
| 4127 } else { | 4134 } else { |
| 4128 webrtc::VideoStream stream; | 4135 webrtc::VideoStream stream; |
| 4129 stream.width = capture_width; | 4136 stream.width = capture_width; |
| 4130 stream.height = capture_height; | 4137 stream.height = capture_height; |
| 4131 stream.max_framerate = kDefaultVideoMaxFramerate; | 4138 stream.max_framerate = kDefaultVideoMaxFramerate; |
| 4132 stream.min_bitrate_bps = cricket::kMinVideoBitrateKbps * 1000; | 4139 stream.min_bitrate_bps = cricket::kMinVideoBitrateKbps * 1000; |
| 4133 int max_bitrate_kbps; | 4140 int max_bitrate_kbps; |
| 4134 if (capture_width * capture_height <= 320 * 240) { | 4141 if (capture_width * capture_height <= 320 * 240) { |
| 4135 max_bitrate_kbps = 600; | 4142 max_bitrate_kbps = 600; |
| 4136 } else if (capture_width * capture_height <= 640 * 480) { | 4143 } else if (capture_width * capture_height <= 640 * 480) { |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4255 } | 4262 } |
| 4256 | 4263 |
| 4257 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsForSimulcastScreenshare) { | 4264 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsForSimulcastScreenshare) { |
| 4258 webrtc::test::ScopedFieldTrials override_field_trials_( | 4265 webrtc::test::ScopedFieldTrials override_field_trials_( |
| 4259 "WebRTC-SimulcastScreenshare/Enabled/"); | 4266 "WebRTC-SimulcastScreenshare/Enabled/"); |
| 4260 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 2, true, | 4267 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 2, true, |
| 4261 true); | 4268 true); |
| 4262 } | 4269 } |
| 4263 | 4270 |
| 4264 } // namespace cricket | 4271 } // namespace cricket |
| OLD | NEW |