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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 TEST_F(AudioDecoderPcmUTest, EncodeDecode) { | 474 TEST_F(AudioDecoderPcmUTest, EncodeDecode) { |
475 int tolerance = 251; | 475 int tolerance = 251; |
476 double mse = 1734.0; | 476 double mse = 1734.0; |
477 EncodeDecodeTest(data_length_, tolerance, mse); | 477 EncodeDecodeTest(data_length_, tolerance, mse); |
478 ReInitTest(); | 478 ReInitTest(); |
479 EXPECT_FALSE(decoder_->HasDecodePlc()); | 479 EXPECT_FALSE(decoder_->HasDecodePlc()); |
480 } | 480 } |
481 | 481 |
482 namespace { | 482 namespace { |
483 int SetAndGetTargetBitrate(AudioEncoder* audio_encoder, int rate) { | 483 int SetAndGetTargetBitrate(AudioEncoder* audio_encoder, int rate) { |
484 audio_encoder->SetTargetBitrate(rate); | 484 audio_encoder->OnReceivedTargetAudioBitrate(rate); |
485 return audio_encoder->GetTargetBitrate(); | 485 return audio_encoder->GetTargetBitrate(); |
486 } | 486 } |
487 void TestSetAndGetTargetBitratesWithFixedCodec(AudioEncoder* audio_encoder, | 487 void TestSetAndGetTargetBitratesWithFixedCodec(AudioEncoder* audio_encoder, |
488 int fixed_rate) { | 488 int fixed_rate) { |
489 EXPECT_EQ(fixed_rate, SetAndGetTargetBitrate(audio_encoder, 32000)); | 489 EXPECT_EQ(fixed_rate, SetAndGetTargetBitrate(audio_encoder, 32000)); |
490 EXPECT_EQ(fixed_rate, SetAndGetTargetBitrate(audio_encoder, fixed_rate - 1)); | 490 EXPECT_EQ(fixed_rate, SetAndGetTargetBitrate(audio_encoder, fixed_rate - 1)); |
491 EXPECT_EQ(fixed_rate, SetAndGetTargetBitrate(audio_encoder, fixed_rate)); | 491 EXPECT_EQ(fixed_rate, SetAndGetTargetBitrate(audio_encoder, fixed_rate)); |
492 EXPECT_EQ(fixed_rate, SetAndGetTargetBitrate(audio_encoder, fixed_rate + 1)); | 492 EXPECT_EQ(fixed_rate, SetAndGetTargetBitrate(audio_encoder, fixed_rate + 1)); |
493 } | 493 } |
494 } // namespace | 494 } // namespace |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGnb)); | 698 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGnb)); |
699 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGwb)); | 699 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGwb)); |
700 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb32kHz)); | 700 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb32kHz)); |
701 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb48kHz)); | 701 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb48kHz)); |
702 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderArbitrary)); | 702 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderArbitrary)); |
703 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus)); | 703 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus)); |
704 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus_2ch)); | 704 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus_2ch)); |
705 } | 705 } |
706 | 706 |
707 } // namespace webrtc | 707 } // namespace webrtc |
OLD | NEW |