OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 .WillRepeatedly(Return(0)); | 360 .WillRepeatedly(Return(0)); |
361 } | 361 } |
362 if (expected_video_streams >= 3) { | 362 if (expected_video_streams >= 3) { |
363 EXPECT_CALL(encoder_callback_, Encoded( | 363 EXPECT_CALL(encoder_callback_, Encoded( |
364 AllOf(Field(&EncodedImage::_frameType, frame_type), | 364 AllOf(Field(&EncodedImage::_frameType, frame_type), |
365 Field(&EncodedImage::_encodedWidth, kDefaultWidth), | 365 Field(&EncodedImage::_encodedWidth, kDefaultWidth), |
366 Field(&EncodedImage::_encodedHeight, kDefaultHeight)), _, _)) | 366 Field(&EncodedImage::_encodedHeight, kDefaultHeight)), _, _)) |
367 .Times(1) | 367 .Times(1) |
368 .WillRepeatedly(Return(0)); | 368 .WillRepeatedly(Return(0)); |
369 } | 369 } |
370 if (expected_video_streams < kNumberOfSimulcastStreams) { | |
371 EXPECT_CALL(encoder_callback_, Encoded( | |
372 AllOf(Field(&EncodedImage::_frameType, kSkipFrame), | |
373 Field(&EncodedImage::_length, 0)), _, _)) | |
374 .Times(kNumberOfSimulcastStreams - expected_video_streams) | |
375 .WillRepeatedly(Return(0)); | |
376 } | |
377 } | 370 } |
378 | 371 |
379 void VerifyTemporalIdxAndSyncForAllSpatialLayers( | 372 void VerifyTemporalIdxAndSyncForAllSpatialLayers( |
380 Vp8TestEncodedImageCallback* encoder_callback, | 373 Vp8TestEncodedImageCallback* encoder_callback, |
381 const int* expected_temporal_idx, | 374 const int* expected_temporal_idx, |
382 const bool* expected_layer_sync, | 375 const bool* expected_layer_sync, |
383 int num_spatial_layers) { | 376 int num_spatial_layers) { |
384 int picture_id = -1; | 377 int picture_id = -1; |
385 int temporal_layer = -1; | 378 int temporal_layer = -1; |
386 bool layer_sync = false; | 379 bool layer_sync = false; |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
997 rtc::scoped_ptr<VP8Decoder> decoder_; | 990 rtc::scoped_ptr<VP8Decoder> decoder_; |
998 MockDecodedImageCallback decoder_callback_; | 991 MockDecodedImageCallback decoder_callback_; |
999 VideoCodec settings_; | 992 VideoCodec settings_; |
1000 VideoFrame input_frame_; | 993 VideoFrame input_frame_; |
1001 }; | 994 }; |
1002 | 995 |
1003 } // namespace testing | 996 } // namespace testing |
1004 } // namespace webrtc | 997 } // namespace webrtc |
1005 | 998 |
1006 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_ | 999 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_ |
OLD | NEW |