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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 .WillOnce(Return(17U)); | 91 .WillOnce(Return(17U)); |
92 EXPECT_EQ(17U, red_->Num10MsFramesInNextPacket()); | 92 EXPECT_EQ(17U, red_->Num10MsFramesInNextPacket()); |
93 } | 93 } |
94 | 94 |
95 TEST_F(AudioEncoderCopyRedTest, CheckMaxFrameSizePropagation) { | 95 TEST_F(AudioEncoderCopyRedTest, CheckMaxFrameSizePropagation) { |
96 EXPECT_CALL(*mock_encoder_, Max10MsFramesInAPacket()).WillOnce(Return(17U)); | 96 EXPECT_CALL(*mock_encoder_, Max10MsFramesInAPacket()).WillOnce(Return(17U)); |
97 EXPECT_EQ(17U, red_->Max10MsFramesInAPacket()); | 97 EXPECT_EQ(17U, red_->Max10MsFramesInAPacket()); |
98 } | 98 } |
99 | 99 |
100 TEST_F(AudioEncoderCopyRedTest, CheckTargetAudioBitratePropagation) { | 100 TEST_F(AudioEncoderCopyRedTest, CheckTargetAudioBitratePropagation) { |
101 EXPECT_CALL(*mock_encoder_, OnReceivedTargetAudioBitrate(4711)); | 101 EXPECT_CALL(*mock_encoder_, |
102 red_->OnReceivedTargetAudioBitrate(4711); | 102 OnReceivedTargetAudioBitrate(4711, rtc::Optional<int64_t>())); |
| 103 red_->OnReceivedTargetAudioBitrate(4711, rtc::Optional<int64_t>()); |
103 } | 104 } |
104 | 105 |
105 TEST_F(AudioEncoderCopyRedTest, CheckPacketLossFractionPropagation) { | 106 TEST_F(AudioEncoderCopyRedTest, CheckPacketLossFractionPropagation) { |
106 EXPECT_CALL(*mock_encoder_, OnReceivedUplinkPacketLossFraction(0.5)); | 107 EXPECT_CALL(*mock_encoder_, OnReceivedUplinkPacketLossFraction(0.5)); |
107 red_->OnReceivedUplinkPacketLossFraction(0.5); | 108 red_->OnReceivedUplinkPacketLossFraction(0.5); |
108 } | 109 } |
109 | 110 |
110 // Checks that the an Encode() call is immediately propagated to the speech | 111 // Checks that the an Encode() call is immediately propagated to the speech |
111 // encoder. | 112 // encoder. |
112 TEST_F(AudioEncoderCopyRedTest, CheckImmediateEncode) { | 113 TEST_F(AudioEncoderCopyRedTest, CheckImmediateEncode) { |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 config.speech_encoder = NULL; | 298 config.speech_encoder = NULL; |
298 EXPECT_DEATH(red = new AudioEncoderCopyRed(std::move(config)), | 299 EXPECT_DEATH(red = new AudioEncoderCopyRed(std::move(config)), |
299 "Speech encoder not provided."); | 300 "Speech encoder not provided."); |
300 // The delete operation is needed to avoid leak reports from memcheck. | 301 // The delete operation is needed to avoid leak reports from memcheck. |
301 delete red; | 302 delete red; |
302 } | 303 } |
303 | 304 |
304 #endif // GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) | 305 #endif // GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) |
305 | 306 |
306 } // namespace webrtc | 307 } // namespace webrtc |
OLD | NEW |