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

Side by Side Diff: webrtc/modules/audio_coding/neteq/tools/neteq_external_decoder_test.cc

Issue 2807273004: Change NetEq::InsertPacket to take an RTPHeader (Closed)
Patch Set: git cl format Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 22 matching lines...) Expand all
33 void NetEqExternalDecoderTest::Init() { 33 void NetEqExternalDecoderTest::Init() {
34 ASSERT_EQ(NetEq::kOK, 34 ASSERT_EQ(NetEq::kOK,
35 neteq_->RegisterExternalDecoder(decoder_, codec_, name_, 35 neteq_->RegisterExternalDecoder(decoder_, codec_, name_,
36 kPayloadType)); 36 kPayloadType));
37 } 37 }
38 38
39 void NetEqExternalDecoderTest::InsertPacket( 39 void NetEqExternalDecoderTest::InsertPacket(
40 WebRtcRTPHeader rtp_header, 40 WebRtcRTPHeader rtp_header,
41 rtc::ArrayView<const uint8_t> payload, 41 rtc::ArrayView<const uint8_t> payload,
42 uint32_t receive_timestamp) { 42 uint32_t receive_timestamp) {
43 ASSERT_EQ(NetEq::kOK, 43 ASSERT_EQ(NetEq::kOK, neteq_->InsertPacket(rtp_header.header, payload,
44 neteq_->InsertPacket(rtp_header, payload, receive_timestamp)); 44 receive_timestamp));
45 } 45 }
46 46
47 void NetEqExternalDecoderTest::GetOutputAudio(AudioFrame* output) { 47 void NetEqExternalDecoderTest::GetOutputAudio(AudioFrame* output) {
48 // Get audio from regular instance. 48 // Get audio from regular instance.
49 bool muted; 49 bool muted;
50 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(output, &muted)); 50 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(output, &muted));
51 ASSERT_FALSE(muted); 51 ASSERT_FALSE(muted);
52 EXPECT_EQ(channels_, output->num_channels_); 52 EXPECT_EQ(channels_, output->num_channels_);
53 EXPECT_EQ(static_cast<size_t>(kOutputLengthMs * sample_rate_hz_ / 1000), 53 EXPECT_EQ(static_cast<size_t>(kOutputLengthMs * sample_rate_hz_ / 1000),
54 output->samples_per_channel_); 54 output->samples_per_channel_);
55 EXPECT_EQ(sample_rate_hz_, neteq_->last_output_sample_rate_hz()); 55 EXPECT_EQ(sample_rate_hz_, neteq_->last_output_sample_rate_hz());
56 } 56 }
57 57
58 } // namespace test 58 } // namespace test
59 } // namespace webrtc 59 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq_unittest.cc ('k') | webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698