| 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 rtp_header.header.timestamp = kFirstTimestamp; | 306 rtp_header.header.timestamp = kFirstTimestamp; |
| 307 rtp_header.header.ssrc = kSsrc; | 307 rtp_header.header.ssrc = kSsrc; |
| 308 Packet fake_packet; | 308 Packet fake_packet; |
| 309 fake_packet.payload_type = kPayloadType; | 309 fake_packet.payload_type = kPayloadType; |
| 310 fake_packet.sequence_number = kFirstSequenceNumber; | 310 fake_packet.sequence_number = kFirstSequenceNumber; |
| 311 fake_packet.timestamp = kFirstTimestamp; | 311 fake_packet.timestamp = kFirstTimestamp; |
| 312 | 312 |
| 313 rtc::scoped_refptr<MockAudioDecoderFactory> mock_decoder_factory( | 313 rtc::scoped_refptr<MockAudioDecoderFactory> mock_decoder_factory( |
| 314 new rtc::RefCountedObject<MockAudioDecoderFactory>); | 314 new rtc::RefCountedObject<MockAudioDecoderFactory>); |
| 315 EXPECT_CALL(*mock_decoder_factory, MakeAudioDecoderMock(_, _)) | 315 EXPECT_CALL(*mock_decoder_factory, MakeAudioDecoderMock(_, _)) |
| 316 .WillOnce(Invoke([kPayloadLength, kFirstSequenceNumber, kFirstTimestamp, | 316 .WillOnce(Invoke([&](const SdpAudioFormat& format, |
| 317 kFirstReceiveTime](const SdpAudioFormat& format, | 317 std::unique_ptr<AudioDecoder>* dec) { |
| 318 std::unique_ptr<AudioDecoder>* dec) { | |
| 319 EXPECT_EQ("pcmu", format.name); | 318 EXPECT_EQ("pcmu", format.name); |
| 320 | 319 |
| 321 std::unique_ptr<MockAudioDecoder> mock_decoder(new MockAudioDecoder); | 320 std::unique_ptr<MockAudioDecoder> mock_decoder(new MockAudioDecoder); |
| 322 EXPECT_CALL(*mock_decoder, Channels()).WillRepeatedly(Return(1)); | 321 EXPECT_CALL(*mock_decoder, Channels()).WillRepeatedly(Return(1)); |
| 323 EXPECT_CALL(*mock_decoder, SampleRateHz()).WillRepeatedly(Return(8000)); | 322 EXPECT_CALL(*mock_decoder, SampleRateHz()).WillRepeatedly(Return(8000)); |
| 324 // BWE update function called with first packet. | 323 // BWE update function called with first packet. |
| 325 EXPECT_CALL(*mock_decoder, | 324 EXPECT_CALL(*mock_decoder, |
| 326 IncomingPacket(_, kPayloadLength, kFirstSequenceNumber, | 325 IncomingPacket(_, kPayloadLength, kFirstSequenceNumber, |
| 327 kFirstTimestamp, kFirstReceiveTime)); | 326 kFirstTimestamp, kFirstReceiveTime)); |
| 328 // BWE update function called with second packet. | 327 // BWE update function called with second packet. |
| (...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1491 EXPECT_CALL(*mock_delay_manager_, BufferLimits(_, _)) | 1490 EXPECT_CALL(*mock_delay_manager_, BufferLimits(_, _)) |
| 1492 .Times(1) | 1491 .Times(1) |
| 1493 .WillOnce(DoAll(SetArgPointee<0>(1), SetArgPointee<1>(2))); | 1492 .WillOnce(DoAll(SetArgPointee<0>(1), SetArgPointee<1>(2))); |
| 1494 | 1493 |
| 1495 bool muted; | 1494 bool muted; |
| 1496 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output_, &muted)); | 1495 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output_, &muted)); |
| 1497 EXPECT_EQ(kAccelerate, neteq_->last_operation_for_test()); | 1496 EXPECT_EQ(kAccelerate, neteq_->last_operation_for_test()); |
| 1498 } | 1497 } |
| 1499 | 1498 |
| 1500 }// namespace webrtc | 1499 }// namespace webrtc |
| OLD | NEW |