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 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1131 CreateFrame(2, frame_width * 3 / 4, frame_height * 3 / 4)); | 1131 CreateFrame(2, frame_width * 3 / 4, frame_height * 3 / 4)); |
1132 | 1132 |
1133 // Expect to drop this frame, the wait should time out. | 1133 // Expect to drop this frame, the wait should time out. |
1134 sink_.ExpectDroppedFrame(); | 1134 sink_.ExpectDroppedFrame(); |
1135 | 1135 |
1136 EXPECT_LT(*video_source_.sink_wants().max_pixel_count, last_pixel_count); | 1136 EXPECT_LT(*video_source_.sink_wants().max_pixel_count, last_pixel_count); |
1137 | 1137 |
1138 vie_encoder_->Stop(); | 1138 vie_encoder_->Stop(); |
1139 } | 1139 } |
1140 | 1140 |
1141 TEST_F(ViEEncoderTest, NrOfDroppedFramesLimited) { | 1141 #if defined(MEMORY_SANITIZER) |
| 1142 // Fails under MemorySanitizer: See http://crbug.com/webrtc/7232 |
| 1143 #define MAYBE_NrOfDroppedFramesLimited DISABLED_NrOfDroppedFramesLimited |
| 1144 #else |
| 1145 #define MAYBE_NrOfDroppedFramesLimited NrOfDroppedFramesLimited |
| 1146 #endif |
| 1147 TEST_F(ViEEncoderTest, MAYBE_NrOfDroppedFramesLimited) { |
1142 // 1kbps. This can never be achieved. | 1148 // 1kbps. This can never be achieved. |
1143 vie_encoder_->OnBitrateUpdated(1000, 0, 0); | 1149 vie_encoder_->OnBitrateUpdated(1000, 0, 0); |
1144 int frame_width = 640; | 1150 int frame_width = 640; |
1145 int frame_height = 360; | 1151 int frame_height = 360; |
1146 | 1152 |
1147 // We expect the n initial frames to get dropped. | 1153 // We expect the n initial frames to get dropped. |
1148 int i; | 1154 int i; |
1149 for (i = 1; i <= kMaxInitialFramedrop; ++i) { | 1155 for (i = 1; i <= kMaxInitialFramedrop; ++i) { |
1150 video_source_.IncomingCapturedFrame( | 1156 video_source_.IncomingCapturedFrame( |
1151 CreateFrame(i, frame_width, frame_height)); | 1157 CreateFrame(i, frame_width, frame_height)); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1221 | 1227 |
1222 // Trigger CPU normal use, return to original resoluton; | 1228 // Trigger CPU normal use, return to original resoluton; |
1223 vie_encoder_->TriggerCpuNormalUsage(); | 1229 vie_encoder_->TriggerCpuNormalUsage(); |
1224 video_source_.IncomingCapturedFrame( | 1230 video_source_.IncomingCapturedFrame( |
1225 CreateFrame(3, kFrameWidth, kFrameHeight)); | 1231 CreateFrame(3, kFrameWidth, kFrameHeight)); |
1226 sink_.WaitForEncodedFrame(kFrameWidth, kFrameHeight); | 1232 sink_.WaitForEncodedFrame(kFrameWidth, kFrameHeight); |
1227 | 1233 |
1228 vie_encoder_->Stop(); | 1234 vie_encoder_->Stop(); |
1229 } | 1235 } |
1230 } // namespace webrtc | 1236 } // namespace webrtc |
OLD | NEW |