OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #include <algorithm> // max | 10 #include <algorithm> // max |
(...skipping 2262 matching lines...) Loading... |
2273 | 2273 |
2274 void InspectHeader(const RTPVideoHeaderVP9& vp9_header) override { | 2274 void InspectHeader(const RTPVideoHeaderVP9& vp9_header) override { |
2275 if (frames_sent_ > kNumFramesToSend) | 2275 if (frames_sent_ > kNumFramesToSend) |
2276 observation_complete_.Set(); | 2276 observation_complete_.Set(); |
2277 } | 2277 } |
2278 } test; | 2278 } test; |
2279 | 2279 |
2280 RunBaseTest(&test); | 2280 RunBaseTest(&test); |
2281 } | 2281 } |
2282 | 2282 |
2283 #if !defined(MEMORY_SANITIZER) | |
2284 // Fails under MemorySanitizer: | |
2285 // See https://code.google.com/p/webrtc/issues/detail?id=5402. | |
2286 TEST_F(VideoSendStreamTest, Vp9FlexModeRefCount) { | 2283 TEST_F(VideoSendStreamTest, Vp9FlexModeRefCount) { |
2287 class FlexibleMode : public Vp9HeaderObserver { | 2284 class FlexibleMode : public Vp9HeaderObserver { |
2288 void ModifyVideoConfigsHook( | 2285 void ModifyVideoConfigsHook( |
2289 VideoSendStream::Config* send_config, | 2286 VideoSendStream::Config* send_config, |
2290 std::vector<VideoReceiveStream::Config>* receive_configs, | 2287 std::vector<VideoReceiveStream::Config>* receive_configs, |
2291 VideoEncoderConfig* encoder_config) override { | 2288 VideoEncoderConfig* encoder_config) override { |
2292 encoder_config->content_type = VideoEncoderConfig::ContentType::kScreen; | 2289 encoder_config->content_type = VideoEncoderConfig::ContentType::kScreen; |
2293 vp9_settings_.flexibleMode = true; | 2290 vp9_settings_.flexibleMode = true; |
2294 vp9_settings_.numberOfTemporalLayers = 1; | 2291 vp9_settings_.numberOfTemporalLayers = 1; |
2295 vp9_settings_.numberOfSpatialLayers = 2; | 2292 vp9_settings_.numberOfSpatialLayers = 2; |
2296 } | 2293 } |
2297 | 2294 |
2298 void InspectHeader(const RTPVideoHeaderVP9& vp9_header) override { | 2295 void InspectHeader(const RTPVideoHeaderVP9& vp9_header) override { |
2299 EXPECT_TRUE(vp9_header.flexible_mode); | 2296 EXPECT_TRUE(vp9_header.flexible_mode); |
2300 EXPECT_EQ(kNoTl0PicIdx, vp9_header.tl0_pic_idx); | 2297 EXPECT_EQ(kNoTl0PicIdx, vp9_header.tl0_pic_idx); |
2301 if (vp9_header.inter_pic_predicted) { | 2298 if (vp9_header.inter_pic_predicted) { |
2302 EXPECT_GT(vp9_header.num_ref_pics, 0u); | 2299 EXPECT_GT(vp9_header.num_ref_pics, 0u); |
2303 observation_complete_.Set(); | 2300 observation_complete_.Set(); |
2304 } | 2301 } |
2305 } | 2302 } |
2306 } test; | 2303 } test; |
2307 | 2304 |
2308 RunBaseTest(&test); | 2305 RunBaseTest(&test); |
2309 } | 2306 } |
2310 #endif | |
2311 | 2307 |
2312 } // namespace webrtc | 2308 } // namespace webrtc |
OLD | NEW |