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 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
933 EXPECT_EQ(checksum_ref, checksum_string); | 933 EXPECT_EQ(checksum_ref, checksum_string); |
934 | 934 |
935 // Delete the output file. | 935 // Delete the output file. |
936 remove(output_file_name.c_str()); | 936 remove(output_file_name.c_str()); |
937 } | 937 } |
938 }; | 938 }; |
939 | 939 |
940 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \ | 940 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \ |
941 defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722) | 941 defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722) |
942 TEST_F(AcmReceiverBitExactnessOldApi, 8kHzOutput) { | 942 TEST_F(AcmReceiverBitExactnessOldApi, 8kHzOutput) { |
943 Run(8000, PlatformChecksum("908002dc01fc4eb1d2be24eb1d3f354b", | 943 Run(8000, PlatformChecksum("d9334a99c7f185860028e6f08e5b7390", |
944 "dcee98c623b147ebe1b40dd30efa896e", | 944 "946803da293ef3fa39242d3059eac491", |
945 "adc92e173f908f93b96ba5844209815a", | 945 "efb5a07480bad8afb184c4150f4b3f3a", |
946 "ba16137d3a5a1e637252289c57522bfe"), | 946 "51717ab374871cbfa2c6977ea2aa40f3"), |
947 std::vector<ExternalDecoder>()); | 947 std::vector<ExternalDecoder>()); |
948 } | 948 } |
949 | 949 |
950 TEST_F(AcmReceiverBitExactnessOldApi, 16kHzOutput) { | 950 TEST_F(AcmReceiverBitExactnessOldApi, 16kHzOutput) { |
951 Run(16000, PlatformChecksum("a909560b5ca49fa472b17b7b277195e9", | 951 Run(16000, PlatformChecksum("9ad7d5a5f3c9fac4e880a6fbfd9d3ac8", |
952 "f790e7a8cce4e2c8b7bb5e0e4c5dac0d", | 952 "4fc1b82404ae33511c1cdb385774b2a4", |
953 "8cffa6abcb3e18e33b9d857666dff66a", | 953 "f580bfd4e5e29f0399b61b7512d4e3b4", |
954 "66ee001e23534d4dcf5d0f81f916c93b"), | 954 "5b2ae32c590b41d0c601179e14eaae96"), |
955 std::vector<ExternalDecoder>()); | 955 std::vector<ExternalDecoder>()); |
956 } | 956 } |
957 | 957 |
958 TEST_F(AcmReceiverBitExactnessOldApi, 32kHzOutput) { | 958 TEST_F(AcmReceiverBitExactnessOldApi, 32kHzOutput) { |
959 Run(32000, PlatformChecksum("441aab4b347fb3db4e9244337aca8d8e", | 959 Run(32000, PlatformChecksum("08e6085ccb96494b242f0ecc4c8a2dc8", |
960 "306e0d990ee6e92de3fbecc0123ece37", | 960 "d1f853b1e046c67c9ee186786eaf2124", |
961 "3e126fe894720c3f85edadcc91964ba5", | 961 "fdf5166b98c43235978685e40e28fea6", |
962 "9c6ff204b14152c48fe41d5ab757943b"), | 962 "7f620312f2fa74a10048bbb7739d4bf3"), |
963 std::vector<ExternalDecoder>()); | 963 std::vector<ExternalDecoder>()); |
964 } | 964 } |
965 | 965 |
966 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutput) { | 966 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutput) { |
967 Run(48000, PlatformChecksum("4ee2730fa1daae755e8a8fd3abd779ec", | 967 Run(48000, PlatformChecksum("31343887b7ef70772df733d072b0dd00", |
968 "aa7c232f63a67b2a72703593bdd172e0", | 968 "f6893278d75dad42ac44bff77f674b33", |
969 "0155665e93067c4e89256b944dd11999", | 969 "71f89e87ee1bad594f529d6c036289ad", |
970 "fc4f0da8844cd808d822bbddf3b9c285"), | 970 "b64c891e99eccc9ff45541ef67c9e9bf"), |
971 std::vector<ExternalDecoder>()); | 971 std::vector<ExternalDecoder>()); |
972 } | 972 } |
973 | 973 |
974 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutputExternalDecoder) { | 974 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutputExternalDecoder) { |
975 // Class intended to forward a call from a mock DecodeInternal to Decode on | 975 // Class intended to forward a call from a mock DecodeInternal to Decode on |
976 // the real decoder's Decode. DecodeInternal for the real decoder isn't | 976 // the real decoder's Decode. DecodeInternal for the real decoder isn't |
977 // public. | 977 // public. |
978 class DecodeForwarder { | 978 class DecodeForwarder { |
979 public: | 979 public: |
980 DecodeForwarder(AudioDecoder* decoder) : decoder_(decoder) {} | 980 DecodeForwarder(AudioDecoder* decoder) : decoder_(decoder) {} |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 .WillRepeatedly(Invoke(&decoder, &AudioDecoderPcmU::PacketDuration)); | 1015 .WillRepeatedly(Invoke(&decoder, &AudioDecoderPcmU::PacketDuration)); |
1016 ExternalDecoder ed; | 1016 ExternalDecoder ed; |
1017 ed.rtp_payload_type = 0; | 1017 ed.rtp_payload_type = 0; |
1018 ed.external_decoder = &mock_decoder; | 1018 ed.external_decoder = &mock_decoder; |
1019 ed.sample_rate_hz = 8000; | 1019 ed.sample_rate_hz = 8000; |
1020 ed.num_channels = 1; | 1020 ed.num_channels = 1; |
1021 ed.name = "MockPCMU"; | 1021 ed.name = "MockPCMU"; |
1022 std::vector<ExternalDecoder> external_decoders; | 1022 std::vector<ExternalDecoder> external_decoders; |
1023 external_decoders.push_back(ed); | 1023 external_decoders.push_back(ed); |
1024 | 1024 |
1025 Run(48000, PlatformChecksum("4ee2730fa1daae755e8a8fd3abd779ec", | 1025 Run(48000, PlatformChecksum("31343887b7ef70772df733d072b0dd00", |
1026 "aa7c232f63a67b2a72703593bdd172e0", | 1026 "f6893278d75dad42ac44bff77f674b33", |
1027 "0155665e93067c4e89256b944dd11999", | 1027 "71f89e87ee1bad594f529d6c036289ad", |
1028 "fc4f0da8844cd808d822bbddf3b9c285"), | 1028 "b64c891e99eccc9ff45541ef67c9e9bf"), |
1029 external_decoders); | 1029 external_decoders); |
1030 | 1030 |
1031 EXPECT_CALL(mock_decoder, Die()); | 1031 EXPECT_CALL(mock_decoder, Die()); |
1032 } | 1032 } |
1033 #endif | 1033 #endif |
1034 | 1034 |
1035 // This test verifies bit exactness for the send-side of ACM. The test setup is | 1035 // This test verifies bit exactness for the send-side of ACM. The test setup is |
1036 // a chain of three different test classes: | 1036 // a chain of three different test classes: |
1037 // | 1037 // |
1038 // test::AcmSendTest -> AcmSenderBitExactness -> test::AcmReceiveTest | 1038 // test::AcmSendTest -> AcmSenderBitExactness -> test::AcmReceiveTest |
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1777 Run(16000, 8000, 1000); | 1777 Run(16000, 8000, 1000); |
1778 } | 1778 } |
1779 | 1779 |
1780 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { | 1780 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { |
1781 Run(8000, 16000, 1000); | 1781 Run(8000, 16000, 1000); |
1782 } | 1782 } |
1783 | 1783 |
1784 #endif | 1784 #endif |
1785 | 1785 |
1786 } // namespace webrtc | 1786 } // namespace webrtc |
OLD | NEW |