| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 protected: | 93 protected: |
| 94 AudioDecoderTest() | 94 AudioDecoderTest() |
| 95 : input_audio_( | 95 : input_audio_( |
| 96 webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm"), | 96 webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm"), |
| 97 32000), | 97 32000), |
| 98 codec_input_rate_hz_(32000), // Legacy default value. | 98 codec_input_rate_hz_(32000), // Legacy default value. |
| 99 frame_size_(0), | 99 frame_size_(0), |
| 100 data_length_(0), | 100 data_length_(0), |
| 101 channels_(1), | 101 channels_(1), |
| 102 payload_type_(17), | 102 payload_type_(17), |
| 103 decoder_(NULL) {} | 103 decoder_(nullptr) {} |
| 104 | 104 |
| 105 virtual ~AudioDecoderTest() {} | 105 virtual ~AudioDecoderTest() {} |
| 106 | 106 |
| 107 virtual void SetUp() { | 107 virtual void SetUp() { |
| 108 if (audio_encoder_) | 108 if (audio_encoder_) |
| 109 codec_input_rate_hz_ = audio_encoder_->SampleRateHz(); | 109 codec_input_rate_hz_ = audio_encoder_->SampleRateHz(); |
| 110 // Create arrays. | 110 // Create arrays. |
| 111 ASSERT_GT(data_length_, 0u) << "The test must set data_length_ > 0"; | 111 ASSERT_GT(data_length_, 0u) << "The test must set data_length_ > 0"; |
| 112 } | 112 } |
| 113 | 113 |
| 114 virtual void TearDown() { | 114 virtual void TearDown() { |
| 115 delete decoder_; | 115 delete decoder_; |
| 116 decoder_ = NULL; | 116 decoder_ = nullptr; |
| 117 } | 117 } |
| 118 | 118 |
| 119 virtual void InitEncoder() { } | 119 virtual void InitEncoder() { } |
| 120 | 120 |
| 121 // TODO(henrik.lundin) Change return type to size_t once most/all overriding | 121 // TODO(henrik.lundin) Change return type to size_t once most/all overriding |
| 122 // implementations are gone. | 122 // implementations are gone. |
| 123 virtual int EncodeFrame(const int16_t* input, | 123 virtual int EncodeFrame(const int16_t* input, |
| 124 size_t input_len_samples, | 124 size_t input_len_samples, |
| 125 rtc::Buffer* output) { | 125 rtc::Buffer* output) { |
| 126 AudioEncoder::EncodedInfo encoded_info; | 126 AudioEncoder::EncodedInfo encoded_info; |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGnb)); | 689 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGnb)); |
| 690 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGwb)); | 690 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGwb)); |
| 691 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb32kHz)); | 691 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb32kHz)); |
| 692 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb48kHz)); | 692 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb48kHz)); |
| 693 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderArbitrary)); | 693 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderArbitrary)); |
| 694 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus)); | 694 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus)); |
| 695 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus_2ch)); | 695 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus_2ch)); |
| 696 } | 696 } |
| 697 | 697 |
| 698 } // namespace webrtc | 698 } // namespace webrtc |
| OLD | NEW |