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 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 input_frame_.allocated_size(kUPlane)); | 603 input_frame_.allocated_size(kUPlane)); |
604 memset(input_frame_.buffer(kVPlane), 0, | 604 memset(input_frame_.buffer(kVPlane), 0, |
605 input_frame_.allocated_size(kVPlane)); | 605 input_frame_.allocated_size(kVPlane)); |
606 EXPECT_EQ(0, encoder_->Encode(input_frame_, NULL, &frame_types)); | 606 EXPECT_EQ(0, encoder_->Encode(input_frame_, NULL, &frame_types)); |
607 } | 607 } |
608 | 608 |
609 void TestSwitchingToOneStream() { SwitchingToOneStream(1024, 768); } | 609 void TestSwitchingToOneStream() { SwitchingToOneStream(1024, 768); } |
610 | 610 |
611 void TestSwitchingToOneOddStream() { SwitchingToOneStream(1023, 769); } | 611 void TestSwitchingToOneOddStream() { SwitchingToOneStream(1023, 769); } |
612 | 612 |
| 613 void TestSwitchingToOneSmallStream() { SwitchingToOneStream(4, 4); } |
| 614 |
613 void TestRPSIEncoder() { | 615 void TestRPSIEncoder() { |
614 Vp8TestEncodedImageCallback encoder_callback; | 616 Vp8TestEncodedImageCallback encoder_callback; |
615 encoder_->RegisterEncodeCompleteCallback(&encoder_callback); | 617 encoder_->RegisterEncodeCompleteCallback(&encoder_callback); |
616 | 618 |
617 encoder_->SetRates(kMaxBitrates[2], 30); // To get all three streams. | 619 encoder_->SetRates(kMaxBitrates[2], 30); // To get all three streams. |
618 | 620 |
619 EXPECT_EQ(0, encoder_->Encode(input_frame_, NULL, NULL)); | 621 EXPECT_EQ(0, encoder_->Encode(input_frame_, NULL, NULL)); |
620 int picture_id = -1; | 622 int picture_id = -1; |
621 int temporal_layer = -1; | 623 int temporal_layer = -1; |
622 bool layer_sync = false; | 624 bool layer_sync = false; |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
947 rtc::scoped_ptr<VP8Decoder> decoder_; | 949 rtc::scoped_ptr<VP8Decoder> decoder_; |
948 MockDecodedImageCallback decoder_callback_; | 950 MockDecodedImageCallback decoder_callback_; |
949 VideoCodec settings_; | 951 VideoCodec settings_; |
950 VideoFrame input_frame_; | 952 VideoFrame input_frame_; |
951 }; | 953 }; |
952 | 954 |
953 } // namespace testing | 955 } // namespace testing |
954 } // namespace webrtc | 956 } // namespace webrtc |
955 | 957 |
956 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_ | 958 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_ |
OLD | NEW |