1. adding request of ACM version in the manual mode of voe_auto_test
2. adding command line flag for automated mode of voe_auto_test to choose between ACMs 3. adding request of ACM version in voe_cmd_test R=phoglund@webrtc.org, xians@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2281004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4877 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
a20a22a0bd
commit
cc92e000f3
@ -10,10 +10,19 @@
|
||||
|
||||
#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"
|
||||
|
||||
BeforeInitializationFixture::BeforeInitializationFixture()
|
||||
: voice_engine_(webrtc::VoiceEngine::Create()) {
|
||||
DECLARE_bool(use_acm_version_2);
|
||||
|
||||
BeforeInitializationFixture::BeforeInitializationFixture() {
|
||||
// TODO(minyue): Remove when the old ACM is removed (latest 2014-04-01).
|
||||
config_.Set<webrtc::AudioCodingModuleFactory>(FLAGS_use_acm_version_2 ?
|
||||
new webrtc::NewAudioCodingModuleFactory() :
|
||||
new webrtc::AudioCodingModuleFactory());
|
||||
voice_engine_ = webrtc::VoiceEngine::Create(config_);
|
||||
|
||||
EXPECT_TRUE(voice_engine_ != NULL);
|
||||
|
||||
voe_base_ = webrtc::VoEBase::GetInterface(voice_engine_);
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "webrtc/common.h"
|
||||
#include "webrtc/common_types.h"
|
||||
#include "webrtc/engine_configurations.h"
|
||||
#include "webrtc/test/testsupport/gtest_disable.h"
|
||||
@ -71,6 +72,7 @@ class BeforeInitializationFixture : public testing::Test {
|
||||
webrtc::VoEExternalMedia* voe_xmedia_;
|
||||
webrtc::VoECallReport* voe_call_report_;
|
||||
webrtc::VoENetEqStats* voe_neteq_stats_;
|
||||
webrtc::Config config_;
|
||||
};
|
||||
|
||||
#endif // SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_TEST_BASE_H_
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#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"
|
||||
@ -30,6 +31,8 @@ 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;
|
||||
|
||||
@ -263,8 +266,7 @@ VoETestManager::VoETestManager()
|
||||
voe_rtp_rtcp_(0),
|
||||
voe_vsync_(0),
|
||||
voe_volume_control_(0),
|
||||
voe_apm_(0)
|
||||
{
|
||||
voe_apm_(0) {
|
||||
}
|
||||
|
||||
VoETestManager::~VoETestManager() {
|
||||
@ -282,7 +284,12 @@ bool VoETestManager::Init() {
|
||||
return false;
|
||||
}
|
||||
|
||||
voice_engine_ = VoiceEngine::Create();
|
||||
// TODO(minyue): Remove when the old ACM is removed (latest 2014-04-01).
|
||||
config_.Set<AudioCodingModuleFactory>(FLAGS_use_acm_version_2 ?
|
||||
new NewAudioCodingModuleFactory() :
|
||||
new AudioCodingModuleFactory());
|
||||
voice_engine_ = VoiceEngine::Create(config_);
|
||||
|
||||
if (!voice_engine_) {
|
||||
TEST_LOG("Failed to create VoiceEngine\n");
|
||||
return false;
|
||||
@ -409,7 +416,8 @@ int VoETestManager::ReleaseInterfaces() {
|
||||
return (releaseOK == true) ? 0 : -1;
|
||||
}
|
||||
|
||||
int run_auto_test(TestType test_type, ExtendedSelection ext_selection) {
|
||||
int run_auto_test(TestType test_type,
|
||||
ExtendedSelection ext_selection) {
|
||||
assert(test_type != Standard);
|
||||
|
||||
SubAPIManager api_manager;
|
||||
@ -543,7 +551,6 @@ int RunInManualMode() {
|
||||
printf("\n: ");
|
||||
|
||||
int selection(0);
|
||||
|
||||
dummy = scanf("%d", &selection);
|
||||
|
||||
ExtendedSelection ext_selection = XSEL_Invalid;
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <string>
|
||||
|
||||
#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"
|
||||
@ -227,6 +228,8 @@ class VoETestManager {
|
||||
VoEAudioProcessing* voe_apm_;
|
||||
|
||||
ResourceManager resource_manager_;
|
||||
|
||||
Config config_;
|
||||
};
|
||||
|
||||
} // namespace voetest
|
||||
|
@ -17,8 +17,12 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#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/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/test/channel_transport/include/channel_transport.h"
|
||||
#include "webrtc/test/testsupport/fileutils.h"
|
||||
@ -37,6 +41,9 @@
|
||||
#include "webrtc/voice_engine/include/voe_video_sync.h"
|
||||
#include "webrtc/voice_engine/include/voe_volume_control.h"
|
||||
|
||||
DEFINE_bool(use_acm_version_2, false,
|
||||
"If true, we'll run the tests with Audio Coding Module version 2.");
|
||||
|
||||
using namespace webrtc;
|
||||
using namespace test;
|
||||
|
||||
@ -111,12 +118,20 @@ void PrintCodecs(bool opus_stereo) {
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
|
||||
int res = 0;
|
||||
|
||||
printf("Test started \n");
|
||||
|
||||
m_voe = VoiceEngine::Create();
|
||||
// TODO(minyue): Remove when the old ACM is removed (latest 2014-04-01).
|
||||
Config config;
|
||||
config.Set<AudioCodingModuleFactory>(FLAGS_use_acm_version_2 ?
|
||||
new NewAudioCodingModuleFactory() :
|
||||
new AudioCodingModuleFactory());
|
||||
m_voe = VoiceEngine::Create(config);
|
||||
|
||||
base1 = VoEBase::GetInterface(m_voe);
|
||||
codec = VoECodec::GetInterface(m_voe);
|
||||
apm = VoEAudioProcessing::GetInterface(m_voe);
|
||||
|
@ -227,6 +227,7 @@
|
||||
'dependencies': [
|
||||
'voice_engine',
|
||||
'<(DEPTH)/testing/gtest.gyp:gtest',
|
||||
'<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
|
||||
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
|
||||
'<(webrtc_root)/test/test.gyp:channel_transport',
|
||||
'<(webrtc_root)/test/test.gyp:test_support',
|
||||
|
Loading…
x
Reference in New Issue
Block a user