OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_VOICE_ENGINE_VOE_STANDARD_TEST_H | 11 #ifndef WEBRTC_VOICE_ENGINE_VOE_STANDARD_TEST_H |
12 #define WEBRTC_VOICE_ENGINE_VOE_STANDARD_TEST_H | 12 #define WEBRTC_VOICE_ENGINE_VOE_STANDARD_TEST_H |
13 | 13 |
14 #include <stdio.h> | 14 #include <stdio.h> |
15 #include <string> | 15 #include <string> |
16 | 16 |
17 #include "gflags/gflags.h" | 17 #include "gflags/gflags.h" |
18 #include "webrtc/test/testsupport/fileutils.h" | 18 #include "webrtc/test/testsupport/fileutils.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_errors.h" | |
22 #include "webrtc/voice_engine/include/voe_file.h" | |
23 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" | |
24 #include "webrtc/voice_engine/test/auto_test/voe_test_common.h" | 19 #include "webrtc/voice_engine/test/auto_test/voe_test_common.h" |
25 #include "webrtc/voice_engine/test/auto_test/voe_test_interface.h" | |
26 #include "webrtc/voice_engine/include/voe_codec.h" | |
27 #include "webrtc/voice_engine/include/voe_external_media.h" | |
28 #include "webrtc/voice_engine/include/voe_hardware.h" | |
29 #include "webrtc/voice_engine/include/voe_network.h" | |
30 #include "webrtc/voice_engine/include/voe_video_sync.h" | |
31 #include "webrtc/voice_engine/include/voe_volume_control.h" | |
32 | |
33 namespace webrtc { | |
34 class VoENetEqStats; | |
35 } | |
36 | 20 |
37 #if defined(WEBRTC_ANDROID) | 21 #if defined(WEBRTC_ANDROID) |
38 extern char mobileLogMsg[640]; | 22 extern char mobileLogMsg[640]; |
39 #endif | 23 #endif |
40 | 24 |
41 DECLARE_bool(include_timing_dependent_tests); | 25 DECLARE_bool(include_timing_dependent_tests); |
42 | 26 |
43 namespace voetest { | 27 namespace voetest { |
44 | 28 |
45 class SubAPIManager { | 29 class SubAPIManager { |
(...skipping 23 matching lines...) Expand all Loading... |
69 } | 53 } |
70 | 54 |
71 void DisplayStatus() const; | 55 void DisplayStatus() const; |
72 | 56 |
73 private: | 57 private: |
74 bool _base, _codec; | 58 bool _base, _codec; |
75 bool _externalMedia, _file, _hardware; | 59 bool _externalMedia, _file, _hardware; |
76 bool _netEqStats, _network, _rtp_rtcp, _videoSync, _volumeControl, _apm; | 60 bool _netEqStats, _network, _rtp_rtcp, _videoSync, _volumeControl, _apm; |
77 }; | 61 }; |
78 | 62 |
79 class VoETestManager { | |
80 public: | |
81 VoETestManager(); | |
82 ~VoETestManager(); | |
83 | |
84 // Must be called after construction. | |
85 bool Init(); | |
86 | |
87 void GetInterfaces(); | |
88 int ReleaseInterfaces(); | |
89 | |
90 const char* AudioFilename() const { | |
91 const std::string& result = | |
92 webrtc::test::ResourcePath("voice_engine/audio_long16", "pcm"); | |
93 return result.c_str(); | |
94 } | |
95 | |
96 VoiceEngine* VoiceEnginePtr() const { | |
97 return voice_engine_; | |
98 } | |
99 VoEBase* BasePtr() const { | |
100 return voe_base_; | |
101 } | |
102 VoECodec* CodecPtr() const { | |
103 return voe_codec_; | |
104 } | |
105 VoEVolumeControl* VolumeControlPtr() const { | |
106 return voe_volume_control_; | |
107 } | |
108 VoERTP_RTCP* RTP_RTCPPtr() const { | |
109 return voe_rtp_rtcp_; | |
110 } | |
111 VoEAudioProcessing* APMPtr() const { | |
112 return voe_apm_; | |
113 } | |
114 | |
115 VoENetwork* NetworkPtr() const { | |
116 return voe_network_; | |
117 } | |
118 | |
119 VoEFile* FilePtr() const { | |
120 return voe_file_; | |
121 } | |
122 | |
123 VoEHardware* HardwarePtr() const { | |
124 return voe_hardware_; | |
125 } | |
126 | |
127 VoEVideoSync* VideoSyncPtr() const { | |
128 return voe_vsync_; | |
129 } | |
130 | |
131 VoEExternalMedia* ExternalMediaPtr() const { | |
132 return voe_xmedia_; | |
133 } | |
134 | |
135 VoENetEqStats* NetEqStatsPtr() const { | |
136 return voe_neteq_stats_; | |
137 } | |
138 | |
139 private: | |
140 bool initialized_; | |
141 | |
142 VoiceEngine* voice_engine_; | |
143 VoEBase* voe_base_; | |
144 VoECodec* voe_codec_; | |
145 VoEExternalMedia* voe_xmedia_; | |
146 VoEFile* voe_file_; | |
147 VoEHardware* voe_hardware_; | |
148 VoENetwork* voe_network_; | |
149 VoENetEqStats* voe_neteq_stats_; | |
150 VoERTP_RTCP* voe_rtp_rtcp_; | |
151 VoEVideoSync* voe_vsync_; | |
152 VoEVolumeControl* voe_volume_control_; | |
153 VoEAudioProcessing* voe_apm_; | |
154 }; | |
155 | |
156 } // namespace voetest | 63 } // namespace voetest |
157 | 64 |
158 #endif // WEBRTC_VOICE_ENGINE_VOE_STANDARD_TEST_H | 65 #endif // WEBRTC_VOICE_ENGINE_VOE_STANDARD_TEST_H |
OLD | NEW |