OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 EXPECT_CALL(*mock_decoder_database_, CheckPayloadTypes(_)) | 294 EXPECT_CALL(*mock_decoder_database_, CheckPayloadTypes(_)) |
295 .Times(2) | 295 .Times(2) |
296 .WillRepeatedly(Return(DecoderDatabase::kOK)); // Payload type is valid. | 296 .WillRepeatedly(Return(DecoderDatabase::kOK)); // Payload type is valid. |
297 EXPECT_CALL(*mock_decoder_database_, IsDtmf(kPayloadType)) | 297 EXPECT_CALL(*mock_decoder_database_, IsDtmf(kPayloadType)) |
298 .WillRepeatedly(Return(false)); // This is not DTMF. | 298 .WillRepeatedly(Return(false)); // This is not DTMF. |
299 EXPECT_CALL(*mock_decoder_database_, GetDecoder(kPayloadType)) | 299 EXPECT_CALL(*mock_decoder_database_, GetDecoder(kPayloadType)) |
300 .Times(3) | 300 .Times(3) |
301 .WillRepeatedly(Return(&mock_decoder)); | 301 .WillRepeatedly(Return(&mock_decoder)); |
302 EXPECT_CALL(*mock_decoder_database_, IsComfortNoise(kPayloadType)) | 302 EXPECT_CALL(*mock_decoder_database_, IsComfortNoise(kPayloadType)) |
303 .WillRepeatedly(Return(false)); // This is not CNG. | 303 .WillRepeatedly(Return(false)); // This is not CNG. |
304 DecoderDatabase::DecoderInfo info; | 304 DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderPCMu, "", 8000, |
305 info.codec_type = NetEqDecoder::kDecoderPCMu; | 305 nullptr); |
306 EXPECT_CALL(*mock_decoder_database_, GetDecoderInfo(kPayloadType)) | 306 EXPECT_CALL(*mock_decoder_database_, GetDecoderInfo(kPayloadType)) |
307 .WillRepeatedly(Return(&info)); | 307 .WillRepeatedly(Return(&info)); |
308 | 308 |
309 // Expectations for packet buffer. | 309 // Expectations for packet buffer. |
310 EXPECT_CALL(*mock_packet_buffer_, NumPacketsInBuffer()) | 310 EXPECT_CALL(*mock_packet_buffer_, NumPacketsInBuffer()) |
311 .WillOnce(Return(0)) // First packet. | 311 .WillOnce(Return(0)) // First packet. |
312 .WillOnce(Return(1)) // Second packet. | 312 .WillOnce(Return(1)) // Second packet. |
313 .WillOnce(Return(2)); // Second packet, checking after it was inserted. | 313 .WillOnce(Return(2)); // Second packet, checking after it was inserted. |
314 EXPECT_CALL(*mock_packet_buffer_, Empty()) | 314 EXPECT_CALL(*mock_packet_buffer_, Empty()) |
315 .WillOnce(Return(false)); // Called once after first packet is inserted. | 315 .WillOnce(Return(false)); // Called once after first packet is inserted. |
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1192 // Tests that the return value from last_output_sample_rate_hz() is equal to the | 1192 // Tests that the return value from last_output_sample_rate_hz() is equal to the |
1193 // configured inital sample rate. | 1193 // configured inital sample rate. |
1194 TEST_F(NetEqImplTest, InitialLastOutputSampleRate) { | 1194 TEST_F(NetEqImplTest, InitialLastOutputSampleRate) { |
1195 UseNoMocks(); | 1195 UseNoMocks(); |
1196 config_.sample_rate_hz = 48000; | 1196 config_.sample_rate_hz = 48000; |
1197 CreateInstance(); | 1197 CreateInstance(); |
1198 EXPECT_EQ(48000, neteq_->last_output_sample_rate_hz()); | 1198 EXPECT_EQ(48000, neteq_->last_output_sample_rate_hz()); |
1199 } | 1199 } |
1200 | 1200 |
1201 }// namespace webrtc | 1201 }// namespace webrtc |
OLD | NEW |