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_EXTERNAL_MEDIA_API
35 #include "webrtc/voice_engine/include/voe_external_media.h"
37 #ifdef WEBRTC_VOICE_ENGINE_HARDWARE_API
38 #include "webrtc/voice_engine/include/voe_hardware.h"
40 #include "webrtc/voice_engine/include/voe_network.h"
41 #ifdef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API
42 #include "webrtc/voice_engine/include/voe_video_sync.h"
44 #ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API
45 #include "webrtc/voice_engine/include/voe_volume_control.h"
48 #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API
50 class CriticalSectionWrapper;
56 #if defined(WEBRTC_ANDROID)
57 extern char mobileLogMsg[640];
60 DECLARE_bool(include_timing_dependent_tests);
71 _externalMedia(false),
78 _volumeControl(false),
80 #ifdef WEBRTC_VOICE_ENGINE_CALL_REPORT_API
83 #ifdef WEBRTC_VOICE_ENGINE_CODEC_API
86 #ifdef WEBRTC_VOICE_ENGINE_DTMF_API
89 #ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API
90 _externalMedia = true;
92 #ifdef WEBRTC_VOICE_ENGINE_FILE_API
95 #ifdef WEBRTC_VOICE_ENGINE_HARDWARE_API
98 #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API
102 #ifdef WEBRTC_VOICE_ENGINE_RTP_RTCP_API
105 #ifdef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API
108 #ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API
109 _volumeControl = true;
111 #ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API
116 void DisplayStatus() const;
119 bool _base, _callReport, _codec, _dtmf;
120 bool _externalMedia, _file, _hardware;
121 bool _netEqStats, _network, _rtp_rtcp, _videoSync, _volumeControl, _apm;
124 class VoETestManager {
129 // Must be called after construction.
132 void GetInterfaces();
133 int ReleaseInterfaces();
135 const char* AudioFilename() const {
136 const std::string& result = resource_manager_.long_audio_file_path();
137 if (result.length() == 0) {
138 TEST_LOG("ERROR: Failed to open input file!");
140 return result.c_str();
143 VoiceEngine* VoiceEnginePtr() const {
144 return voice_engine_;
146 VoEBase* BasePtr() const {
149 VoECodec* CodecPtr() const {
152 VoEVolumeControl* VolumeControlPtr() const {
153 return voe_volume_control_;
155 VoEDtmf* DtmfPtr() const {
158 VoERTP_RTCP* RTP_RTCPPtr() const {
159 return voe_rtp_rtcp_;
161 VoEAudioProcessing* APMPtr() const {
165 VoENetwork* NetworkPtr() const {
169 VoEFile* FilePtr() const {
173 VoEHardware* HardwarePtr() const {
174 return voe_hardware_;
177 VoEVideoSync* VideoSyncPtr() const {
181 VoEExternalMedia* ExternalMediaPtr() const {
185 VoECallReport* CallReportPtr() const {
186 return voe_call_report_;
189 #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API
190 VoENetEqStats* NetEqStatsPtr() const {
191 return voe_neteq_stats_;
198 VoiceEngine* voice_engine_;
200 VoECallReport* voe_call_report_;
201 VoECodec* voe_codec_;
203 VoEExternalMedia* voe_xmedia_;
205 VoEHardware* voe_hardware_;
206 VoENetwork* voe_network_;
207 #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API
208 VoENetEqStats* voe_neteq_stats_;
210 VoERTP_RTCP* voe_rtp_rtcp_;
211 VoEVideoSync* voe_vsync_;
212 VoEVolumeControl* voe_volume_control_;
213 VoEAudioProcessing* voe_apm_;
215 ResourceManager resource_manager_;
220 } // namespace voetest
222 #endif // WEBRTC_VOICE_ENGINE_VOE_STANDARD_TEST_H