| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 #ifndef WEBRTC_TEST_CALL_TEST_H_ | 10 #ifndef WEBRTC_TEST_CALL_TEST_H_ |
| 11 #define WEBRTC_TEST_CALL_TEST_H_ | 11 #define WEBRTC_TEST_CALL_TEST_H_ |
| 12 | 12 |
| 13 #include <memory> | 13 #include <memory> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "webrtc/call.h" | 16 #include "webrtc/call.h" |
| 17 #include "webrtc/call/transport_adapter.h" | |
| 18 #include "webrtc/test/fake_audio_device.h" | 17 #include "webrtc/test/fake_audio_device.h" |
| 19 #include "webrtc/test/fake_decoder.h" | 18 #include "webrtc/test/fake_decoder.h" |
| 20 #include "webrtc/test/fake_encoder.h" | 19 #include "webrtc/test/fake_encoder.h" |
| 21 #include "webrtc/test/frame_generator_capturer.h" | 20 #include "webrtc/test/frame_generator_capturer.h" |
| 22 #include "webrtc/test/rtp_rtcp_observer.h" | 21 #include "webrtc/test/rtp_rtcp_observer.h" |
| 23 | 22 |
| 24 namespace webrtc { | 23 namespace webrtc { |
| 25 | 24 |
| 26 class VoEBase; | 25 class VoEBase; |
| 27 class VoECodec; | 26 class VoECodec; |
| 28 class VoENetwork; | |
| 29 | 27 |
| 30 namespace test { | 28 namespace test { |
| 31 | 29 |
| 32 class BaseTest; | 30 class BaseTest; |
| 33 | 31 |
| 34 class CallTest : public ::testing::Test { | 32 class CallTest : public ::testing::Test { |
| 35 public: | 33 public: |
| 36 CallTest(); | 34 CallTest(); |
| 37 virtual ~CallTest(); | 35 virtual ~CallTest(); |
| 38 | 36 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 size_t num_audio_streams_; | 104 size_t num_audio_streams_; |
| 107 | 105 |
| 108 private: | 106 private: |
| 109 // TODO(holmer): Remove once VoiceEngine is fully refactored to the new API. | 107 // TODO(holmer): Remove once VoiceEngine is fully refactored to the new API. |
| 110 // These methods are used to set up legacy voice engines and channels which is | 108 // These methods are used to set up legacy voice engines and channels which is |
| 111 // necessary while voice engine is being refactored to the new stream API. | 109 // necessary while voice engine is being refactored to the new stream API. |
| 112 struct VoiceEngineState { | 110 struct VoiceEngineState { |
| 113 VoiceEngineState() | 111 VoiceEngineState() |
| 114 : voice_engine(nullptr), | 112 : voice_engine(nullptr), |
| 115 base(nullptr), | 113 base(nullptr), |
| 116 network(nullptr), | |
| 117 codec(nullptr), | 114 codec(nullptr), |
| 118 channel_id(-1), | 115 channel_id(-1) {} |
| 119 transport_adapter(nullptr) {} | |
| 120 | 116 |
| 121 VoiceEngine* voice_engine; | 117 VoiceEngine* voice_engine; |
| 122 VoEBase* base; | 118 VoEBase* base; |
| 123 VoENetwork* network; | |
| 124 VoECodec* codec; | 119 VoECodec* codec; |
| 125 int channel_id; | 120 int channel_id; |
| 126 rtc::scoped_ptr<internal::TransportAdapter> transport_adapter; | |
| 127 }; | 121 }; |
| 128 | 122 |
| 129 void CreateVoiceEngines(); | 123 void CreateVoiceEngines(); |
| 130 void SetupVoiceEngineTransports(PacketTransport* send_transport, | |
| 131 PacketTransport* recv_transport); | |
| 132 void DestroyVoiceEngines(); | 124 void DestroyVoiceEngines(); |
| 133 | 125 |
| 134 VoiceEngineState voe_send_; | 126 VoiceEngineState voe_send_; |
| 135 VoiceEngineState voe_recv_; | 127 VoiceEngineState voe_recv_; |
| 136 | 128 |
| 137 // The audio devices must outlive the voice engines. | 129 // The audio devices must outlive the voice engines. |
| 138 rtc::scoped_ptr<test::FakeAudioDevice> fake_send_audio_device_; | 130 rtc::scoped_ptr<test::FakeAudioDevice> fake_send_audio_device_; |
| 139 rtc::scoped_ptr<test::FakeAudioDevice> fake_recv_audio_device_; | 131 rtc::scoped_ptr<test::FakeAudioDevice> fake_recv_audio_device_; |
| 140 }; | 132 }; |
| 141 | 133 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 public: | 179 public: |
| 188 explicit EndToEndTest(unsigned int timeout_ms); | 180 explicit EndToEndTest(unsigned int timeout_ms); |
| 189 | 181 |
| 190 bool ShouldCreateReceivers() const override; | 182 bool ShouldCreateReceivers() const override; |
| 191 }; | 183 }; |
| 192 | 184 |
| 193 } // namespace test | 185 } // namespace test |
| 194 } // namespace webrtc | 186 } // namespace webrtc |
| 195 | 187 |
| 196 #endif // WEBRTC_TEST_CALL_TEST_H_ | 188 #endif // WEBRTC_TEST_CALL_TEST_H_ |
| OLD | NEW |