| 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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 // incoming packet is rejected. | 560 // incoming packet is rejected. |
| 561 TEST_F(NetEqImplTest, FirstPacketUnknown) { | 561 TEST_F(NetEqImplTest, FirstPacketUnknown) { |
| 562 UseNoMocks(); | 562 UseNoMocks(); |
| 563 CreateInstance(); | 563 CreateInstance(); |
| 564 | 564 |
| 565 const uint8_t kPayloadType = 17; // Just an arbitrary number. | 565 const uint8_t kPayloadType = 17; // Just an arbitrary number. |
| 566 const uint32_t kReceiveTime = 17; // Value doesn't matter for this test. | 566 const uint32_t kReceiveTime = 17; // Value doesn't matter for this test. |
| 567 const int kSampleRateHz = 8000; | 567 const int kSampleRateHz = 8000; |
| 568 const size_t kPayloadLengthSamples = | 568 const size_t kPayloadLengthSamples = |
| 569 static_cast<size_t>(10 * kSampleRateHz / 1000); // 10 ms. | 569 static_cast<size_t>(10 * kSampleRateHz / 1000); // 10 ms. |
| 570 const size_t kPayloadLengthBytes = kPayloadLengthSamples; | 570 const size_t kPayloadLengthBytes = kPayloadLengthSamples * 2; |
| 571 uint8_t payload[kPayloadLengthBytes] = {0}; | 571 uint8_t payload[kPayloadLengthBytes] = {0}; |
| 572 WebRtcRTPHeader rtp_header; | 572 WebRtcRTPHeader rtp_header; |
| 573 rtp_header.header.payloadType = kPayloadType; | 573 rtp_header.header.payloadType = kPayloadType; |
| 574 rtp_header.header.sequenceNumber = 0x1234; | 574 rtp_header.header.sequenceNumber = 0x1234; |
| 575 rtp_header.header.timestamp = 0x12345678; | 575 rtp_header.header.timestamp = 0x12345678; |
| 576 rtp_header.header.ssrc = 0x87654321; | 576 rtp_header.header.ssrc = 0x87654321; |
| 577 | 577 |
| 578 // Insert one packet. Note that we have not registered any payload type, so | 578 // Insert one packet. Note that we have not registered any payload type, so |
| 579 // this packet will be rejected. | 579 // this packet will be rejected. |
| 580 EXPECT_EQ(NetEq::kFail, | 580 EXPECT_EQ(NetEq::kFail, |
| (...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1416 EXPECT_CALL(*mock_delay_manager_, BufferLimits(_, _)) | 1416 EXPECT_CALL(*mock_delay_manager_, BufferLimits(_, _)) |
| 1417 .Times(1) | 1417 .Times(1) |
| 1418 .WillOnce(DoAll(SetArgPointee<0>(1), SetArgPointee<1>(2))); | 1418 .WillOnce(DoAll(SetArgPointee<0>(1), SetArgPointee<1>(2))); |
| 1419 | 1419 |
| 1420 bool muted; | 1420 bool muted; |
| 1421 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output_, &muted)); | 1421 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output_, &muted)); |
| 1422 EXPECT_EQ(kAccelerate, neteq_->last_operation_for_test()); | 1422 EXPECT_EQ(kAccelerate, neteq_->last_operation_for_test()); |
| 1423 } | 1423 } |
| 1424 | 1424 |
| 1425 }// namespace webrtc | 1425 }// namespace webrtc |
| OLD | NEW |