From 26e2b687fcf4fe811e67d29ee1b5b53a716c6836 Mon Sep 17 00:00:00 2001 From: "henrik.lundin@webrtc.org" Date: Wed, 23 Apr 2014 08:39:41 +0000 Subject: [PATCH] Remove ACM1/ACM2 switching from VoiceEngine tests The option to run VoiceEngine tests with both ACM1 and ACM2 was introduced while the two versions of AudioCoding module where both in use. Now, ACM1 is being deprecated, and the tests should use the defualt one (ACM2). BUG=2996 R=henrika@webrtc.org Review URL: https://webrtc-codereview.appspot.com/12309004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5964 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../fixtures/before_initialization_fixture.cc | 13 ++----------- .../test/auto_test/voe_standard_test.cc | 11 ++--------- .../voice_engine/test/auto_test/voe_standard_test.h | 3 --- webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc | 13 +------------ 4 files changed, 5 insertions(+), 35 deletions(-) diff --git a/webrtc/voice_engine/test/auto_test/fixtures/before_initialization_fixture.cc b/webrtc/voice_engine/test/auto_test/fixtures/before_initialization_fixture.cc index ebb874e790..408ebf959d 100644 --- a/webrtc/voice_engine/test/auto_test/fixtures/before_initialization_fixture.cc +++ b/webrtc/voice_engine/test/auto_test/fixtures/before_initialization_fixture.cc @@ -10,19 +10,10 @@ #include "webrtc/voice_engine/test/auto_test/fixtures/before_initialization_fixture.h" -#include "gflags/gflags.h" -#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h" #include "webrtc/system_wrappers/interface/sleep.h" -DECLARE_bool(use_acm_version_2); - -BeforeInitializationFixture::BeforeInitializationFixture() { - // TODO(minyue): Remove when the old ACM is removed (latest 2014-04-01). - config_.Set(FLAGS_use_acm_version_2 ? - new webrtc::NewAudioCodingModuleFactory() : - new webrtc::AudioCodingModuleFactory()); - voice_engine_ = webrtc::VoiceEngine::Create(config_); - +BeforeInitializationFixture::BeforeInitializationFixture() + : voice_engine_(webrtc::VoiceEngine::Create()) { EXPECT_TRUE(voice_engine_ != NULL); voe_base_ = webrtc::VoEBase::GetInterface(voice_engine_); diff --git a/webrtc/voice_engine/test/auto_test/voe_standard_test.cc b/webrtc/voice_engine/test/auto_test/voe_standard_test.cc index 53614458f8..944f3b10c2 100644 --- a/webrtc/voice_engine/test/auto_test/voe_standard_test.cc +++ b/webrtc/voice_engine/test/auto_test/voe_standard_test.cc @@ -10,11 +10,11 @@ #include "webrtc/voice_engine/test/auto_test/voe_standard_test.h" +#include #include #include #include "webrtc/engine_configurations.h" -#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h" #include "webrtc/system_wrappers/interface/event_wrapper.h" #include "webrtc/voice_engine/include/voe_neteq_stats.h" #include "webrtc/voice_engine/test/auto_test/automated_mode.h" @@ -29,8 +29,6 @@ DEFINE_bool(include_timing_dependent_tests, true, DEFINE_bool(automated, false, "If true, we'll run the automated tests we have in noninteractive " "mode."); -DEFINE_bool(use_acm_version_2, false, - "If true, we'll run the tests with Audio Coding Module version 2."); using namespace webrtc; @@ -127,12 +125,7 @@ bool VoETestManager::Init() { return false; } - // TODO(minyue): Remove when the old ACM is removed (latest 2014-04-01). - config_.Set(FLAGS_use_acm_version_2 ? - new NewAudioCodingModuleFactory() : - new AudioCodingModuleFactory()); - voice_engine_ = VoiceEngine::Create(config_); - + voice_engine_ = VoiceEngine::Create(); if (!voice_engine_) { TEST_LOG("Failed to create VoiceEngine\n"); return false; diff --git a/webrtc/voice_engine/test/auto_test/voe_standard_test.h b/webrtc/voice_engine/test/auto_test/voe_standard_test.h index 566014dbd0..3bf89362d5 100644 --- a/webrtc/voice_engine/test/auto_test/voe_standard_test.h +++ b/webrtc/voice_engine/test/auto_test/voe_standard_test.h @@ -15,7 +15,6 @@ #include #include "gflags/gflags.h" -#include "webrtc/common.h" #include "webrtc/voice_engine/include/voe_audio_processing.h" #include "webrtc/voice_engine/include/voe_base.h" #include "webrtc/voice_engine/include/voe_dtmf.h" @@ -201,8 +200,6 @@ class VoETestManager { VoEAudioProcessing* voe_apm_; ResourceManager resource_manager_; - - Config config_; }; } // namespace voetest diff --git a/webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc b/webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc index 1d13a82769..4f6f13212c 100644 --- a/webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc +++ b/webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc @@ -19,10 +19,7 @@ #include "gflags/gflags.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webrtc/common.h" -#include "webrtc/common_types.h" #include "webrtc/engine_configurations.h" -#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h" #include "webrtc/modules/audio_processing/include/audio_processing.h" #include "webrtc/system_wrappers/interface/scoped_ptr.h" #include "webrtc/test/channel_transport/include/channel_transport.h" @@ -42,8 +39,6 @@ #include "webrtc/voice_engine/include/voe_video_sync.h" #include "webrtc/voice_engine/include/voe_volume_control.h" -DEFINE_bool(use_acm_version_1, false, - "If true, we'll run the tests with Audio Coding Module version 2."); DEFINE_bool(use_log_file, false, "Output logs to a file; by default they will be printed to stderr."); @@ -129,13 +124,7 @@ int main(int argc, char** argv) { printf("Test started \n"); - // TODO(minyue): Remove when the old ACM is removed. - Config config; - config.Set(FLAGS_use_acm_version_1 ? - new AudioCodingModuleFactory() : - new NewAudioCodingModuleFactory()); - m_voe = VoiceEngine::Create(config); - + m_voe = VoiceEngine::Create(); base1 = VoEBase::GetInterface(m_voe); codec = VoECodec::GetInterface(m_voe); apm = VoEAudioProcessing::GetInterface(m_voe);