2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
11 #ifndef WEBRTC_VOICE_ENGINE_VOE_STANDARD_TEST_H
12 #define WEBRTC_VOICE_ENGINE_VOE_STANDARD_TEST_H
17 #include "gflags/gflags.h"
18 #include "webrtc/common.h"
19 #include "webrtc/voice_engine/include/voe_audio_processing.h"
20 #include "webrtc/voice_engine/include/voe_base.h"
21 #include "webrtc/voice_engine/include/voe_dtmf.h"
22 #include "webrtc/voice_engine/include/voe_errors.h"
23 #include "webrtc/voice_engine/include/voe_file.h"
24 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h"
25 #include "webrtc/voice_engine/test/auto_test/resource_manager.h"
26 #include "webrtc/voice_engine/test/auto_test/voe_test_common.h"
27 #include "webrtc/voice_engine/test/auto_test/voe_test_interface.h"
28 #ifdef WEBRTC_VOICE_ENGINE_CALL_REPORT_API
29 #include "webrtc/voice_engine/include/voe_call_report.h"
31 #ifdef WEBRTC_VOICE_ENGINE_CODEC_API
32 #include "webrtc/voice_engine/include/voe_codec.h"
34 #ifdef WEBRTC_VOICE_ENGINE_ENCRYPTION_API
35 #include "webrtc/voice_engine/include/voe_encryption.h"
37 #ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API
38 #include "webrtc/voice_engine/include/voe_external_media.h"
40 #ifdef WEBRTC_VOICE_ENGINE_HARDWARE_API
41 #include "webrtc/voice_engine/include/voe_hardware.h"
43 #include "webrtc/voice_engine/include/voe_network.h"
44 #ifdef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API
45 #include "webrtc/voice_engine/include/voe_video_sync.h"
47 #ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API
48 #include "webrtc/voice_engine/include/voe_volume_control.h"
51 #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API
53 class CriticalSectionWrapper;
59 #if defined(WEBRTC_ANDROID)
60 extern char mobileLogMsg[640];
63 DECLARE_bool(include_timing_dependent_tests);
75 _externalMedia(false),
82 _volumeControl(false),
84 #ifdef WEBRTC_VOICE_ENGINE_CALL_REPORT_API
87 #ifdef WEBRTC_VOICE_ENGINE_CODEC_API
90 #ifdef WEBRTC_VOICE_ENGINE_DTMF_API
93 #ifdef WEBRTC_VOICE_ENGINE_ENCRYPTION_API
96 #ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API
97 _externalMedia = true;
99 #ifdef WEBRTC_VOICE_ENGINE_FILE_API
102 #ifdef WEBRTC_VOICE_ENGINE_HARDWARE_API
105 #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API
109 #ifdef WEBRTC_VOICE_ENGINE_RTP_RTCP_API
112 #ifdef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API
115 #ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API
116 _volumeControl = true;
118 #ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API
123 void DisplayStatus() const;
126 bool _base, _callReport, _codec, _dtmf, _encryption;
127 bool _externalMedia, _file, _hardware;
128 bool _netEqStats, _network, _rtp_rtcp, _videoSync, _volumeControl, _apm;
131 class VoETestManager {
136 // Must be called after construction.
139 void GetInterfaces();
140 int ReleaseInterfaces();
142 const char* AudioFilename() const {
143 const std::string& result = resource_manager_.long_audio_file_path();
144 if (result.length() == 0) {
145 TEST_LOG("ERROR: Failed to open input file!");
147 return result.c_str();
150 VoiceEngine* VoiceEnginePtr() const {
151 return voice_engine_;
153 VoEBase* BasePtr() const {
156 VoECodec* CodecPtr() const {
159 VoEVolumeControl* VolumeControlPtr() const {
160 return voe_volume_control_;
162 VoEDtmf* DtmfPtr() const {
165 VoERTP_RTCP* RTP_RTCPPtr() const {
166 return voe_rtp_rtcp_;
168 VoEAudioProcessing* APMPtr() const {
172 VoENetwork* NetworkPtr() const {
176 VoEFile* FilePtr() const {
180 VoEHardware* HardwarePtr() const {
181 return voe_hardware_;
184 VoEVideoSync* VideoSyncPtr() const {
188 VoEEncryption* EncryptionPtr() const {
192 VoEExternalMedia* ExternalMediaPtr() const {
196 VoECallReport* CallReportPtr() const {
197 return voe_call_report_;
200 #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API
201 VoENetEqStats* NetEqStatsPtr() const {
202 return voe_neteq_stats_;
209 VoiceEngine* voice_engine_;
211 VoECallReport* voe_call_report_;
212 VoECodec* voe_codec_;
214 VoEEncryption* voe_encrypt_;
215 VoEExternalMedia* voe_xmedia_;
217 VoEHardware* voe_hardware_;
218 VoENetwork* voe_network_;
219 #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API
220 VoENetEqStats* voe_neteq_stats_;
222 VoERTP_RTCP* voe_rtp_rtcp_;
223 VoEVideoSync* voe_vsync_;
224 VoEVolumeControl* voe_volume_control_;
225 VoEAudioProcessing* voe_apm_;
227 ResourceManager resource_manager_;
232 } // namespace voetest
234 #endif // WEBRTC_VOICE_ENGINE_VOE_STANDARD_TEST_H