| 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 |
| 11 #include <stdio.h> | 11 #include <stdio.h> |
| 12 #include <string.h> | 12 #include <string.h> |
| 13 #include <memory> | 13 #include <memory> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "webrtc/api/audio_codecs/audio_encoder.h" |
| 16 #include "webrtc/api/audio_codecs/builtin_audio_decoder_factory.h" | 17 #include "webrtc/api/audio_codecs/builtin_audio_decoder_factory.h" |
| 17 #include "webrtc/base/criticalsection.h" | 18 #include "webrtc/base/criticalsection.h" |
| 18 #include "webrtc/base/md5digest.h" | 19 #include "webrtc/base/md5digest.h" |
| 19 #include "webrtc/base/platform_thread.h" | 20 #include "webrtc/base/platform_thread.h" |
| 20 #include "webrtc/base/thread_annotations.h" | 21 #include "webrtc/base/thread_annotations.h" |
| 21 #include "webrtc/modules/audio_coding/acm2/acm_receive_test.h" | 22 #include "webrtc/modules/audio_coding/acm2/acm_receive_test.h" |
| 22 #include "webrtc/modules/audio_coding/acm2/acm_send_test.h" | 23 #include "webrtc/modules/audio_coding/acm2/acm_send_test.h" |
| 23 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h" | |
| 24 #include "webrtc/modules/audio_coding/codecs/audio_format_conversion.h" | 24 #include "webrtc/modules/audio_coding/codecs/audio_format_conversion.h" |
| 25 #include "webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.h" | 25 #include "webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.h" |
| 26 #include "webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h" | 26 #include "webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h" |
| 27 #include "webrtc/modules/audio_coding/codecs/isac/main/include/audio_encoder_isa
c.h" | 27 #include "webrtc/modules/audio_coding/codecs/isac/main/include/audio_encoder_isa
c.h" |
| 28 #include "webrtc/modules/audio_coding/codecs/mock/mock_audio_encoder.h" | |
| 29 #include "webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h" | 28 #include "webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h" |
| 30 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" | 29 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" |
| 31 #include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h" | 30 #include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h" |
| 32 #include "webrtc/modules/audio_coding/neteq/audio_decoder_impl.h" | 31 #include "webrtc/modules/audio_coding/neteq/audio_decoder_impl.h" |
| 33 #include "webrtc/modules/audio_coding/neteq/tools/audio_checksum.h" | 32 #include "webrtc/modules/audio_coding/neteq/tools/audio_checksum.h" |
| 34 #include "webrtc/modules/audio_coding/neteq/tools/audio_loop.h" | 33 #include "webrtc/modules/audio_coding/neteq/tools/audio_loop.h" |
| 35 #include "webrtc/modules/audio_coding/neteq/tools/constant_pcm_packet_source.h" | 34 #include "webrtc/modules/audio_coding/neteq/tools/constant_pcm_packet_source.h" |
| 36 #include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h" | 35 #include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h" |
| 37 #include "webrtc/modules/audio_coding/neteq/tools/output_audio_file.h" | 36 #include "webrtc/modules/audio_coding/neteq/tools/output_audio_file.h" |
| 38 #include "webrtc/modules/audio_coding/neteq/tools/output_wav_file.h" | 37 #include "webrtc/modules/audio_coding/neteq/tools/output_wav_file.h" |
| 39 #include "webrtc/modules/audio_coding/neteq/tools/packet.h" | 38 #include "webrtc/modules/audio_coding/neteq/tools/packet.h" |
| 40 #include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h" | 39 #include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h" |
| 41 #include "webrtc/modules/include/module_common_types.h" | 40 #include "webrtc/modules/include/module_common_types.h" |
| 42 #include "webrtc/system_wrappers/include/clock.h" | 41 #include "webrtc/system_wrappers/include/clock.h" |
| 43 #include "webrtc/system_wrappers/include/event_wrapper.h" | 42 #include "webrtc/system_wrappers/include/event_wrapper.h" |
| 44 #include "webrtc/system_wrappers/include/sleep.h" | 43 #include "webrtc/system_wrappers/include/sleep.h" |
| 45 #include "webrtc/test/gtest.h" | 44 #include "webrtc/test/gtest.h" |
| 46 #include "webrtc/test/mock_audio_decoder.h" | 45 #include "webrtc/test/mock_audio_decoder.h" |
| 46 #include "webrtc/test/mock_audio_encoder.h" |
| 47 #include "webrtc/test/testsupport/fileutils.h" | 47 #include "webrtc/test/testsupport/fileutils.h" |
| 48 | 48 |
| 49 using ::testing::AtLeast; | 49 using ::testing::AtLeast; |
| 50 using ::testing::Invoke; | 50 using ::testing::Invoke; |
| 51 using ::testing::_; | 51 using ::testing::_; |
| 52 | 52 |
| 53 namespace webrtc { | 53 namespace webrtc { |
| 54 | 54 |
| 55 namespace { | 55 namespace { |
| 56 const int kSampleRateHz = 16000; | 56 const int kSampleRateHz = 16000; |
| (...skipping 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1981 Run(16000, 8000, 1000); | 1981 Run(16000, 8000, 1000); |
| 1982 } | 1982 } |
| 1983 | 1983 |
| 1984 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { | 1984 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { |
| 1985 Run(8000, 16000, 1000); | 1985 Run(8000, 16000, 1000); |
| 1986 } | 1986 } |
| 1987 | 1987 |
| 1988 #endif | 1988 #endif |
| 1989 | 1989 |
| 1990 } // namespace webrtc | 1990 } // namespace webrtc |
| OLD | NEW |