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

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

Issue 2445373002: NetEq: Remove special case for Merge without Expand (Closed)
Patch Set: The original CL, not modified at all Created 4 years, 1 month 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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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