| 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 212 |
| 213 TEST_F(AudioEncoderCngTest, CheckFrameSizePropagation) { | 213 TEST_F(AudioEncoderCngTest, CheckFrameSizePropagation) { |
| 214 CreateCng(MakeCngConfig()); | 214 CreateCng(MakeCngConfig()); |
| 215 EXPECT_CALL(*mock_encoder_, Num10MsFramesInNextPacket()) | 215 EXPECT_CALL(*mock_encoder_, Num10MsFramesInNextPacket()) |
| 216 .WillOnce(Return(17U)); | 216 .WillOnce(Return(17U)); |
| 217 EXPECT_EQ(17U, cng_->Num10MsFramesInNextPacket()); | 217 EXPECT_EQ(17U, cng_->Num10MsFramesInNextPacket()); |
| 218 } | 218 } |
| 219 | 219 |
| 220 TEST_F(AudioEncoderCngTest, CheckTargetAudioBitratePropagation) { | 220 TEST_F(AudioEncoderCngTest, CheckTargetAudioBitratePropagation) { |
| 221 CreateCng(MakeCngConfig()); | 221 CreateCng(MakeCngConfig()); |
| 222 EXPECT_CALL(*mock_encoder_, OnReceivedTargetAudioBitrate(4711)); | 222 EXPECT_CALL(*mock_encoder_, |
| 223 cng_->OnReceivedTargetAudioBitrate(4711); | 223 OnReceivedTargetAudioBitrate(4711, rtc::Optional<int64_t>())); |
| 224 cng_->OnReceivedTargetAudioBitrate(4711, rtc::Optional<int64_t>()); |
| 224 } | 225 } |
| 225 | 226 |
| 226 TEST_F(AudioEncoderCngTest, CheckPacketLossFractionPropagation) { | 227 TEST_F(AudioEncoderCngTest, CheckPacketLossFractionPropagation) { |
| 227 CreateCng(MakeCngConfig()); | 228 CreateCng(MakeCngConfig()); |
| 228 EXPECT_CALL(*mock_encoder_, OnReceivedUplinkPacketLossFraction(0.5)); | 229 EXPECT_CALL(*mock_encoder_, OnReceivedUplinkPacketLossFraction(0.5)); |
| 229 cng_->OnReceivedUplinkPacketLossFraction(0.5); | 230 cng_->OnReceivedUplinkPacketLossFraction(0.5); |
| 230 } | 231 } |
| 231 | 232 |
| 232 TEST_F(AudioEncoderCngTest, EncodeCallsVad) { | 233 TEST_F(AudioEncoderCngTest, EncodeCallsVad) { |
| 233 EXPECT_CALL(*mock_encoder_, Num10MsFramesInNextPacket()) | 234 EXPECT_CALL(*mock_encoder_, Num10MsFramesInNextPacket()) |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 .WillRepeatedly(Return(7U)); | 497 .WillRepeatedly(Return(7U)); |
| 497 for (int i = 0; i < 6; ++i) | 498 for (int i = 0; i < 6; ++i) |
| 498 Encode(); | 499 Encode(); |
| 499 EXPECT_DEATH(Encode(), | 500 EXPECT_DEATH(Encode(), |
| 500 "Frame size cannot be larger than 60 ms when using VAD/CNG."); | 501 "Frame size cannot be larger than 60 ms when using VAD/CNG."); |
| 501 } | 502 } |
| 502 | 503 |
| 503 #endif // GTEST_HAS_DEATH_TEST | 504 #endif // GTEST_HAS_DEATH_TEST |
| 504 | 505 |
| 505 } // namespace webrtc | 506 } // namespace webrtc |
| OLD | NEW |