| 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 16 matching lines...) Expand all Loading... |
| 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_file.h" | 32 #include "webrtc/voice_engine/include/voe_file.h" |
| 33 #include "webrtc/voice_engine/include/voe_hardware.h" | 33 #include "webrtc/voice_engine/include/voe_hardware.h" |
| 34 #include "webrtc/voice_engine/include/voe_neteq_stats.h" | 34 #include "webrtc/voice_engine/include/voe_neteq_stats.h" |
| 35 #include "webrtc/voice_engine/include/voe_network.h" | 35 #include "webrtc/voice_engine/include/voe_network.h" |
| 36 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" | 36 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" |
| 37 #include "webrtc/voice_engine/include/voe_video_sync.h" | |
| 38 #include "webrtc/voice_engine/include/voe_volume_control.h" | 37 #include "webrtc/voice_engine/include/voe_volume_control.h" |
| 39 #include "webrtc/voice_engine/test/channel_transport/channel_transport.h" | 38 #include "webrtc/voice_engine/test/channel_transport/channel_transport.h" |
| 40 | 39 |
| 41 DEFINE_bool(use_log_file, false, | 40 DEFINE_bool(use_log_file, false, |
| 42 "Output logs to a file; by default they will be printed to stderr."); | 41 "Output logs to a file; by default they will be printed to stderr."); |
| 43 | 42 |
| 44 using namespace webrtc; | 43 using namespace webrtc; |
| 45 using namespace test; | 44 using namespace test; |
| 46 | 45 |
| 47 #define VALIDATE \ | 46 #define VALIDATE \ |
| 48 if (res != 0) { \ | 47 if (res != 0) { \ |
| 49 printf("*** Error at line %i \n", __LINE__); \ | 48 printf("*** Error at line %i \n", __LINE__); \ |
| 50 printf("*** Error code = %i \n", base1->LastError()); \ | 49 printf("*** Error code = %i \n", base1->LastError()); \ |
| 51 } | 50 } |
| 52 | 51 |
| 53 VoiceEngine* m_voe = NULL; | 52 VoiceEngine* m_voe = NULL; |
| 54 VoEBase* base1 = NULL; | 53 VoEBase* base1 = NULL; |
| 55 VoECodec* codec = NULL; | 54 VoECodec* codec = NULL; |
| 56 VoEVolumeControl* volume = NULL; | 55 VoEVolumeControl* volume = NULL; |
| 57 VoERTP_RTCP* rtp_rtcp = NULL; | 56 VoERTP_RTCP* rtp_rtcp = NULL; |
| 58 VoEAudioProcessing* apm = NULL; | 57 VoEAudioProcessing* apm = NULL; |
| 59 VoENetwork* netw = NULL; | 58 VoENetwork* netw = NULL; |
| 60 VoEFile* file = NULL; | 59 VoEFile* file = NULL; |
| 61 VoEVideoSync* vsync = NULL; | |
| 62 VoEHardware* hardware = NULL; | 60 VoEHardware* hardware = NULL; |
| 63 VoENetEqStats* neteqst = NULL; | 61 VoENetEqStats* neteqst = NULL; |
| 64 | 62 |
| 65 void RunTest(std::string out_path); | 63 void RunTest(std::string out_path); |
| 66 | 64 |
| 67 class MyObserver : public VoiceEngineObserver { | 65 class MyObserver : public VoiceEngineObserver { |
| 68 public: | 66 public: |
| 69 virtual void CallbackOnError(int channel, int err_code); | 67 virtual void CallbackOnError(int channel, int err_code); |
| 70 }; | 68 }; |
| 71 | 69 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 printf("Test started \n"); | 120 printf("Test started \n"); |
| 123 | 121 |
| 124 m_voe = VoiceEngine::Create(); | 122 m_voe = VoiceEngine::Create(); |
| 125 base1 = VoEBase::GetInterface(m_voe); | 123 base1 = VoEBase::GetInterface(m_voe); |
| 126 codec = VoECodec::GetInterface(m_voe); | 124 codec = VoECodec::GetInterface(m_voe); |
| 127 apm = VoEAudioProcessing::GetInterface(m_voe); | 125 apm = VoEAudioProcessing::GetInterface(m_voe); |
| 128 volume = VoEVolumeControl::GetInterface(m_voe); | 126 volume = VoEVolumeControl::GetInterface(m_voe); |
| 129 rtp_rtcp = VoERTP_RTCP::GetInterface(m_voe); | 127 rtp_rtcp = VoERTP_RTCP::GetInterface(m_voe); |
| 130 netw = VoENetwork::GetInterface(m_voe); | 128 netw = VoENetwork::GetInterface(m_voe); |
| 131 file = VoEFile::GetInterface(m_voe); | 129 file = VoEFile::GetInterface(m_voe); |
| 132 vsync = VoEVideoSync::GetInterface(m_voe); | |
| 133 hardware = VoEHardware::GetInterface(m_voe); | 130 hardware = VoEHardware::GetInterface(m_voe); |
| 134 neteqst = VoENetEqStats::GetInterface(m_voe); | 131 neteqst = VoENetEqStats::GetInterface(m_voe); |
| 135 | 132 |
| 136 MyObserver my_observer; | 133 MyObserver my_observer; |
| 137 | 134 |
| 138 std::unique_ptr<test::TraceToStderr> trace_to_stderr; | 135 std::unique_ptr<test::TraceToStderr> trace_to_stderr; |
| 139 if (!FLAGS_use_log_file) { | 136 if (!FLAGS_use_log_file) { |
| 140 trace_to_stderr.reset(new test::TraceToStderr); | 137 trace_to_stderr.reset(new test::TraceToStderr); |
| 141 } else { | 138 } else { |
| 142 const std::string trace_filename = test::OutputPath() + "webrtc_trace.txt"; | 139 const std::string trace_filename = test::OutputPath() + "webrtc_trace.txt"; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 | 185 |
| 189 if (apm) | 186 if (apm) |
| 190 apm->Release(); | 187 apm->Release(); |
| 191 | 188 |
| 192 if (netw) | 189 if (netw) |
| 193 netw->Release(); | 190 netw->Release(); |
| 194 | 191 |
| 195 if (file) | 192 if (file) |
| 196 file->Release(); | 193 file->Release(); |
| 197 | 194 |
| 198 if (vsync) | |
| 199 vsync->Release(); | |
| 200 | |
| 201 if (hardware) | 195 if (hardware) |
| 202 hardware->Release(); | 196 hardware->Release(); |
| 203 | 197 |
| 204 if (neteqst) | 198 if (neteqst) |
| 205 neteqst->Release(); | 199 neteqst->Release(); |
| 206 | 200 |
| 207 VoiceEngine::Delete(m_voe); | 201 VoiceEngine::Delete(m_voe); |
| 208 | 202 |
| 209 return 0; | 203 return 0; |
| 210 } | 204 } |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 | 783 |
| 790 printf("Delete channels \n"); | 784 printf("Delete channels \n"); |
| 791 res = base1->DeleteChannel(chan); | 785 res = base1->DeleteChannel(chan); |
| 792 VALIDATE; | 786 VALIDATE; |
| 793 | 787 |
| 794 for (int i = 0; i < kMaxNumChannels; ++i) { | 788 for (int i = 0; i < kMaxNumChannels; ++i) { |
| 795 res = base1->DeleteChannel(channels[i]); | 789 res = base1->DeleteChannel(channels[i]); |
| 796 VALIDATE; | 790 VALIDATE; |
| 797 } | 791 } |
| 798 } | 792 } |
| OLD | NEW |