| OLD | NEW |
| 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 audio_encoder_.reset(new AudioEncoderPcm16B(config)); | 308 audio_encoder_.reset(new AudioEncoderPcm16B(config)); |
| 309 } | 309 } |
| 310 }; | 310 }; |
| 311 | 311 |
| 312 class AudioDecoderIlbcTest : public AudioDecoderTest { | 312 class AudioDecoderIlbcTest : public AudioDecoderTest { |
| 313 protected: | 313 protected: |
| 314 AudioDecoderIlbcTest() : AudioDecoderTest() { | 314 AudioDecoderIlbcTest() : AudioDecoderTest() { |
| 315 codec_input_rate_hz_ = 8000; | 315 codec_input_rate_hz_ = 8000; |
| 316 frame_size_ = 240; | 316 frame_size_ = 240; |
| 317 data_length_ = 10 * frame_size_; | 317 data_length_ = 10 * frame_size_; |
| 318 decoder_ = new AudioDecoderIlbc; | 318 decoder_ = new AudioDecoderIlbcImpl; |
| 319 assert(decoder_); | 319 assert(decoder_); |
| 320 AudioEncoderIlbc::Config config; | 320 AudioEncoderIlbcConfig config; |
| 321 config.frame_size_ms = 30; | 321 config.frame_size_ms = 30; |
| 322 config.payload_type = payload_type_; | 322 audio_encoder_.reset(new AudioEncoderIlbcImpl(config, payload_type_)); |
| 323 audio_encoder_.reset(new AudioEncoderIlbc(config)); | |
| 324 } | 323 } |
| 325 | 324 |
| 326 // Overload the default test since iLBC's function WebRtcIlbcfix_NetEqPlc does | 325 // Overload the default test since iLBC's function WebRtcIlbcfix_NetEqPlc does |
| 327 // not return any data. It simply resets a few states and returns 0. | 326 // not return any data. It simply resets a few states and returns 0. |
| 328 void DecodePlcTest() { | 327 void DecodePlcTest() { |
| 329 InitEncoder(); | 328 InitEncoder(); |
| 330 std::unique_ptr<int16_t[]> input(new int16_t[frame_size_]); | 329 std::unique_ptr<int16_t[]> input(new int16_t[frame_size_]); |
| 331 ASSERT_TRUE( | 330 ASSERT_TRUE( |
| 332 input_audio_.Read(frame_size_, codec_input_rate_hz_, input.get())); | 331 input_audio_.Read(frame_size_, codec_input_rate_hz_, input.get())); |
| 333 rtc::Buffer encoded; | 332 rtc::Buffer encoded; |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGnb)); | 686 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGnb)); |
| 688 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGwb)); | 687 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGwb)); |
| 689 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb32kHz)); | 688 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb32kHz)); |
| 690 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb48kHz)); | 689 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb48kHz)); |
| 691 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderArbitrary)); | 690 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderArbitrary)); |
| 692 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus)); | 691 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus)); |
| 693 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus_2ch)); | 692 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus_2ch)); |
| 694 } | 693 } |
| 695 | 694 |
| 696 } // namespace webrtc | 695 } // namespace webrtc |
| OLD | NEW |