OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
951 EXPECT_EQ(checksum_ref, checksum_string); | 951 EXPECT_EQ(checksum_ref, checksum_string); |
952 | 952 |
953 // Delete the output file. | 953 // Delete the output file. |
954 remove(output_file_name.c_str()); | 954 remove(output_file_name.c_str()); |
955 } | 955 } |
956 }; | 956 }; |
957 | 957 |
958 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \ | 958 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \ |
959 defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722) | 959 defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722) |
960 TEST_F(AcmReceiverBitExactnessOldApi, 8kHzOutput) { | 960 TEST_F(AcmReceiverBitExactnessOldApi, 8kHzOutput) { |
961 Run(8000, PlatformChecksum("86f0e58421dafe3471e1bcd62316174e", | 961 Run(8000, PlatformChecksum("dce4890259e9ded50f472455aa470a6f", |
962 "e2c2176b822f109eab2c3317ff1f3a89", | 962 "1c4ada78b12612147f3026920f8dcc14", |
963 "9c1058831bef8836d5880f86f03f02cd", | 963 "d804791edf2d00be2bc31c81a47368d4", |
964 "7294944a869a39085ae69278dca875ad"), | 964 "b2611f7323ab1209d5056399d0babbf5"), |
965 std::vector<ExternalDecoder>()); | 965 std::vector<ExternalDecoder>()); |
966 } | 966 } |
967 | 967 |
968 TEST_F(AcmReceiverBitExactnessOldApi, 16kHzOutput) { | 968 TEST_F(AcmReceiverBitExactnessOldApi, 16kHzOutput) { |
969 Run(16000, PlatformChecksum("0b895074ede8d93ff7d4b03e48ff4353", | 969 Run(16000, PlatformChecksum("27356bddffaa42b5c841b49aa3a070c5", |
970 "9b92ee1731bc07e7a802c46883551029", | 970 "5667d1872fc351244092ae995e5a5b32", |
971 "1a29721666a594cc56688b442790d0f9", | 971 "53f5dc8088148479ca112c4c6d0e91cb", |
972 "c061a9486003d0c096504905521d0fe7"), | 972 "4061a876d64d6cec5a38450acf4f245d"), |
973 std::vector<ExternalDecoder>()); | 973 std::vector<ExternalDecoder>()); |
974 } | 974 } |
975 | 975 |
976 TEST_F(AcmReceiverBitExactnessOldApi, 32kHzOutput) { | 976 TEST_F(AcmReceiverBitExactnessOldApi, 32kHzOutput) { |
977 Run(32000, PlatformChecksum("ed620557bab00d588db0af699dc05df9", | 977 Run(32000, PlatformChecksum("eb326547e83292305423b0a7ea57fea1", |
978 "9472cfaeba10282187a6376aeddba347", | 978 "be7fc3140e6b5188c2e5fae0a394543b", |
979 "0071b9962de77b1d71ecd0a0e5accf45", | 979 "eab9a0bff17320d6457d04f4c56563c6", |
980 "c6cca0a4dd27bb77505343a15ea13c77"), | 980 "b60241ef0bac4a75f66eead04e71bb12"), |
981 std::vector<ExternalDecoder>()); | 981 std::vector<ExternalDecoder>()); |
982 } | 982 } |
983 | 983 |
984 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutput) { | 984 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutput) { |
985 Run(48000, PlatformChecksum("e68904bd63da1bad4b00f4bd221f2325", | 985 Run(48000, PlatformChecksum("7eb79ea39b68472a5b04cf9a56e49cda", |
986 "3418d41ee693f8fa6d5878de5a8c95d9", | 986 "f8cdd6e018688b2fff25c9b865bebdbb", |
987 "861e65072b1a10eec56ffde10c99bbce", | 987 "2d18f0f06e7e2fc63b74d06e3c58067f", |
988 "244bafe12206b7e26276ff7c49fc1795"), | 988 "81c3e4d24ebec23ca48f42fbaec4aba0"), |
989 std::vector<ExternalDecoder>()); | 989 std::vector<ExternalDecoder>()); |
990 } | 990 } |
991 | 991 |
992 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutputExternalDecoder) { | 992 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutputExternalDecoder) { |
993 // Class intended to forward a call from a mock DecodeInternal to Decode on | 993 // Class intended to forward a call from a mock DecodeInternal to Decode on |
994 // the real decoder's Decode. DecodeInternal for the real decoder isn't | 994 // the real decoder's Decode. DecodeInternal for the real decoder isn't |
995 // public. | 995 // public. |
996 class DecodeForwarder { | 996 class DecodeForwarder { |
997 public: | 997 public: |
998 DecodeForwarder(AudioDecoder* decoder) : decoder_(decoder) {} | 998 DecodeForwarder(AudioDecoder* decoder) : decoder_(decoder) {} |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1036 .WillRepeatedly(Invoke(&decoder, &AudioDecoderPcmU::PacketDuration)); | 1036 .WillRepeatedly(Invoke(&decoder, &AudioDecoderPcmU::PacketDuration)); |
1037 ExternalDecoder ed; | 1037 ExternalDecoder ed; |
1038 ed.rtp_payload_type = 0; | 1038 ed.rtp_payload_type = 0; |
1039 ed.external_decoder = &mock_decoder; | 1039 ed.external_decoder = &mock_decoder; |
1040 ed.sample_rate_hz = 8000; | 1040 ed.sample_rate_hz = 8000; |
1041 ed.num_channels = 1; | 1041 ed.num_channels = 1; |
1042 ed.name = "MockPCMU"; | 1042 ed.name = "MockPCMU"; |
1043 std::vector<ExternalDecoder> external_decoders; | 1043 std::vector<ExternalDecoder> external_decoders; |
1044 external_decoders.push_back(ed); | 1044 external_decoders.push_back(ed); |
1045 | 1045 |
1046 Run(48000, PlatformChecksum("e68904bd63da1bad4b00f4bd221f2325", | 1046 Run(48000, PlatformChecksum("7eb79ea39b68472a5b04cf9a56e49cda", |
1047 "3418d41ee693f8fa6d5878de5a8c95d9", | 1047 "f8cdd6e018688b2fff25c9b865bebdbb", |
1048 "861e65072b1a10eec56ffde10c99bbce", | 1048 "2d18f0f06e7e2fc63b74d06e3c58067f", |
1049 "244bafe12206b7e26276ff7c49fc1795"), | 1049 "81c3e4d24ebec23ca48f42fbaec4aba0"), |
1050 external_decoders); | 1050 external_decoders); |
1051 | 1051 |
1052 EXPECT_CALL(mock_decoder, Die()); | 1052 EXPECT_CALL(mock_decoder, Die()); |
1053 } | 1053 } |
1054 #endif | 1054 #endif |
1055 | 1055 |
1056 // This test verifies bit exactness for the send-side of ACM. The test setup is | 1056 // This test verifies bit exactness for the send-side of ACM. The test setup is |
1057 // a chain of three different test classes: | 1057 // a chain of three different test classes: |
1058 // | 1058 // |
1059 // test::AcmSendTest -> AcmSenderBitExactness -> test::AcmReceiveTest | 1059 // test::AcmSendTest -> AcmSenderBitExactness -> test::AcmReceiveTest |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1801 Run(16000, 8000, 1000); | 1801 Run(16000, 8000, 1000); |
1802 } | 1802 } |
1803 | 1803 |
1804 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { | 1804 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { |
1805 Run(8000, 16000, 1000); | 1805 Run(8000, 16000, 1000); |
1806 } | 1806 } |
1807 | 1807 |
1808 #endif | 1808 #endif |
1809 | 1809 |
1810 } // namespace webrtc | 1810 } // namespace webrtc |
OLD | NEW |