Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: webrtc/modules/audio_coding/acm2/audio_coding_module_unittest.cc

Issue 2996593002: Give Audio{De,En}coderIsac* an "Impl" suffix, to free up the original names (Closed)
Patch Set: rebase Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/acm2/rent_a_codec.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/acm2/rent_a_codec.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698