Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc

Issue 2412883002: NetEq: Remove special case for Merge without Expand (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/modules/audio_coding/neteq/decision_logic_normal.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 // incoming packet is rejected. 602 // incoming packet is rejected.
603 TEST_F(NetEqImplTest, FirstPacketUnknown) { 603 TEST_F(NetEqImplTest, FirstPacketUnknown) {
604 UseNoMocks(); 604 UseNoMocks();
605 CreateInstance(); 605 CreateInstance();
606 606
607 const uint8_t kPayloadType = 17; // Just an arbitrary number. 607 const uint8_t kPayloadType = 17; // Just an arbitrary number.
608 const uint32_t kReceiveTime = 17; // Value doesn't matter for this test. 608 const uint32_t kReceiveTime = 17; // Value doesn't matter for this test.
609 const int kSampleRateHz = 8000; 609 const int kSampleRateHz = 8000;
610 const size_t kPayloadLengthSamples = 610 const size_t kPayloadLengthSamples =
611 static_cast<size_t>(10 * kSampleRateHz / 1000); // 10 ms. 611 static_cast<size_t>(10 * kSampleRateHz / 1000); // 10 ms.
612 const size_t kPayloadLengthBytes = kPayloadLengthSamples; 612 const size_t kPayloadLengthBytes = kPayloadLengthSamples * 2;
613 uint8_t payload[kPayloadLengthBytes] = {0}; 613 uint8_t payload[kPayloadLengthBytes] = {0};
614 WebRtcRTPHeader rtp_header; 614 WebRtcRTPHeader rtp_header;
615 rtp_header.header.payloadType = kPayloadType; 615 rtp_header.header.payloadType = kPayloadType;
616 rtp_header.header.sequenceNumber = 0x1234; 616 rtp_header.header.sequenceNumber = 0x1234;
617 rtp_header.header.timestamp = 0x12345678; 617 rtp_header.header.timestamp = 0x12345678;
618 rtp_header.header.ssrc = 0x87654321; 618 rtp_header.header.ssrc = 0x87654321;
619 619
620 // Insert one packet. Note that we have not registered any payload type, so 620 // Insert one packet. Note that we have not registered any payload type, so
621 // this packet will be rejected. 621 // this packet will be rejected.
622 EXPECT_EQ(NetEq::kFail, 622 EXPECT_EQ(NetEq::kFail,
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
1458 EXPECT_CALL(*mock_delay_manager_, BufferLimits(_, _)) 1458 EXPECT_CALL(*mock_delay_manager_, BufferLimits(_, _))
1459 .Times(1) 1459 .Times(1)
1460 .WillOnce(DoAll(SetArgPointee<0>(1), SetArgPointee<1>(2))); 1460 .WillOnce(DoAll(SetArgPointee<0>(1), SetArgPointee<1>(2)));
1461 1461
1462 bool muted; 1462 bool muted;
1463 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output_, &muted)); 1463 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output_, &muted));
1464 EXPECT_EQ(kAccelerate, neteq_->last_operation_for_test()); 1464 EXPECT_EQ(kAccelerate, neteq_->last_operation_for_test());
1465 } 1465 }
1466 1466
1467 }// namespace webrtc 1467 }// namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/decision_logic_normal.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698