Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: webrtc/media/engine/webrtcvideoengine2_unittest.cc

Issue 2692343007: Screen content simulcast layers should not be downscaled. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/media/engine/simulcast.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webrtc/media/engine/simulcast.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698