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

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

Issue 1484343003: NetEq: Add codec name and RTP timestamp rate to DecoderInfo (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 5 years 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) 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 new MockExternalPcm16B), 173 new MockExternalPcm16B),
174 sample_rate_hz_( 174 sample_rate_hz_(
175 CodecSampleRateHz(NetEqDecoder::kDecoderPCM16Bswb32kHz)) { 175 CodecSampleRateHz(NetEqDecoder::kDecoderPCM16Bswb32kHz)) {
176 NetEq::Config config; 176 NetEq::Config config;
177 config.sample_rate_hz = 177 config.sample_rate_hz =
178 CodecSampleRateHz(NetEqDecoder::kDecoderPCM16Bswb32kHz); 178 CodecSampleRateHz(NetEqDecoder::kDecoderPCM16Bswb32kHz);
179 neteq_internal_.reset(NetEq::Create(config)); 179 neteq_internal_.reset(NetEq::Create(config));
180 } 180 }
181 181
182 void SetUp() override { 182 void SetUp() override {
183 ASSERT_EQ(NetEq::kOK, 183 ASSERT_EQ(NetEq::kOK, neteq_internal_->RegisterPayloadType(
184 neteq_internal_->RegisterPayloadType( 184 NetEqDecoder::kDecoderPCM16Bswb32kHz,
185 NetEqDecoder::kDecoderPCM16Bswb32kHz, kPayloadType)); 185 "pcm16-swb32", kPayloadType));
186 } 186 }
187 187
188 void GetAndVerifyOutput() override { 188 void GetAndVerifyOutput() override {
189 NetEqOutputType output_type; 189 NetEqOutputType output_type;
190 size_t samples_per_channel; 190 size_t samples_per_channel;
191 int num_channels; 191 int num_channels;
192 // Get audio from internal decoder instance. 192 // Get audio from internal decoder instance.
193 EXPECT_EQ(NetEq::kOK, 193 EXPECT_EQ(NetEq::kOK,
194 neteq_internal_->GetAudio(kMaxBlockSize, 194 neteq_internal_->GetAudio(kMaxBlockSize,
195 output_internal_, 195 output_internal_,
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 kStartSeqeunceNumber, 450 kStartSeqeunceNumber,
451 kStartTimestamp, 451 kStartTimestamp,
452 kJumpFromTimestamp, 452 kJumpFromTimestamp,
453 kJumpToTimestamp)); 453 kJumpToTimestamp));
454 454
455 RunTest(130); // Run 130 laps @ 10 ms each in the test loop. 455 RunTest(130); // Run 130 laps @ 10 ms each in the test loop.
456 EXPECT_EQ(kRecovered, test_state_); 456 EXPECT_EQ(kRecovered, test_state_);
457 } 457 }
458 458
459 } // namespace webrtc 459 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h ('k') | webrtc/modules/audio_coding/neteq/neteq_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698