OLD | NEW |
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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 | 236 |
237 // Remove an existing codec. | 237 // Remove an existing codec. |
238 EXPECT_EQ(0, receiver_->RemoveCodec(payload_type)); | 238 EXPECT_EQ(0, receiver_->RemoveCodec(payload_type)); |
239 | 239 |
240 // Ask for the removed codec, must fail. | 240 // Ask for the removed codec, must fail. |
241 EXPECT_EQ(-1, receiver_->DecoderByPayloadType(payload_type, &codec)); | 241 EXPECT_EQ(-1, receiver_->DecoderByPayloadType(payload_type, &codec)); |
242 } | 242 } |
243 | 243 |
244 TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(SampleRate)) { | 244 TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(SampleRate)) { |
245 const int kCodecId[] = { | 245 const int kCodecId[] = { |
246 ACMCodecDB::kISAC, ACMCodecDB::kISACSWB, ACMCodecDB::kISACFB, | 246 ACMCodecDB::kISAC, ACMCodecDB::kISACSWB, |
247 -1 // Terminator. | 247 -1 // Terminator. |
248 }; | 248 }; |
249 AddSetOfCodecs(kCodecId); | 249 AddSetOfCodecs(kCodecId); |
250 | 250 |
251 AudioFrame frame; | 251 AudioFrame frame; |
252 const int kOutSampleRateHz = 8000; // Different than codec sample rate. | 252 const int kOutSampleRateHz = 8000; // Different than codec sample rate. |
253 int n = 0; | 253 int n = 0; |
254 while (kCodecId[n] >= 0) { | 254 while (kCodecId[n] >= 0) { |
255 const int num_10ms_frames = codecs_[kCodecId[n]].pacsize / | 255 const int num_10ms_frames = codecs_[kCodecId[n]].pacsize / |
256 (codecs_[kCodecId[n]].plfreq / 100); | 256 (codecs_[kCodecId[n]].plfreq / 100); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 EXPECT_EQ(kCodecId[n], receiver_->last_audio_codec_id()); | 361 EXPECT_EQ(kCodecId[n], receiver_->last_audio_codec_id()); |
362 EXPECT_EQ(0, receiver_->LastAudioCodec(&codec)); | 362 EXPECT_EQ(0, receiver_->LastAudioCodec(&codec)); |
363 EXPECT_TRUE(CodecsEqual(codecs_[kCodecId[n]], codec)); | 363 EXPECT_TRUE(CodecsEqual(codecs_[kCodecId[n]], codec)); |
364 ++n; | 364 ++n; |
365 } | 365 } |
366 } | 366 } |
367 | 367 |
368 } // namespace acm2 | 368 } // namespace acm2 |
369 | 369 |
370 } // namespace webrtc | 370 } // namespace webrtc |
OLD | NEW |