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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 : AudioCodingModuleTestOldApi(), | 746 : AudioCodingModuleTestOldApi(), |
747 receive_thread_(CbReceiveThread, this, "receive"), | 747 receive_thread_(CbReceiveThread, this, "receive"), |
748 codec_registration_thread_(CbCodecRegistrationThread, | 748 codec_registration_thread_(CbCodecRegistrationThread, |
749 this, | 749 this, |
750 "codec_registration"), | 750 "codec_registration"), |
751 test_complete_(EventWrapper::Create()), | 751 test_complete_(EventWrapper::Create()), |
752 codec_registered_(false), | 752 codec_registered_(false), |
753 receive_packet_count_(0), | 753 receive_packet_count_(0), |
754 next_insert_packet_time_ms_(0), | 754 next_insert_packet_time_ms_(0), |
755 fake_clock_(new SimulatedClock(0)) { | 755 fake_clock_(new SimulatedClock(0)) { |
756 AudioEncoderIsac::Config config; | 756 AudioEncoderIsacFloatImpl::Config config; |
757 config.payload_type = kPayloadType; | 757 config.payload_type = kPayloadType; |
758 isac_encoder_.reset(new AudioEncoderIsac(config)); | 758 isac_encoder_.reset(new AudioEncoderIsacFloatImpl(config)); |
759 clock_ = fake_clock_.get(); | 759 clock_ = fake_clock_.get(); |
760 } | 760 } |
761 | 761 |
762 void SetUp() override { | 762 void SetUp() override { |
763 AudioCodingModuleTestOldApi::SetUp(); | 763 AudioCodingModuleTestOldApi::SetUp(); |
764 // Set up input audio source to read from specified file, loop after 5 | 764 // Set up input audio source to read from specified file, loop after 5 |
765 // seconds, and deliver blocks of 10 ms. | 765 // seconds, and deliver blocks of 10 ms. |
766 const std::string input_file_name = | 766 const std::string input_file_name = |
767 webrtc::test::ResourcePath("audio_coding/speech_mono_16kHz", "pcm"); | 767 webrtc::test::ResourcePath("audio_coding/speech_mono_16kHz", "pcm"); |
768 audio_loop_.Init(input_file_name, 5 * kSampleRateHz, kNumSamples10ms); | 768 audio_loop_.Init(input_file_name, 5 * kSampleRateHz, kNumSamples10ms); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 return true; | 875 return true; |
876 } | 876 } |
877 | 877 |
878 rtc::PlatformThread receive_thread_; | 878 rtc::PlatformThread receive_thread_; |
879 rtc::PlatformThread codec_registration_thread_; | 879 rtc::PlatformThread codec_registration_thread_; |
880 const std::unique_ptr<EventWrapper> test_complete_; | 880 const std::unique_ptr<EventWrapper> test_complete_; |
881 rtc::CriticalSection crit_sect_; | 881 rtc::CriticalSection crit_sect_; |
882 bool codec_registered_ GUARDED_BY(crit_sect_); | 882 bool codec_registered_ GUARDED_BY(crit_sect_); |
883 int receive_packet_count_ GUARDED_BY(crit_sect_); | 883 int receive_packet_count_ GUARDED_BY(crit_sect_); |
884 int64_t next_insert_packet_time_ms_ GUARDED_BY(crit_sect_); | 884 int64_t next_insert_packet_time_ms_ GUARDED_BY(crit_sect_); |
885 std::unique_ptr<AudioEncoderIsac> isac_encoder_; | 885 std::unique_ptr<AudioEncoderIsacFloatImpl> isac_encoder_; |
886 std::unique_ptr<SimulatedClock> fake_clock_; | 886 std::unique_ptr<SimulatedClock> fake_clock_; |
887 test::AudioLoop audio_loop_; | 887 test::AudioLoop audio_loop_; |
888 }; | 888 }; |
889 | 889 |
890 #if defined(WEBRTC_IOS) | 890 #if defined(WEBRTC_IOS) |
891 #define MAYBE_DoTest DISABLED_DoTest | 891 #define MAYBE_DoTest DISABLED_DoTest |
892 #else | 892 #else |
893 #define MAYBE_DoTest DoTest | 893 #define MAYBE_DoTest DoTest |
894 #endif | 894 #endif |
895 #if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX) | 895 #if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX) |
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1956 Run(16000, 8000, 1000); | 1956 Run(16000, 8000, 1000); |
1957 } | 1957 } |
1958 | 1958 |
1959 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { | 1959 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { |
1960 Run(8000, 16000, 1000); | 1960 Run(8000, 16000, 1000); |
1961 } | 1961 } |
1962 | 1962 |
1963 #endif | 1963 #endif |
1964 | 1964 |
1965 } // namespace webrtc | 1965 } // namespace webrtc |
OLD | NEW |