OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 32000, | 177 32000, |
178 new MockExternalPcm16B(32000)), | 178 new MockExternalPcm16B(32000)), |
179 sample_rate_hz_(32000) { | 179 sample_rate_hz_(32000) { |
180 NetEq::Config config; | 180 NetEq::Config config; |
181 config.sample_rate_hz = sample_rate_hz_; | 181 config.sample_rate_hz = sample_rate_hz_; |
182 neteq_internal_.reset( | 182 neteq_internal_.reset( |
183 NetEq::Create(config, CreateBuiltinAudioDecoderFactory())); | 183 NetEq::Create(config, CreateBuiltinAudioDecoderFactory())); |
184 } | 184 } |
185 | 185 |
186 void SetUp() override { | 186 void SetUp() override { |
187 ASSERT_EQ(NetEq::kOK, neteq_internal_->RegisterPayloadType( | 187 ASSERT_EQ(true, neteq_internal_->RegisterPayloadType( |
188 NetEqDecoder::kDecoderPCM16Bswb32kHz, | 188 kPayloadType, SdpAudioFormat("L16", 32000, 1))); |
189 "pcm16-swb32", kPayloadType)); | |
190 } | 189 } |
191 | 190 |
192 void GetAndVerifyOutput() override { | 191 void GetAndVerifyOutput() override { |
193 // Get audio from internal decoder instance. | 192 // Get audio from internal decoder instance. |
194 bool muted; | 193 bool muted; |
195 EXPECT_EQ(NetEq::kOK, neteq_internal_->GetAudio(&output_internal_, &muted)); | 194 EXPECT_EQ(NetEq::kOK, neteq_internal_->GetAudio(&output_internal_, &muted)); |
196 ASSERT_FALSE(muted); | 195 ASSERT_FALSE(muted); |
197 EXPECT_EQ(1u, output_internal_.num_channels_); | 196 EXPECT_EQ(1u, output_internal_.num_channels_); |
198 EXPECT_EQ(static_cast<size_t>(kOutputLengthMs * sample_rate_hz_ / 1000), | 197 EXPECT_EQ(static_cast<size_t>(kOutputLengthMs * sample_rate_hz_ / 1000), |
199 output_internal_.samples_per_channel_); | 198 output_internal_.samples_per_channel_); |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 kStartSeqeunceNumber, | 445 kStartSeqeunceNumber, |
447 kStartTimestamp, | 446 kStartTimestamp, |
448 kJumpFromTimestamp, | 447 kJumpFromTimestamp, |
449 kJumpToTimestamp)); | 448 kJumpToTimestamp)); |
450 | 449 |
451 RunTest(130); // Run 130 laps @ 10 ms each in the test loop. | 450 RunTest(130); // Run 130 laps @ 10 ms each in the test loop. |
452 EXPECT_EQ(kRecovered, test_state_); | 451 EXPECT_EQ(kRecovered, test_state_); |
453 } | 452 } |
454 | 453 |
455 } // namespace webrtc | 454 } // namespace webrtc |
OLD | NEW |