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 11 matching lines...) Expand all Loading... |
22 #include "webrtc/base/format_macros.h" | 22 #include "webrtc/base/format_macros.h" |
23 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 23 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
24 #include "webrtc/test/gtest.h" | 24 #include "webrtc/test/gtest.h" |
25 #include "webrtc/test/testsupport/fileutils.h" | 25 #include "webrtc/test/testsupport/fileutils.h" |
26 #include "webrtc/test/testsupport/trace_to_stderr.h" | 26 #include "webrtc/test/testsupport/trace_to_stderr.h" |
27 #include "webrtc/typedefs.h" | 27 #include "webrtc/typedefs.h" |
28 #include "webrtc/voice_engine/include/voe_audio_processing.h" | 28 #include "webrtc/voice_engine/include/voe_audio_processing.h" |
29 #include "webrtc/voice_engine/include/voe_base.h" | 29 #include "webrtc/voice_engine/include/voe_base.h" |
30 #include "webrtc/voice_engine/include/voe_codec.h" | 30 #include "webrtc/voice_engine/include/voe_codec.h" |
31 #include "webrtc/voice_engine/include/voe_errors.h" | 31 #include "webrtc/voice_engine/include/voe_errors.h" |
32 #include "webrtc/voice_engine/include/voe_external_media.h" | |
33 #include "webrtc/voice_engine/include/voe_file.h" | 32 #include "webrtc/voice_engine/include/voe_file.h" |
34 #include "webrtc/voice_engine/include/voe_hardware.h" | 33 #include "webrtc/voice_engine/include/voe_hardware.h" |
35 #include "webrtc/voice_engine/include/voe_neteq_stats.h" | 34 #include "webrtc/voice_engine/include/voe_neteq_stats.h" |
36 #include "webrtc/voice_engine/include/voe_network.h" | 35 #include "webrtc/voice_engine/include/voe_network.h" |
37 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" | 36 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" |
38 #include "webrtc/voice_engine/include/voe_video_sync.h" | 37 #include "webrtc/voice_engine/include/voe_video_sync.h" |
39 #include "webrtc/voice_engine/include/voe_volume_control.h" | 38 #include "webrtc/voice_engine/include/voe_volume_control.h" |
40 #include "webrtc/voice_engine/test/channel_transport/channel_transport.h" | 39 #include "webrtc/voice_engine/test/channel_transport/channel_transport.h" |
41 | 40 |
42 DEFINE_bool(use_log_file, false, | 41 DEFINE_bool(use_log_file, false, |
(...skipping 11 matching lines...) Expand all Loading... |
54 VoiceEngine* m_voe = NULL; | 53 VoiceEngine* m_voe = NULL; |
55 VoEBase* base1 = NULL; | 54 VoEBase* base1 = NULL; |
56 VoECodec* codec = NULL; | 55 VoECodec* codec = NULL; |
57 VoEVolumeControl* volume = NULL; | 56 VoEVolumeControl* volume = NULL; |
58 VoERTP_RTCP* rtp_rtcp = NULL; | 57 VoERTP_RTCP* rtp_rtcp = NULL; |
59 VoEAudioProcessing* apm = NULL; | 58 VoEAudioProcessing* apm = NULL; |
60 VoENetwork* netw = NULL; | 59 VoENetwork* netw = NULL; |
61 VoEFile* file = NULL; | 60 VoEFile* file = NULL; |
62 VoEVideoSync* vsync = NULL; | 61 VoEVideoSync* vsync = NULL; |
63 VoEHardware* hardware = NULL; | 62 VoEHardware* hardware = NULL; |
64 VoEExternalMedia* xmedia = NULL; | |
65 VoENetEqStats* neteqst = NULL; | 63 VoENetEqStats* neteqst = NULL; |
66 | 64 |
67 void RunTest(std::string out_path); | 65 void RunTest(std::string out_path); |
68 | 66 |
69 class MyObserver : public VoiceEngineObserver { | 67 class MyObserver : public VoiceEngineObserver { |
70 public: | 68 public: |
71 virtual void CallbackOnError(int channel, int err_code); | 69 virtual void CallbackOnError(int channel, int err_code); |
72 }; | 70 }; |
73 | 71 |
74 void MyObserver::CallbackOnError(int channel, int err_code) { | 72 void MyObserver::CallbackOnError(int channel, int err_code) { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 m_voe = VoiceEngine::Create(); | 124 m_voe = VoiceEngine::Create(); |
127 base1 = VoEBase::GetInterface(m_voe); | 125 base1 = VoEBase::GetInterface(m_voe); |
128 codec = VoECodec::GetInterface(m_voe); | 126 codec = VoECodec::GetInterface(m_voe); |
129 apm = VoEAudioProcessing::GetInterface(m_voe); | 127 apm = VoEAudioProcessing::GetInterface(m_voe); |
130 volume = VoEVolumeControl::GetInterface(m_voe); | 128 volume = VoEVolumeControl::GetInterface(m_voe); |
131 rtp_rtcp = VoERTP_RTCP::GetInterface(m_voe); | 129 rtp_rtcp = VoERTP_RTCP::GetInterface(m_voe); |
132 netw = VoENetwork::GetInterface(m_voe); | 130 netw = VoENetwork::GetInterface(m_voe); |
133 file = VoEFile::GetInterface(m_voe); | 131 file = VoEFile::GetInterface(m_voe); |
134 vsync = VoEVideoSync::GetInterface(m_voe); | 132 vsync = VoEVideoSync::GetInterface(m_voe); |
135 hardware = VoEHardware::GetInterface(m_voe); | 133 hardware = VoEHardware::GetInterface(m_voe); |
136 xmedia = VoEExternalMedia::GetInterface(m_voe); | |
137 neteqst = VoENetEqStats::GetInterface(m_voe); | 134 neteqst = VoENetEqStats::GetInterface(m_voe); |
138 | 135 |
139 MyObserver my_observer; | 136 MyObserver my_observer; |
140 | 137 |
141 std::unique_ptr<test::TraceToStderr> trace_to_stderr; | 138 std::unique_ptr<test::TraceToStderr> trace_to_stderr; |
142 if (!FLAGS_use_log_file) { | 139 if (!FLAGS_use_log_file) { |
143 trace_to_stderr.reset(new test::TraceToStderr); | 140 trace_to_stderr.reset(new test::TraceToStderr); |
144 } else { | 141 } else { |
145 const std::string trace_filename = test::OutputPath() + "webrtc_trace.txt"; | 142 const std::string trace_filename = test::OutputPath() + "webrtc_trace.txt"; |
146 VoiceEngine::SetTraceFilter(kTraceAll); | 143 VoiceEngine::SetTraceFilter(kTraceAll); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 194 |
198 if (file) | 195 if (file) |
199 file->Release(); | 196 file->Release(); |
200 | 197 |
201 if (vsync) | 198 if (vsync) |
202 vsync->Release(); | 199 vsync->Release(); |
203 | 200 |
204 if (hardware) | 201 if (hardware) |
205 hardware->Release(); | 202 hardware->Release(); |
206 | 203 |
207 if (xmedia) | |
208 xmedia->Release(); | |
209 | |
210 if (neteqst) | 204 if (neteqst) |
211 neteqst->Release(); | 205 neteqst->Release(); |
212 | 206 |
213 VoiceEngine::Delete(m_voe); | 207 VoiceEngine::Delete(m_voe); |
214 | 208 |
215 return 0; | 209 return 0; |
216 } | 210 } |
217 | 211 |
218 void RunTest(std::string out_path) { | 212 void RunTest(std::string out_path) { |
219 int chan, res; | 213 int chan, res; |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 | 789 |
796 printf("Delete channels \n"); | 790 printf("Delete channels \n"); |
797 res = base1->DeleteChannel(chan); | 791 res = base1->DeleteChannel(chan); |
798 VALIDATE; | 792 VALIDATE; |
799 | 793 |
800 for (int i = 0; i < kMaxNumChannels; ++i) { | 794 for (int i = 0; i < kMaxNumChannels; ++i) { |
801 res = base1->DeleteChannel(channels[i]); | 795 res = base1->DeleteChannel(channels[i]); |
802 VALIDATE; | 796 VALIDATE; |
803 } | 797 } |
804 } | 798 } |
OLD | NEW |