OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 sink_.WaitForEncodedFrame(1); | 1179 sink_.WaitForEncodedFrame(1); |
1180 | 1180 |
1181 vie_encoder_->Stop(); | 1181 vie_encoder_->Stop(); |
1182 } | 1182 } |
1183 | 1183 |
1184 TEST_F(ViEEncoderTest, InitialFrameDropOffWhenEncoderDisabledScaling) { | 1184 TEST_F(ViEEncoderTest, InitialFrameDropOffWhenEncoderDisabledScaling) { |
1185 int frame_width = 640; | 1185 int frame_width = 640; |
1186 int frame_height = 360; | 1186 int frame_height = 360; |
1187 fake_encoder_.SetQualityScaling(false); | 1187 fake_encoder_.SetQualityScaling(false); |
1188 vie_encoder_->OnBitrateUpdated(kLowTargetBitrateBps, 0, 0); | 1188 vie_encoder_->OnBitrateUpdated(kLowTargetBitrateBps, 0, 0); |
| 1189 // Force quality scaler reconfiguration by resetting the source. |
| 1190 vie_encoder_->SetSource(&video_source_, |
| 1191 VideoSendStream::DegradationPreference::kBalanced); |
1189 | 1192 |
1190 video_source_.IncomingCapturedFrame( | 1193 video_source_.IncomingCapturedFrame( |
1191 CreateFrame(1, frame_width, frame_height)); | 1194 CreateFrame(1, frame_width, frame_height)); |
1192 // Frame should not be dropped, even if it's too large. | 1195 // Frame should not be dropped, even if it's too large. |
1193 sink_.WaitForEncodedFrame(1); | 1196 sink_.WaitForEncodedFrame(1); |
1194 | 1197 |
1195 vie_encoder_->Stop(); | 1198 vie_encoder_->Stop(); |
1196 fake_encoder_.SetQualityScaling(true); | 1199 fake_encoder_.SetQualityScaling(true); |
1197 } | 1200 } |
1198 | 1201 |
(...skipping 19 matching lines...) Expand all Loading... |
1218 | 1221 |
1219 // Trigger CPU normal use, return to original resoluton; | 1222 // Trigger CPU normal use, return to original resoluton; |
1220 vie_encoder_->TriggerCpuNormalUsage(); | 1223 vie_encoder_->TriggerCpuNormalUsage(); |
1221 video_source_.IncomingCapturedFrame( | 1224 video_source_.IncomingCapturedFrame( |
1222 CreateFrame(3, kFrameWidth, kFrameHeight)); | 1225 CreateFrame(3, kFrameWidth, kFrameHeight)); |
1223 sink_.WaitForEncodedFrame(kFrameWidth, kFrameHeight); | 1226 sink_.WaitForEncodedFrame(kFrameWidth, kFrameHeight); |
1224 | 1227 |
1225 vie_encoder_->Stop(); | 1228 vie_encoder_->Stop(); |
1226 } | 1229 } |
1227 } // namespace webrtc | 1230 } // namespace webrtc |
OLD | NEW |