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 921 matching lines...) Loading... |
932 EXPECT_EQ(checksum_ref, checksum_string); | 932 EXPECT_EQ(checksum_ref, checksum_string); |
933 | 933 |
934 // Delete the output file. | 934 // Delete the output file. |
935 remove(output_file_name.c_str()); | 935 remove(output_file_name.c_str()); |
936 } | 936 } |
937 }; | 937 }; |
938 | 938 |
939 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \ | 939 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \ |
940 defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722) | 940 defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722) |
941 TEST_F(AcmReceiverBitExactnessOldApi, 8kHzOutput) { | 941 TEST_F(AcmReceiverBitExactnessOldApi, 8kHzOutput) { |
942 Run(8000, PlatformChecksum("f34e5c0e4dd4cd6c82b23f6ed006dad0", | 942 Run(8000, PlatformChecksum("90be25dd9505005aaadf91b77ee31624", |
943 "67a1471049dc87e7498bc19bf130dd35", | 943 "ac6dc4b5bf6d277f693889c4c916882e", |
944 "efb5a07480bad8afb184c4150f4b3f3a", | 944 "a607f7d0ba98683c9c236217f86aaa6b", |
945 "51717ab374871cbfa2c6977ea2aa40f3"), | 945 "4a54f6ec712bda58484a388e1a332b42"), |
946 std::vector<ExternalDecoder>()); | 946 std::vector<ExternalDecoder>()); |
947 } | 947 } |
948 | 948 |
949 TEST_F(AcmReceiverBitExactnessOldApi, 16kHzOutput) { | 949 TEST_F(AcmReceiverBitExactnessOldApi, 16kHzOutput) { |
950 Run(16000, PlatformChecksum("5066b412805f3050f65154d676006964", | 950 Run(16000, PlatformChecksum("2c713197d41becd52c1ceecbd2b9f687", |
951 "887905a40d37f213b76f64296871473e", | 951 "130cc2a43063c74197122e3760690e7d", |
952 "f580bfd4e5e29f0399b61b7512d4e3b4", | 952 "cdc3d88f6d8e497d4e00c62c0e6dbb3c", |
953 "5b2ae32c590b41d0c601179e14eaae96"), | 953 "83edb67c157d0e3a0fb9f7d7b1ce5dc7"), |
954 std::vector<ExternalDecoder>()); | 954 std::vector<ExternalDecoder>()); |
955 } | 955 } |
956 | 956 |
957 TEST_F(AcmReceiverBitExactnessOldApi, 32kHzOutput) { | 957 TEST_F(AcmReceiverBitExactnessOldApi, 32kHzOutput) { |
958 Run(32000, PlatformChecksum("2cb4784af507c45b9121e2315def36f2", | 958 Run(32000, PlatformChecksum("fe5851d43c13df66a7ad30fdb124e62f", |
959 "d2392b3247095d894a49b74a1106f281", | 959 "309d24be4b287dc92c340f10a807a11e", |
960 "fdf5166b98c43235978685e40e28fea6", | 960 "c4a0e0b2e031d62c693af2a9ff4337ac", |
961 "7f620312f2fa74a10048bbb7739d4bf3"), | 961 "4cbfc6ab4d704f5d9b4f10406437fda9"), |
962 std::vector<ExternalDecoder>()); | 962 std::vector<ExternalDecoder>()); |
963 } | 963 } |
964 | 964 |
965 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutput) { | 965 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutput) { |
966 Run(48000, PlatformChecksum("ce63f874a198621fa35398e412640fcf", | 966 Run(48000, PlatformChecksum("a9241f426b4bf2ac650b6d287469a550", |
967 "2cf0b8fe9784e8c96db307e125beb723", | 967 "30374fd4a932df942c1b1120e7b724ad", |
968 "71f89e87ee1bad594f529d6c036289ad", | 968 "22242dd832824046d48db9ea8a01f84c", |
969 "b64c891e99eccc9ff45541ef67c9e9bf"), | 969 "c7f46bf165400b266d9b57aee02d2747"), |
970 std::vector<ExternalDecoder>()); | 970 std::vector<ExternalDecoder>()); |
971 } | 971 } |
972 | 972 |
973 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutputExternalDecoder) { | 973 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutputExternalDecoder) { |
974 // Class intended to forward a call from a mock DecodeInternal to Decode on | 974 // Class intended to forward a call from a mock DecodeInternal to Decode on |
975 // the real decoder's Decode. DecodeInternal for the real decoder isn't | 975 // the real decoder's Decode. DecodeInternal for the real decoder isn't |
976 // public. | 976 // public. |
977 class DecodeForwarder { | 977 class DecodeForwarder { |
978 public: | 978 public: |
979 DecodeForwarder(AudioDecoder* decoder) : decoder_(decoder) {} | 979 DecodeForwarder(AudioDecoder* decoder) : decoder_(decoder) {} |
(...skipping 34 matching lines...) Loading... |
1014 .WillRepeatedly(Invoke(&decoder, &AudioDecoderPcmU::PacketDuration)); | 1014 .WillRepeatedly(Invoke(&decoder, &AudioDecoderPcmU::PacketDuration)); |
1015 ExternalDecoder ed; | 1015 ExternalDecoder ed; |
1016 ed.rtp_payload_type = 0; | 1016 ed.rtp_payload_type = 0; |
1017 ed.external_decoder = &mock_decoder; | 1017 ed.external_decoder = &mock_decoder; |
1018 ed.sample_rate_hz = 8000; | 1018 ed.sample_rate_hz = 8000; |
1019 ed.num_channels = 1; | 1019 ed.num_channels = 1; |
1020 ed.name = "MockPCMU"; | 1020 ed.name = "MockPCMU"; |
1021 std::vector<ExternalDecoder> external_decoders; | 1021 std::vector<ExternalDecoder> external_decoders; |
1022 external_decoders.push_back(ed); | 1022 external_decoders.push_back(ed); |
1023 | 1023 |
1024 Run(48000, PlatformChecksum("ce63f874a198621fa35398e412640fcf", | 1024 Run(48000, PlatformChecksum("a9241f426b4bf2ac650b6d287469a550", |
1025 "2cf0b8fe9784e8c96db307e125beb723", | 1025 "30374fd4a932df942c1b1120e7b724ad", |
1026 "71f89e87ee1bad594f529d6c036289ad", | 1026 "22242dd832824046d48db9ea8a01f84c", |
1027 "b64c891e99eccc9ff45541ef67c9e9bf"), | 1027 "c7f46bf165400b266d9b57aee02d2747"), |
1028 external_decoders); | 1028 external_decoders); |
1029 | 1029 |
1030 EXPECT_CALL(mock_decoder, Die()); | 1030 EXPECT_CALL(mock_decoder, Die()); |
1031 } | 1031 } |
1032 #endif | 1032 #endif |
1033 | 1033 |
1034 // This test verifies bit exactness for the send-side of ACM. The test setup is | 1034 // This test verifies bit exactness for the send-side of ACM. The test setup is |
1035 // a chain of three different test classes: | 1035 // a chain of three different test classes: |
1036 // | 1036 // |
1037 // test::AcmSendTest -> AcmSenderBitExactness -> test::AcmReceiveTest | 1037 // test::AcmSendTest -> AcmSenderBitExactness -> test::AcmReceiveTest |
(...skipping 741 matching lines...) Loading... |
1779 Run(16000, 8000, 1000); | 1779 Run(16000, 8000, 1000); |
1780 } | 1780 } |
1781 | 1781 |
1782 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { | 1782 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { |
1783 Run(8000, 16000, 1000); | 1783 Run(8000, 16000, 1000); |
1784 } | 1784 } |
1785 | 1785 |
1786 #endif | 1786 #endif |
1787 | 1787 |
1788 } // namespace webrtc | 1788 } // namespace webrtc |
OLD | NEW |