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 17 matching lines...) Expand all Loading... |
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" | 32 #include "webrtc/voice_engine/include/voe_external_media.h" |
33 #include "webrtc/voice_engine/include/voe_file.h" | 33 #include "webrtc/voice_engine/include/voe_file.h" |
34 #include "webrtc/voice_engine/include/voe_hardware.h" | 34 #include "webrtc/voice_engine/include/voe_hardware.h" |
35 #include "webrtc/voice_engine/include/voe_neteq_stats.h" | 35 #include "webrtc/voice_engine/include/voe_neteq_stats.h" |
36 #include "webrtc/voice_engine/include/voe_network.h" | 36 #include "webrtc/voice_engine/include/voe_network.h" |
37 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" | 37 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" |
38 #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, |
43 "Output logs to a file; by default they will be printed to stderr."); | 42 "Output logs to a file; by default they will be printed to stderr."); |
44 | 43 |
45 using namespace webrtc; | 44 using namespace webrtc; |
46 using namespace test; | 45 using namespace test; |
47 | 46 |
48 #define VALIDATE \ | 47 #define VALIDATE \ |
49 if (res != 0) { \ | 48 if (res != 0) { \ |
50 printf("*** Error at line %i \n", __LINE__); \ | 49 printf("*** Error at line %i \n", __LINE__); \ |
51 printf("*** Error code = %i \n", base1->LastError()); \ | 50 printf("*** Error code = %i \n", base1->LastError()); \ |
52 } | 51 } |
53 | 52 |
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; | |
63 VoEHardware* hardware = NULL; | 61 VoEHardware* hardware = NULL; |
64 VoEExternalMedia* xmedia = NULL; | 62 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 }; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 printf("Test started \n"); | 122 printf("Test started \n"); |
125 | 123 |
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); | |
135 hardware = VoEHardware::GetInterface(m_voe); | 132 hardware = VoEHardware::GetInterface(m_voe); |
136 xmedia = VoEExternalMedia::GetInterface(m_voe); | 133 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 { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 188 |
192 if (apm) | 189 if (apm) |
193 apm->Release(); | 190 apm->Release(); |
194 | 191 |
195 if (netw) | 192 if (netw) |
196 netw->Release(); | 193 netw->Release(); |
197 | 194 |
198 if (file) | 195 if (file) |
199 file->Release(); | 196 file->Release(); |
200 | 197 |
201 if (vsync) | |
202 vsync->Release(); | |
203 | |
204 if (hardware) | 198 if (hardware) |
205 hardware->Release(); | 199 hardware->Release(); |
206 | 200 |
207 if (xmedia) | 201 if (xmedia) |
208 xmedia->Release(); | 202 xmedia->Release(); |
209 | 203 |
210 if (neteqst) | 204 if (neteqst) |
211 neteqst->Release(); | 205 neteqst->Release(); |
212 | 206 |
213 VoiceEngine::Delete(m_voe); | 207 VoiceEngine::Delete(m_voe); |
(...skipping 581 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 |