| 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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 TEST_F(AudioDecoderPcmUTest, EncodeDecode) { | 462 TEST_F(AudioDecoderPcmUTest, EncodeDecode) { |
| 463 int tolerance = 251; | 463 int tolerance = 251; |
| 464 double mse = 1734.0; | 464 double mse = 1734.0; |
| 465 EncodeDecodeTest(data_length_, tolerance, mse); | 465 EncodeDecodeTest(data_length_, tolerance, mse); |
| 466 ReInitTest(); | 466 ReInitTest(); |
| 467 EXPECT_FALSE(decoder_->HasDecodePlc()); | 467 EXPECT_FALSE(decoder_->HasDecodePlc()); |
| 468 } | 468 } |
| 469 | 469 |
| 470 namespace { | 470 namespace { |
| 471 int SetAndGetTargetBitrate(AudioEncoder* audio_encoder, int rate) { | 471 int SetAndGetTargetBitrate(AudioEncoder* audio_encoder, int rate) { |
| 472 audio_encoder->SetTargetBitrate(rate); | 472 audio_encoder->OnReceivedTargetAudioBitrate(rate); |
| 473 return audio_encoder->GetTargetBitrate(); | 473 return audio_encoder->GetTargetBitrate(); |
| 474 } | 474 } |
| 475 void TestSetAndGetTargetBitratesWithFixedCodec(AudioEncoder* audio_encoder, | 475 void TestSetAndGetTargetBitratesWithFixedCodec(AudioEncoder* audio_encoder, |
| 476 int fixed_rate) { | 476 int fixed_rate) { |
| 477 EXPECT_EQ(fixed_rate, SetAndGetTargetBitrate(audio_encoder, 32000)); | 477 EXPECT_EQ(fixed_rate, SetAndGetTargetBitrate(audio_encoder, 32000)); |
| 478 EXPECT_EQ(fixed_rate, SetAndGetTargetBitrate(audio_encoder, fixed_rate - 1)); | 478 EXPECT_EQ(fixed_rate, SetAndGetTargetBitrate(audio_encoder, fixed_rate - 1)); |
| 479 EXPECT_EQ(fixed_rate, SetAndGetTargetBitrate(audio_encoder, fixed_rate)); | 479 EXPECT_EQ(fixed_rate, SetAndGetTargetBitrate(audio_encoder, fixed_rate)); |
| 480 EXPECT_EQ(fixed_rate, SetAndGetTargetBitrate(audio_encoder, fixed_rate + 1)); | 480 EXPECT_EQ(fixed_rate, SetAndGetTargetBitrate(audio_encoder, fixed_rate + 1)); |
| 481 } | 481 } |
| 482 } // namespace | 482 } // namespace |
| (...skipping 206 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 |