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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 | 237 |
238 // Remove an existing codec. | 238 // Remove an existing codec. |
239 EXPECT_EQ(0, receiver_->RemoveCodec(payload_type)); | 239 EXPECT_EQ(0, receiver_->RemoveCodec(payload_type)); |
240 | 240 |
241 // Ask for the removed codec, must fail. | 241 // Ask for the removed codec, must fail. |
242 EXPECT_EQ(-1, receiver_->DecoderByPayloadType(payload_type, &codec)); | 242 EXPECT_EQ(-1, receiver_->DecoderByPayloadType(payload_type, &codec)); |
243 } | 243 } |
244 | 244 |
245 TEST_F(AcmReceiverTest, DISABLED_ON_ANDROID(SampleRate)) { | 245 TEST_F(AcmReceiverTest, DISABLED_ON_ANDROID(SampleRate)) { |
246 const int kCodecId[] = { | 246 const int kCodecId[] = { |
247 ACMCodecDB::kISAC, ACMCodecDB::kISACSWB, ACMCodecDB::kISACFB, | 247 ACMCodecDB::kISAC, ACMCodecDB::kISACSWB, |
248 -1 // Terminator. | 248 -1 // Terminator. |
249 }; | 249 }; |
250 AddSetOfCodecs(kCodecId); | 250 AddSetOfCodecs(kCodecId); |
251 | 251 |
252 AudioFrame frame; | 252 AudioFrame frame; |
253 const int kOutSampleRateHz = 8000; // Different than codec sample rate. | 253 const int kOutSampleRateHz = 8000; // Different than codec sample rate. |
254 int n = 0; | 254 int n = 0; |
255 while (kCodecId[n] >= 0) { | 255 while (kCodecId[n] >= 0) { |
256 const int num_10ms_frames = codecs_[kCodecId[n]].pacsize / | 256 const int num_10ms_frames = codecs_[kCodecId[n]].pacsize / |
257 (codecs_[kCodecId[n]].plfreq / 100); | 257 (codecs_[kCodecId[n]].plfreq / 100); |
(...skipping 103 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 |