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 |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "webrtc/base/format_macros.h" | 23 #include "webrtc/base/format_macros.h" |
24 #include "webrtc/call/rtc_event_log.h" | 24 #include "webrtc/call/rtc_event_log.h" |
25 #include "webrtc/engine_configurations.h" | 25 #include "webrtc/engine_configurations.h" |
26 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 26 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
27 #include "webrtc/test/channel_transport/channel_transport.h" | 27 #include "webrtc/test/channel_transport/channel_transport.h" |
28 #include "webrtc/test/testsupport/fileutils.h" | 28 #include "webrtc/test/testsupport/fileutils.h" |
29 #include "webrtc/test/testsupport/trace_to_stderr.h" | 29 #include "webrtc/test/testsupport/trace_to_stderr.h" |
30 #include "webrtc/voice_engine/include/voe_audio_processing.h" | 30 #include "webrtc/voice_engine/include/voe_audio_processing.h" |
31 #include "webrtc/voice_engine/include/voe_base.h" | 31 #include "webrtc/voice_engine/include/voe_base.h" |
32 #include "webrtc/voice_engine/include/voe_codec.h" | 32 #include "webrtc/voice_engine/include/voe_codec.h" |
33 #include "webrtc/voice_engine/include/voe_dtmf.h" | |
34 #include "webrtc/voice_engine/include/voe_errors.h" | 33 #include "webrtc/voice_engine/include/voe_errors.h" |
35 #include "webrtc/voice_engine/include/voe_external_media.h" | 34 #include "webrtc/voice_engine/include/voe_external_media.h" |
36 #include "webrtc/voice_engine/include/voe_file.h" | 35 #include "webrtc/voice_engine/include/voe_file.h" |
37 #include "webrtc/voice_engine/include/voe_hardware.h" | 36 #include "webrtc/voice_engine/include/voe_hardware.h" |
38 #include "webrtc/voice_engine/include/voe_neteq_stats.h" | 37 #include "webrtc/voice_engine/include/voe_neteq_stats.h" |
39 #include "webrtc/voice_engine/include/voe_network.h" | 38 #include "webrtc/voice_engine/include/voe_network.h" |
40 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" | 39 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" |
41 #include "webrtc/voice_engine/include/voe_video_sync.h" | 40 #include "webrtc/voice_engine/include/voe_video_sync.h" |
42 #include "webrtc/voice_engine/include/voe_volume_control.h" | 41 #include "webrtc/voice_engine/include/voe_volume_control.h" |
43 | 42 |
44 DEFINE_bool(use_log_file, false, | 43 DEFINE_bool(use_log_file, false, |
45 "Output logs to a file; by default they will be printed to stderr."); | 44 "Output logs to a file; by default they will be printed to stderr."); |
46 | 45 |
47 using namespace webrtc; | 46 using namespace webrtc; |
48 using namespace test; | 47 using namespace test; |
49 | 48 |
50 #define VALIDATE \ | 49 #define VALIDATE \ |
51 if (res != 0) { \ | 50 if (res != 0) { \ |
52 printf("*** Error at line %i \n", __LINE__); \ | 51 printf("*** Error at line %i \n", __LINE__); \ |
53 printf("*** Error code = %i \n", base1->LastError()); \ | 52 printf("*** Error code = %i \n", base1->LastError()); \ |
54 } | 53 } |
55 | 54 |
56 VoiceEngine* m_voe = NULL; | 55 VoiceEngine* m_voe = NULL; |
57 VoEBase* base1 = NULL; | 56 VoEBase* base1 = NULL; |
58 VoECodec* codec = NULL; | 57 VoECodec* codec = NULL; |
59 VoEVolumeControl* volume = NULL; | 58 VoEVolumeControl* volume = NULL; |
60 VoEDtmf* dtmf = NULL; | |
61 VoERTP_RTCP* rtp_rtcp = NULL; | 59 VoERTP_RTCP* rtp_rtcp = NULL; |
62 VoEAudioProcessing* apm = NULL; | 60 VoEAudioProcessing* apm = NULL; |
63 VoENetwork* netw = NULL; | 61 VoENetwork* netw = NULL; |
64 VoEFile* file = NULL; | 62 VoEFile* file = NULL; |
65 VoEVideoSync* vsync = NULL; | 63 VoEVideoSync* vsync = NULL; |
66 VoEHardware* hardware = NULL; | 64 VoEHardware* hardware = NULL; |
67 VoEExternalMedia* xmedia = NULL; | 65 VoEExternalMedia* xmedia = NULL; |
68 VoENetEqStats* neteqst = NULL; | 66 VoENetEqStats* neteqst = NULL; |
69 | 67 |
70 void RunTest(std::string out_path); | 68 void RunTest(std::string out_path); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 122 |
125 int res = 0; | 123 int res = 0; |
126 | 124 |
127 printf("Test started \n"); | 125 printf("Test started \n"); |
128 | 126 |
129 m_voe = VoiceEngine::Create(); | 127 m_voe = VoiceEngine::Create(); |
130 base1 = VoEBase::GetInterface(m_voe); | 128 base1 = VoEBase::GetInterface(m_voe); |
131 codec = VoECodec::GetInterface(m_voe); | 129 codec = VoECodec::GetInterface(m_voe); |
132 apm = VoEAudioProcessing::GetInterface(m_voe); | 130 apm = VoEAudioProcessing::GetInterface(m_voe); |
133 volume = VoEVolumeControl::GetInterface(m_voe); | 131 volume = VoEVolumeControl::GetInterface(m_voe); |
134 dtmf = VoEDtmf::GetInterface(m_voe); | |
135 rtp_rtcp = VoERTP_RTCP::GetInterface(m_voe); | 132 rtp_rtcp = VoERTP_RTCP::GetInterface(m_voe); |
136 netw = VoENetwork::GetInterface(m_voe); | 133 netw = VoENetwork::GetInterface(m_voe); |
137 file = VoEFile::GetInterface(m_voe); | 134 file = VoEFile::GetInterface(m_voe); |
138 vsync = VoEVideoSync::GetInterface(m_voe); | 135 vsync = VoEVideoSync::GetInterface(m_voe); |
139 hardware = VoEHardware::GetInterface(m_voe); | 136 hardware = VoEHardware::GetInterface(m_voe); |
140 xmedia = VoEExternalMedia::GetInterface(m_voe); | 137 xmedia = VoEExternalMedia::GetInterface(m_voe); |
141 neteqst = VoENetEqStats::GetInterface(m_voe); | 138 neteqst = VoENetEqStats::GetInterface(m_voe); |
142 | 139 |
143 MyObserver my_observer; | 140 MyObserver my_observer; |
144 | 141 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 | 180 |
184 if (base1) | 181 if (base1) |
185 base1->Release(); | 182 base1->Release(); |
186 | 183 |
187 if (codec) | 184 if (codec) |
188 codec->Release(); | 185 codec->Release(); |
189 | 186 |
190 if (volume) | 187 if (volume) |
191 volume->Release(); | 188 volume->Release(); |
192 | 189 |
193 if (dtmf) | |
194 dtmf->Release(); | |
195 | |
196 if (rtp_rtcp) | 190 if (rtp_rtcp) |
197 rtp_rtcp->Release(); | 191 rtp_rtcp->Release(); |
198 | 192 |
199 if (apm) | 193 if (apm) |
200 apm->Release(); | 194 apm->Release(); |
201 | 195 |
202 if (netw) | 196 if (netw) |
203 netw->Release(); | 197 netw->Release(); |
204 | 198 |
205 if (file) | 199 if (file) |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 | 855 |
862 printf("Delete channels \n"); | 856 printf("Delete channels \n"); |
863 res = base1->DeleteChannel(chan); | 857 res = base1->DeleteChannel(chan); |
864 VALIDATE; | 858 VALIDATE; |
865 | 859 |
866 for (int i = 0; i < kMaxNumChannels; ++i) { | 860 for (int i = 0; i < kMaxNumChannels; ++i) { |
867 res = base1->DeleteChannel(channels[i]); | 861 res = base1->DeleteChannel(channels[i]); |
868 VALIDATE; | 862 VALIDATE; |
869 } | 863 } |
870 } | 864 } |
OLD | NEW |