Remove unused and not working voe_extended_test.
BUG=2913 R=henrikg@webrtc.org Review URL: https://webrtc-codereview.appspot.com/8439004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5533 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
5591046ab1
commit
67e70442b5
File diff suppressed because it is too large
Load Diff
@ -1,473 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_VOICE_ENGINE_VOE_EXTENDED_TEST_H
|
||||
#define WEBRTC_VOICE_ENGINE_VOE_EXTENDED_TEST_H
|
||||
|
||||
#include "webrtc/modules/audio_device/include/audio_device.h"
|
||||
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
|
||||
#include "webrtc/system_wrappers/interface/event_wrapper.h"
|
||||
#include "webrtc/system_wrappers/interface/ref_count.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/system_wrappers/interface/sleep.h"
|
||||
#include "webrtc/system_wrappers/interface/thread_wrapper.h"
|
||||
#include "webrtc/test/channel_transport/include/channel_transport.h"
|
||||
#include "webrtc/voice_engine/test/auto_test/voe_standard_test.h"
|
||||
|
||||
namespace voetest {
|
||||
|
||||
class VoETestManager;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// AudioDeviceModule
|
||||
//
|
||||
// Implementation of the ADM to be used as external ADM in VoiceEngine.
|
||||
// This implementation is only a mock class, i.e., it does not provide
|
||||
// any real audio support.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class AudioDeviceModuleImpl : public AudioDeviceModule {
|
||||
public:
|
||||
// Factory methods
|
||||
static AudioDeviceModuleImpl* Create();
|
||||
static bool Destroy(AudioDeviceModuleImpl* adm);
|
||||
|
||||
// Helper methods which allows us to get some handy information about
|
||||
// this mock implementation.
|
||||
int32_t ReferenceCounter() const {
|
||||
return _ref_count;
|
||||
}
|
||||
|
||||
// RefCountedModule implementation (mocks default implementation)
|
||||
virtual int32_t AddRef();
|
||||
virtual int32_t Release();
|
||||
|
||||
// Module implementation
|
||||
virtual int32_t Version(char* version,
|
||||
uint32_t& remaining_buffer_in_bytes,
|
||||
uint32_t& position) const {
|
||||
return 0;
|
||||
}
|
||||
virtual int32_t ChangeUniqueId(int32_t id) {
|
||||
return 0;
|
||||
}
|
||||
virtual int32_t TimeUntilNextProcess() {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t Process() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// AudioDeviceModule implementation
|
||||
virtual int32_t ActiveAudioLayer(AudioLayer* audioLayer) const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual ErrorCode LastError() const {
|
||||
return static_cast<ErrorCode> (0);
|
||||
}
|
||||
virtual int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual int32_t RegisterAudioCallback(AudioTransport* audioCallback) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual int32_t Init() {
|
||||
return 0;
|
||||
}
|
||||
virtual int32_t Terminate() {
|
||||
return 0;
|
||||
}
|
||||
virtual bool Initialized() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual int16_t PlayoutDevices() {
|
||||
return -1;
|
||||
}
|
||||
virtual int16_t RecordingDevices() {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t PlayoutDeviceName(uint16_t index,
|
||||
char name[kAdmMaxDeviceNameSize],
|
||||
char guid[kAdmMaxGuidSize]) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t RecordingDeviceName(uint16_t index,
|
||||
char name[kAdmMaxDeviceNameSize],
|
||||
char guid[kAdmMaxGuidSize]) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
virtual int32_t SetPlayoutDevice(uint16_t index) {
|
||||
return 0;
|
||||
}
|
||||
virtual int32_t SetPlayoutDevice(WindowsDeviceType device) {
|
||||
return 0;
|
||||
}
|
||||
virtual int32_t SetRecordingDevice(uint16_t index) {
|
||||
return 0;
|
||||
}
|
||||
virtual int32_t SetRecordingDevice(WindowsDeviceType device) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual int32_t PlayoutIsAvailable(bool* available) {
|
||||
*available = true;
|
||||
return 0;
|
||||
}
|
||||
virtual int32_t InitPlayout() {
|
||||
return 0;
|
||||
}
|
||||
virtual bool PlayoutIsInitialized() const {
|
||||
return true;
|
||||
}
|
||||
virtual int32_t RecordingIsAvailable(bool* available) {
|
||||
*available = true;
|
||||
return 0;
|
||||
}
|
||||
virtual int32_t InitRecording() {
|
||||
return 0;
|
||||
}
|
||||
virtual bool RecordingIsInitialized() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual int32_t StartPlayout() {
|
||||
return 0;
|
||||
}
|
||||
virtual int32_t StopPlayout() {
|
||||
return 0;
|
||||
}
|
||||
virtual bool Playing() const {
|
||||
return true;
|
||||
}
|
||||
virtual int32_t StartRecording() {
|
||||
return 0;
|
||||
}
|
||||
virtual int32_t StopRecording() {
|
||||
return 0;
|
||||
}
|
||||
virtual bool Recording() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual int32_t SetAGC(bool enable) {
|
||||
return -1;
|
||||
}
|
||||
virtual bool AGC() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual int32_t SetWaveOutVolume(uint16_t volumeLeft,
|
||||
uint16_t volumeRight) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t WaveOutVolume(uint16_t* volumeLeft,
|
||||
uint16_t* volumeRight) const {
|
||||
return -1;
|
||||
}
|
||||
|
||||
virtual int32_t SpeakerIsAvailable(bool* available) {
|
||||
*available = true;
|
||||
return 0;
|
||||
}
|
||||
virtual int32_t InitSpeaker() {
|
||||
return 0;
|
||||
}
|
||||
virtual bool SpeakerIsInitialized() const {
|
||||
return true;
|
||||
}
|
||||
virtual int32_t MicrophoneIsAvailable(bool* available) {
|
||||
*available = true;
|
||||
return 0;
|
||||
}
|
||||
virtual int32_t InitMicrophone() {
|
||||
return 0;
|
||||
}
|
||||
virtual bool MicrophoneIsInitialized() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual int32_t SpeakerVolumeIsAvailable(bool* available) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t SetSpeakerVolume(uint32_t volume) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t SpeakerVolume(uint32_t* volume) const {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t MaxSpeakerVolume(uint32_t* maxVolume) const {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t MinSpeakerVolume(uint32_t* minVolume) const {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t SpeakerVolumeStepSize(uint16_t* stepSize) const {
|
||||
return -1;
|
||||
}
|
||||
|
||||
virtual int32_t MicrophoneVolumeIsAvailable(bool* available) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t SetMicrophoneVolume(uint32_t volume) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t MicrophoneVolume(uint32_t* volume) const {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t MaxMicrophoneVolume(uint32_t* maxVolume) const {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t MinMicrophoneVolume(uint32_t* minVolume) const {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t MicrophoneVolumeStepSize(uint16_t* stepSize) const {
|
||||
return -1;
|
||||
}
|
||||
|
||||
virtual int32_t SpeakerMuteIsAvailable(bool* available) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t SetSpeakerMute(bool enable) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t SpeakerMute(bool* enabled) const {
|
||||
return -1;
|
||||
}
|
||||
|
||||
virtual int32_t MicrophoneMuteIsAvailable(bool* available) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t SetMicrophoneMute(bool enable) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t MicrophoneMute(bool* enabled) const {
|
||||
return -1;
|
||||
}
|
||||
|
||||
virtual int32_t MicrophoneBoostIsAvailable(bool* available) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t SetMicrophoneBoost(bool enable) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t MicrophoneBoost(bool* enabled) const {
|
||||
return -1;
|
||||
}
|
||||
|
||||
virtual int32_t StereoPlayoutIsAvailable(bool* available) const {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t SetStereoPlayout(bool enable) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t StereoPlayout(bool* enabled) const {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t StereoRecordingIsAvailable(bool* available) const {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t SetStereoRecording(bool enable) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t StereoRecording(bool* enabled) const {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t SetRecordingChannel(ChannelType channel) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t RecordingChannel(ChannelType* channel) const {
|
||||
return -1;
|
||||
}
|
||||
|
||||
virtual int32_t SetPlayoutBuffer(BufferType type, uint16_t sizeMS = 0) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t PlayoutBuffer(BufferType* type, uint16_t* sizeMS) const {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t PlayoutDelay(uint16_t* delayMS) const {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t RecordingDelay(uint16_t* delayMS) const {
|
||||
return -1;
|
||||
}
|
||||
|
||||
virtual int32_t CPULoad(uint16_t* load) const {
|
||||
return -1;
|
||||
}
|
||||
|
||||
virtual int32_t StartRawOutputFileRecording(
|
||||
const char pcmFileNameUTF8[kAdmMaxFileNameSize]) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t StopRawOutputFileRecording() {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t StartRawInputFileRecording(
|
||||
const char pcmFileNameUTF8[kAdmMaxFileNameSize]) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t StopRawInputFileRecording() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
virtual int32_t SetRecordingSampleRate(uint32_t samplesPerSec) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t RecordingSampleRate(uint32_t* samplesPerSec) const {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t SetPlayoutSampleRate(uint32_t samplesPerSec) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t PlayoutSampleRate(uint32_t* samplesPerSec) const {
|
||||
return -1;
|
||||
}
|
||||
|
||||
virtual int32_t ResetAudioDevice() {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t SetLoudspeakerStatus(bool enable) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t GetLoudspeakerStatus(bool* enabled) const {
|
||||
return -1;
|
||||
}
|
||||
|
||||
protected:
|
||||
AudioDeviceModuleImpl();
|
||||
~AudioDeviceModuleImpl();
|
||||
|
||||
private:
|
||||
volatile int32_t _ref_count;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Transport
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class ExtendedTestTransport : public Transport {
|
||||
public:
|
||||
ExtendedTestTransport(VoENetwork* ptr);
|
||||
~ExtendedTestTransport();
|
||||
VoENetwork* myNetw;
|
||||
|
||||
protected:
|
||||
virtual int SendPacket(int channel, const void *data, int len);
|
||||
virtual int SendRTCPPacket(int channel, const void *data, int len);
|
||||
|
||||
private:
|
||||
static bool Run(void* ptr);
|
||||
bool Process();
|
||||
|
||||
private:
|
||||
ThreadWrapper* _thread;
|
||||
CriticalSectionWrapper* _lock;
|
||||
EventWrapper* _event;
|
||||
|
||||
private:
|
||||
unsigned char _packetBuffer[1612];
|
||||
int _length;
|
||||
int _channel;
|
||||
};
|
||||
|
||||
class XTransport : public Transport {
|
||||
public:
|
||||
XTransport(VoENetwork* netw, VoEFile* file);
|
||||
VoENetwork* _netw;
|
||||
VoEFile* _file;
|
||||
|
||||
public:
|
||||
virtual int SendPacket(int channel, const void *data, int len);
|
||||
virtual int SendRTCPPacket(int channel, const void *data, int len);
|
||||
};
|
||||
|
||||
class XRTPObserver : public VoERTPObserver {
|
||||
public:
|
||||
XRTPObserver();
|
||||
~XRTPObserver();
|
||||
virtual void OnIncomingCSRCChanged(int channel,
|
||||
unsigned int CSRC,
|
||||
bool added);
|
||||
virtual void OnIncomingSSRCChanged(int channel,
|
||||
unsigned int SSRC);
|
||||
public:
|
||||
unsigned int _SSRC;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// VoEExtendedTest
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class VoEExtendedTest : public VoiceEngineObserver,
|
||||
public VoEConnectionObserver {
|
||||
public:
|
||||
VoEExtendedTest(VoETestManager& mgr);
|
||||
~VoEExtendedTest();
|
||||
int PrepareTest(const char* str) const;
|
||||
int TestPassed(const char* str) const;
|
||||
int TestBase();
|
||||
int TestCallReport();
|
||||
int TestCodec();
|
||||
int TestDtmf();
|
||||
int TestEncryption();
|
||||
int TestExternalMedia();
|
||||
int TestFile();
|
||||
int TestMixing();
|
||||
int TestHardware();
|
||||
int TestNetEqStats();
|
||||
int TestNetwork();
|
||||
int TestRTP_RTCP();
|
||||
int TestVideoSync();
|
||||
int TestVolumeControl();
|
||||
|
||||
int ErrorCode() const {
|
||||
return _errCode;
|
||||
}
|
||||
void ClearErrorCode() {
|
||||
_errCode = 0;
|
||||
}
|
||||
|
||||
protected:
|
||||
// from VoiceEngineObserver
|
||||
void CallbackOnError(int errCode, int channel);
|
||||
void CallbackOnTrace(TraceLevel level, const char* message,
|
||||
int length);
|
||||
|
||||
// from VoEConnectionObserver
|
||||
void OnPeriodicDeadOrAlive(int channel, bool alive);
|
||||
|
||||
private:
|
||||
void Play(int channel, unsigned int timeMillisec,
|
||||
bool addFileAsMicrophone = false, bool addTimeMarker = false);
|
||||
void Sleep(unsigned int timeMillisec, bool addMarker = false);
|
||||
void StartMedia(int channel, int rtpPort, bool listen, bool playout,
|
||||
bool send);
|
||||
void StopMedia(int channel);
|
||||
int RunMixingTest(int num_remote_channels, int num_local_channels,
|
||||
int16_t input_value, int16_t max_output_value,
|
||||
int16_t min_output_value);
|
||||
|
||||
VoETestManager& _mgr;
|
||||
int _errCode;
|
||||
bool _alive;
|
||||
bool _listening[32];
|
||||
scoped_ptr<webrtc::test::VoiceChannelTransport> voice_channel_transports_[32];
|
||||
bool _playing[32];
|
||||
bool _sending[32];
|
||||
};
|
||||
|
||||
} // namespace voetest
|
||||
#endif // WEBRTC_VOICE_ENGINE_VOE_EXTENDED_TEST_H
|
||||
@ -19,7 +19,6 @@
|
||||
#include "webrtc/voice_engine/include/voe_neteq_stats.h"
|
||||
#include "webrtc/voice_engine/test/auto_test/automated_mode.h"
|
||||
#include "webrtc/voice_engine/test/auto_test/voe_cpu_test.h"
|
||||
#include "webrtc/voice_engine/test/auto_test/voe_extended_test.h"
|
||||
#include "webrtc/voice_engine/test/auto_test/voe_stress_test.h"
|
||||
#include "webrtc/voice_engine/test/auto_test/voe_test_defines.h"
|
||||
#include "webrtc/voice_engine/test/auto_test/voe_unit_test.h"
|
||||
@ -103,151 +102,6 @@ void SubAPIManager::DisplayStatus() const {
|
||||
ANL();
|
||||
}
|
||||
|
||||
bool SubAPIManager::GetExtendedMenuSelection(ExtendedSelection& sel) {
|
||||
printf("------------------------------------------------\n");
|
||||
printf("Select extended test\n\n");
|
||||
printf(" (0) None\n");
|
||||
printf("- - - - - - - - - - - - - - - - - - - - - - - - \n");
|
||||
printf(" (1) Base");
|
||||
if (_base)
|
||||
printf("\n");
|
||||
else
|
||||
printf(" (NA)\n");
|
||||
printf(" (2) CallReport");
|
||||
if (_callReport)
|
||||
printf("\n");
|
||||
else
|
||||
printf(" (NA)\n");
|
||||
printf(" (3) Codec");
|
||||
if (_codec)
|
||||
printf("\n");
|
||||
else
|
||||
printf(" (NA)\n");
|
||||
printf(" (4) Dtmf");
|
||||
if (_dtmf)
|
||||
printf("\n");
|
||||
else
|
||||
printf(" (NA)\n");
|
||||
printf(" (5) Encryption");
|
||||
if (_encryption)
|
||||
printf("\n");
|
||||
else
|
||||
printf(" (NA)\n");
|
||||
printf(" (6) VoEExternalMedia");
|
||||
if (_externalMedia)
|
||||
printf("\n");
|
||||
else
|
||||
printf(" (NA)\n");
|
||||
printf(" (7) File");
|
||||
if (_file)
|
||||
printf("\n");
|
||||
else
|
||||
printf(" (NA)\n");
|
||||
printf(" (8) Hardware");
|
||||
if (_hardware)
|
||||
printf("\n");
|
||||
else
|
||||
printf(" (NA)\n");
|
||||
printf(" (9) NetEqStats");
|
||||
if (_netEqStats)
|
||||
printf("\n");
|
||||
else
|
||||
printf(" (NA)\n");
|
||||
printf(" (10) Network");
|
||||
if (_network)
|
||||
printf("\n");
|
||||
else
|
||||
printf(" (NA)\n");
|
||||
printf(" (11) RTP_RTCP");
|
||||
if (_rtp_rtcp)
|
||||
printf("\n");
|
||||
else
|
||||
printf(" (NA)\n");
|
||||
printf(" (12) VideoSync");
|
||||
if (_videoSync)
|
||||
printf("\n");
|
||||
else
|
||||
printf(" (NA)\n");
|
||||
printf(" (13) VolumeControl");
|
||||
if (_volumeControl)
|
||||
printf("\n");
|
||||
else
|
||||
printf(" (NA)\n");
|
||||
printf("\n: ");
|
||||
|
||||
ExtendedSelection xsel(XSEL_Invalid);
|
||||
int selection(0);
|
||||
dummy = scanf("%d", &selection);
|
||||
|
||||
switch (selection) {
|
||||
case 0:
|
||||
xsel = XSEL_None;
|
||||
break;
|
||||
case 1:
|
||||
if (_base)
|
||||
xsel = XSEL_Base;
|
||||
break;
|
||||
case 2:
|
||||
if (_callReport)
|
||||
xsel = XSEL_CallReport;
|
||||
break;
|
||||
case 3:
|
||||
if (_codec)
|
||||
xsel = XSEL_Codec;
|
||||
break;
|
||||
case 4:
|
||||
if (_dtmf)
|
||||
xsel = XSEL_DTMF;
|
||||
break;
|
||||
case 5:
|
||||
if (_encryption)
|
||||
xsel = XSEL_Encryption;
|
||||
break;
|
||||
case 6:
|
||||
if (_externalMedia)
|
||||
xsel = XSEL_ExternalMedia;
|
||||
break;
|
||||
case 7:
|
||||
if (_file)
|
||||
xsel = XSEL_File;
|
||||
break;
|
||||
case 8:
|
||||
if (_hardware)
|
||||
xsel = XSEL_Hardware;
|
||||
break;
|
||||
case 9:
|
||||
if (_netEqStats)
|
||||
xsel = XSEL_NetEqStats;
|
||||
break;
|
||||
case 10:
|
||||
if (_network)
|
||||
xsel = XSEL_Network;
|
||||
break;
|
||||
case 11:
|
||||
if (_rtp_rtcp)
|
||||
xsel = XSEL_RTP_RTCP;
|
||||
break;
|
||||
case 12:
|
||||
if (_videoSync)
|
||||
xsel = XSEL_VideoSync;
|
||||
break;
|
||||
case 13:
|
||||
if (_volumeControl)
|
||||
xsel = XSEL_VolumeControl;
|
||||
break;
|
||||
default:
|
||||
xsel = XSEL_Invalid;
|
||||
break;
|
||||
}
|
||||
if (xsel == XSEL_Invalid)
|
||||
printf("Invalid selection!\n");
|
||||
|
||||
sel = xsel;
|
||||
_xsel = xsel;
|
||||
|
||||
return (xsel != XSEL_Invalid);
|
||||
}
|
||||
|
||||
VoETestManager::VoETestManager()
|
||||
: initialized_(false),
|
||||
voice_engine_(NULL),
|
||||
@ -416,8 +270,7 @@ 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) {
|
||||
assert(test_type != Standard);
|
||||
|
||||
SubAPIManager api_manager;
|
||||
@ -432,80 +285,8 @@ int run_auto_test(TestType test_type,
|
||||
}
|
||||
test_manager.GetInterfaces();
|
||||
|
||||
int result(-1);
|
||||
if (test_type == Extended) {
|
||||
VoEExtendedTest xtend(test_manager);
|
||||
|
||||
result = 0;
|
||||
while (ext_selection != XSEL_None) {
|
||||
if (ext_selection == XSEL_Base || ext_selection == XSEL_All) {
|
||||
if ((result = xtend.TestBase()) == -1)
|
||||
break;
|
||||
xtend.TestPassed("Base");
|
||||
}
|
||||
if (ext_selection == XSEL_CallReport || ext_selection == XSEL_All) {
|
||||
if ((result = xtend.TestCallReport()) == -1)
|
||||
break;
|
||||
xtend.TestPassed("CallReport");
|
||||
}
|
||||
if (ext_selection == XSEL_Codec || ext_selection == XSEL_All) {
|
||||
if ((result = xtend.TestCodec()) == -1)
|
||||
break;
|
||||
xtend.TestPassed("Codec");
|
||||
}
|
||||
if (ext_selection == XSEL_DTMF || ext_selection == XSEL_All) {
|
||||
if ((result = xtend.TestDtmf()) == -1)
|
||||
break;
|
||||
xtend.TestPassed("Dtmf");
|
||||
}
|
||||
if (ext_selection == XSEL_Encryption || ext_selection == XSEL_All) {
|
||||
if ((result = xtend.TestEncryption()) == -1)
|
||||
break;
|
||||
xtend.TestPassed("Encryption");
|
||||
}
|
||||
if (ext_selection == XSEL_ExternalMedia || ext_selection == XSEL_All) {
|
||||
if ((result = xtend.TestExternalMedia()) == -1)
|
||||
break;
|
||||
xtend.TestPassed("ExternalMedia");
|
||||
}
|
||||
if (ext_selection == XSEL_File || ext_selection == XSEL_All) {
|
||||
if ((result = xtend.TestFile()) == -1)
|
||||
break;
|
||||
xtend.TestPassed("File");
|
||||
}
|
||||
if (ext_selection == XSEL_Hardware || ext_selection == XSEL_All) {
|
||||
if ((result = xtend.TestHardware()) == -1)
|
||||
break;
|
||||
xtend.TestPassed("Hardware");
|
||||
}
|
||||
if (ext_selection == XSEL_NetEqStats || ext_selection == XSEL_All) {
|
||||
if ((result = xtend.TestNetEqStats()) == -1)
|
||||
break;
|
||||
xtend.TestPassed("NetEqStats");
|
||||
}
|
||||
if (ext_selection == XSEL_Network || ext_selection == XSEL_All) {
|
||||
if ((result = xtend.TestNetwork()) == -1)
|
||||
break;
|
||||
xtend.TestPassed("Network");
|
||||
}
|
||||
if (ext_selection == XSEL_RTP_RTCP || ext_selection == XSEL_All) {
|
||||
if ((result = xtend.TestRTP_RTCP()) == -1)
|
||||
break;
|
||||
xtend.TestPassed("RTP_RTCP");
|
||||
}
|
||||
if (ext_selection == XSEL_VideoSync || ext_selection == XSEL_All) {
|
||||
if ((result = xtend.TestVideoSync()) == -1)
|
||||
break;
|
||||
xtend.TestPassed("VideoSync");
|
||||
}
|
||||
if (ext_selection == XSEL_VolumeControl || ext_selection == XSEL_All) {
|
||||
if ((result = xtend.TestVolumeControl()) == -1)
|
||||
break;
|
||||
xtend.TestPassed("VolumeControl");
|
||||
}
|
||||
api_manager.GetExtendedMenuSelection(ext_selection);
|
||||
} // while (extendedSel != XSEL_None)
|
||||
} else if (test_type == Stress) {
|
||||
int result = -1;
|
||||
if (test_type == Stress) {
|
||||
VoEStressTest stressTest(test_manager);
|
||||
result = stressTest.DoTest();
|
||||
} else if (test_type == Unit) {
|
||||
@ -544,7 +325,7 @@ int RunInManualMode() {
|
||||
printf("Select type of test\n\n");
|
||||
printf(" (0) Quit\n");
|
||||
printf(" (1) Standard test\n");
|
||||
printf(" (2) Extended test(s)...\n");
|
||||
printf(" (2) [OBSOLETE: Extended test(s)...]\n");
|
||||
printf(" (3) Stress test(s)...\n");
|
||||
printf(" (4) Unit test(s)...\n");
|
||||
printf(" (5) CPU & memory reference test [Windows]...\n");
|
||||
@ -553,9 +334,7 @@ int RunInManualMode() {
|
||||
int selection(0);
|
||||
dummy = scanf("%d", &selection);
|
||||
|
||||
ExtendedSelection ext_selection = XSEL_Invalid;
|
||||
TestType test_type = Invalid;
|
||||
|
||||
switch (selection) {
|
||||
case 0:
|
||||
return 0;
|
||||
@ -563,9 +342,6 @@ int RunInManualMode() {
|
||||
test_type = Standard;
|
||||
break;
|
||||
case 2:
|
||||
test_type = Extended;
|
||||
while (!api_manager.GetExtendedMenuSelection(ext_selection))
|
||||
continue;
|
||||
break;
|
||||
case 3:
|
||||
test_type = Stress;
|
||||
@ -589,7 +365,7 @@ int RunInManualMode() {
|
||||
}
|
||||
|
||||
// Function that can be called from other entry functions.
|
||||
return run_auto_test(test_type, ext_selection);
|
||||
return run_auto_test(test_type);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
@ -80,8 +80,7 @@ class SubAPIManager {
|
||||
_rtp_rtcp(false),
|
||||
_videoSync(false),
|
||||
_volumeControl(false),
|
||||
_apm(false),
|
||||
_xsel(XSEL_Invalid) {
|
||||
_apm(false) {
|
||||
#ifdef WEBRTC_VOICE_ENGINE_CALL_REPORT_API
|
||||
_callReport = true;
|
||||
#endif
|
||||
@ -122,13 +121,11 @@ class SubAPIManager {
|
||||
}
|
||||
|
||||
void DisplayStatus() const;
|
||||
bool GetExtendedMenuSelection(ExtendedSelection& sel);
|
||||
|
||||
private:
|
||||
bool _base, _callReport, _codec, _dtmf, _encryption;
|
||||
bool _externalMedia, _file, _hardware;
|
||||
bool _netEqStats, _network, _rtp_rtcp, _videoSync, _volumeControl, _apm;
|
||||
ExtendedSelection _xsel;
|
||||
};
|
||||
|
||||
class VoETestManager {
|
||||
|
||||
@ -23,31 +23,16 @@ using namespace webrtc;
|
||||
|
||||
// TestType enumerator
|
||||
enum TestType {
|
||||
Invalid = -1, Standard = 0, Extended = 1, Stress = 2, Unit = 3, CPU = 4
|
||||
};
|
||||
Invalid = -1,
|
||||
Standard = 0,
|
||||
|
||||
// ExtendedSelection enumerator
|
||||
enum ExtendedSelection {
|
||||
XSEL_Invalid = -1,
|
||||
XSEL_None = 0,
|
||||
XSEL_All,
|
||||
XSEL_Base,
|
||||
XSEL_CallReport,
|
||||
XSEL_Codec,
|
||||
XSEL_DTMF,
|
||||
XSEL_Encryption,
|
||||
XSEL_ExternalMedia,
|
||||
XSEL_File,
|
||||
XSEL_Hardware,
|
||||
XSEL_NetEqStats,
|
||||
XSEL_Network,
|
||||
XSEL_RTP_RTCP,
|
||||
XSEL_VideoSync,
|
||||
XSEL_VolumeControl,
|
||||
Stress = 2,
|
||||
Unit = 3,
|
||||
CPU = 4
|
||||
};
|
||||
|
||||
// Main test function
|
||||
int runAutoTest(TestType testType, ExtendedSelection extendedSel);
|
||||
int runAutoTest(TestType testType);
|
||||
|
||||
} // namespace voetest
|
||||
#endif // WEBRTC_VOICE_ENGINE_VOE_TEST_INTERFACE_H
|
||||
|
||||
@ -197,8 +197,6 @@
|
||||
'test/auto_test/resource_manager.cc',
|
||||
'test/auto_test/voe_cpu_test.cc',
|
||||
'test/auto_test/voe_cpu_test.h',
|
||||
'test/auto_test/voe_extended_test.cc',
|
||||
'test/auto_test/voe_extended_test.h',
|
||||
'test/auto_test/voe_standard_test.cc',
|
||||
'test/auto_test/voe_standard_test.h',
|
||||
'test/auto_test/voe_stress_test.cc',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user