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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 // Expectations when the second packet is inserted. Slightly different. | 319 // Expectations when the second packet is inserted. Slightly different. |
320 EXPECT_CALL(*mock_delay_manager_, | 320 EXPECT_CALL(*mock_delay_manager_, |
321 LastDecoderType(NetEqDecoder::kDecoderPCMu)) | 321 LastDecoderType(NetEqDecoder::kDecoderPCMu)) |
322 .Times(1); | 322 .Times(1); |
323 EXPECT_CALL(*mock_delay_manager_, last_pack_cng_or_dtmf()) | 323 EXPECT_CALL(*mock_delay_manager_, last_pack_cng_or_dtmf()) |
324 .WillOnce(Return(0)); | 324 .WillOnce(Return(0)); |
325 EXPECT_CALL(*mock_delay_manager_, SetPacketAudioLength(30)) | 325 EXPECT_CALL(*mock_delay_manager_, SetPacketAudioLength(30)) |
326 .WillOnce(Return(0)); | 326 .WillOnce(Return(0)); |
327 } | 327 } |
328 | 328 |
329 // Expectations for payload splitter. | |
330 EXPECT_CALL(*mock_payload_splitter_, SplitFec(_, _)) | |
331 .Times(2) | |
332 .WillRepeatedly(Return(PayloadSplitter::kOK)); | |
333 | |
334 // Insert first packet. | 329 // Insert first packet. |
335 neteq_->InsertPacket(rtp_header, payload, kFirstReceiveTime); | 330 neteq_->InsertPacket(rtp_header, payload, kFirstReceiveTime); |
336 | 331 |
337 // Insert second packet. | 332 // Insert second packet. |
338 rtp_header.header.timestamp += 160; | 333 rtp_header.header.timestamp += 160; |
339 rtp_header.header.sequenceNumber += 1; | 334 rtp_header.header.sequenceNumber += 1; |
340 neteq_->InsertPacket(rtp_header, payload, kFirstReceiveTime + 155); | 335 neteq_->InsertPacket(rtp_header, payload, kFirstReceiveTime + 155); |
341 } | 336 } |
342 | 337 |
343 TEST_F(NetEqImplTest, InsertPacketsUntilBufferIsFull) { | 338 TEST_F(NetEqImplTest, InsertPacketsUntilBufferIsFull) { |
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1421 EXPECT_CALL(*mock_delay_manager_, BufferLimits(_, _)) | 1416 EXPECT_CALL(*mock_delay_manager_, BufferLimits(_, _)) |
1422 .Times(1) | 1417 .Times(1) |
1423 .WillOnce(DoAll(SetArgPointee<0>(1), SetArgPointee<1>(2))); | 1418 .WillOnce(DoAll(SetArgPointee<0>(1), SetArgPointee<1>(2))); |
1424 | 1419 |
1425 bool muted; | 1420 bool muted; |
1426 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output_, &muted)); | 1421 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output_, &muted)); |
1427 EXPECT_EQ(kAccelerate, neteq_->last_operation_for_test()); | 1422 EXPECT_EQ(kAccelerate, neteq_->last_operation_for_test()); |
1428 } | 1423 } |
1429 | 1424 |
1430 }// namespace webrtc | 1425 }// namespace webrtc |
OLD | NEW |