OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 size_t* payload_len) { | 431 size_t* payload_len) { |
432 rtp_info->header.sequenceNumber = frame_index; | 432 rtp_info->header.sequenceNumber = frame_index; |
433 rtp_info->header.timestamp = timestamp; | 433 rtp_info->header.timestamp = timestamp; |
434 rtp_info->header.ssrc = 0x1234; // Just an arbitrary SSRC. | 434 rtp_info->header.ssrc = 0x1234; // Just an arbitrary SSRC. |
435 rtp_info->header.payloadType = 98; // WB CNG. | 435 rtp_info->header.payloadType = 98; // WB CNG. |
436 rtp_info->header.markerBit = 0; | 436 rtp_info->header.markerBit = 0; |
437 payload[0] = 64; // Noise level -64 dBov, quite arbitrarily chosen. | 437 payload[0] = 64; // Noise level -64 dBov, quite arbitrarily chosen. |
438 *payload_len = 1; // Only noise level, no spectral parameters. | 438 *payload_len = 1; // Only noise level, no spectral parameters. |
439 } | 439 } |
440 | 440 |
441 // TODO(henrika): add support for IOS for all tests in this file. | |
442 // See https://code.google.com/p/webrtc/issues/detail?id=4752 for details. | |
443 TEST_F(NetEqDecodingTest, | 441 TEST_F(NetEqDecodingTest, |
444 DISABLED_ON_IOS(DISABLED_ON_ANDROID(TestBitExactness))) { | 442 DISABLED_ON_IOS(DISABLED_ON_ANDROID(TestBitExactness))) { |
445 const std::string input_rtp_file = webrtc::test::ProjectRootPath() + | 443 const std::string input_rtp_file = webrtc::test::ProjectRootPath() + |
446 "resources/audio_coding/neteq_universal_new.rtp"; | 444 "resources/audio_coding/neteq_universal_new.rtp"; |
447 // Note that neteq4_universal_ref.pcm and neteq4_universal_ref_win_32.pcm | 445 // Note that neteq4_universal_ref.pcm and neteq4_universal_ref_win_32.pcm |
448 // are identical. The latter could have been removed, but if clients still | 446 // are identical. The latter could have been removed, but if clients still |
449 // have a copy of the file, the test will fail. | 447 // have a copy of the file, the test will fail. |
450 const std::string input_ref_file = | 448 const std::string input_ref_file = |
451 webrtc::test::ResourcePath("audio_coding/neteq4_universal_ref", "pcm"); | 449 webrtc::test::ResourcePath("audio_coding/neteq4_universal_ref", "pcm"); |
452 #if defined(_MSC_VER) && (_MSC_VER >= 1700) | 450 #if defined(_MSC_VER) && (_MSC_VER >= 1700) |
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1049 NetEqBgnTestFade() : NetEqBgnTest() { | 1047 NetEqBgnTestFade() : NetEqBgnTest() { |
1050 config_.background_noise_mode = NetEq::kBgnFade; | 1048 config_.background_noise_mode = NetEq::kBgnFade; |
1051 } | 1049 } |
1052 | 1050 |
1053 void TestCondition(double sum_squared_noise, bool should_be_faded) { | 1051 void TestCondition(double sum_squared_noise, bool should_be_faded) { |
1054 if (should_be_faded) | 1052 if (should_be_faded) |
1055 EXPECT_EQ(0, sum_squared_noise); | 1053 EXPECT_EQ(0, sum_squared_noise); |
1056 } | 1054 } |
1057 }; | 1055 }; |
1058 | 1056 |
1059 TEST_F(NetEqBgnTestOn, DISABLED_ON_IOS(RunTest)) { | 1057 TEST_F(NetEqBgnTestOn, RunTest) { |
1060 CheckBgn(8000); | 1058 CheckBgn(8000); |
1061 CheckBgn(16000); | 1059 CheckBgn(16000); |
1062 CheckBgn(32000); | 1060 CheckBgn(32000); |
1063 } | 1061 } |
1064 | 1062 |
1065 TEST_F(NetEqBgnTestOff, DISABLED_ON_IOS(RunTest)) { | 1063 TEST_F(NetEqBgnTestOff, RunTest) { |
1066 CheckBgn(8000); | 1064 CheckBgn(8000); |
1067 CheckBgn(16000); | 1065 CheckBgn(16000); |
1068 CheckBgn(32000); | 1066 CheckBgn(32000); |
1069 } | 1067 } |
1070 | 1068 |
1071 TEST_F(NetEqBgnTestFade, DISABLED_ON_IOS(RunTest)) { | 1069 TEST_F(NetEqBgnTestFade, RunTest) { |
1072 CheckBgn(8000); | 1070 CheckBgn(8000); |
1073 CheckBgn(16000); | 1071 CheckBgn(16000); |
1074 CheckBgn(32000); | 1072 CheckBgn(32000); |
1075 } | 1073 } |
1076 | 1074 |
1077 TEST_F(NetEqDecodingTest, SyncPacketInsert) { | 1075 TEST_F(NetEqDecodingTest, SyncPacketInsert) { |
1078 WebRtcRTPHeader rtp_info; | 1076 WebRtcRTPHeader rtp_info; |
1079 uint32_t receive_timestamp = 0; | 1077 uint32_t receive_timestamp = 0; |
1080 // For the readability use the following payloads instead of the defaults of | 1078 // For the readability use the following payloads instead of the defaults of |
1081 // this test. | 1079 // this test. |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1535 // Pull audio once. | 1533 // Pull audio once. |
1536 ASSERT_EQ(0, neteq_->GetAudio(kMaxBlockSize, out_data_, &out_len, | 1534 ASSERT_EQ(0, neteq_->GetAudio(kMaxBlockSize, out_data_, &out_len, |
1537 &num_channels, &type)); | 1535 &num_channels, &type)); |
1538 ASSERT_EQ(kBlockSize16kHz, out_len); | 1536 ASSERT_EQ(kBlockSize16kHz, out_len); |
1539 } | 1537 } |
1540 // Verify speech output. | 1538 // Verify speech output. |
1541 EXPECT_EQ(kOutputNormal, type); | 1539 EXPECT_EQ(kOutputNormal, type); |
1542 } | 1540 } |
1543 | 1541 |
1544 } // namespace webrtc | 1542 } // namespace webrtc |
OLD | NEW |