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_ |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 Transport* send_transport); | 76 Transport* send_transport); |
77 | 77 |
78 void CreateMatchingReceiveConfigs(Transport* rtcp_send_transport); | 78 void CreateMatchingReceiveConfigs(Transport* rtcp_send_transport); |
79 | 79 |
80 void CreateFrameGeneratorCapturerWithDrift(Clock* drift_clock, | 80 void CreateFrameGeneratorCapturerWithDrift(Clock* drift_clock, |
81 float speed, | 81 float speed, |
82 int framerate, | 82 int framerate, |
83 int width, | 83 int width, |
84 int height); | 84 int height); |
85 void CreateFrameGeneratorCapturer(int framerate, int width, int height); | 85 void CreateFrameGeneratorCapturer(int framerate, int width, int height); |
86 void CreateFakeAudioDevices(); | 86 void CreateFakeAudioDevices( |
| 87 std::unique_ptr<FakeAudioDevice::Capturer> capturer, |
| 88 std::unique_ptr<FakeAudioDevice::Renderer> renderer); |
87 | 89 |
88 void CreateVideoStreams(); | 90 void CreateVideoStreams(); |
89 void CreateAudioStreams(); | 91 void CreateAudioStreams(); |
90 void CreateFlexfecStreams(); | 92 void CreateFlexfecStreams(); |
91 void Start(); | 93 void Start(); |
92 void Stop(); | 94 void Stop(); |
93 void DestroyStreams(); | 95 void DestroyStreams(); |
94 void SetFakeVideoCaptureRotation(VideoRotation rotation); | 96 void SetFakeVideoCaptureRotation(VideoRotation rotation); |
95 | 97 |
96 Clock* const clock_; | 98 Clock* const clock_; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 explicit BaseTest(unsigned int timeout_ms); | 156 explicit BaseTest(unsigned int timeout_ms); |
155 virtual ~BaseTest(); | 157 virtual ~BaseTest(); |
156 | 158 |
157 virtual void PerformTest() = 0; | 159 virtual void PerformTest() = 0; |
158 virtual bool ShouldCreateReceivers() const = 0; | 160 virtual bool ShouldCreateReceivers() const = 0; |
159 | 161 |
160 virtual size_t GetNumVideoStreams() const; | 162 virtual size_t GetNumVideoStreams() const; |
161 virtual size_t GetNumAudioStreams() const; | 163 virtual size_t GetNumAudioStreams() const; |
162 virtual size_t GetNumFlexfecStreams() const; | 164 virtual size_t GetNumFlexfecStreams() const; |
163 | 165 |
| 166 virtual std::unique_ptr<FakeAudioDevice::Capturer> CreateCapturer(); |
| 167 virtual std::unique_ptr<FakeAudioDevice::Renderer> CreateRenderer(); |
| 168 virtual void OnFakeAudioDevicesCreated(FakeAudioDevice* send_audio_device, |
| 169 FakeAudioDevice* recv_audio_device); |
| 170 |
164 virtual Call::Config GetSenderCallConfig(); | 171 virtual Call::Config GetSenderCallConfig(); |
165 virtual Call::Config GetReceiverCallConfig(); | 172 virtual Call::Config GetReceiverCallConfig(); |
166 virtual void OnCallsCreated(Call* sender_call, Call* receiver_call); | 173 virtual void OnCallsCreated(Call* sender_call, Call* receiver_call); |
167 | 174 |
168 virtual test::PacketTransport* CreateSendTransport(Call* sender_call); | 175 virtual test::PacketTransport* CreateSendTransport(Call* sender_call); |
169 virtual test::PacketTransport* CreateReceiveTransport(); | 176 virtual test::PacketTransport* CreateReceiveTransport(); |
170 | 177 |
171 virtual void ModifyVideoConfigs( | 178 virtual void ModifyVideoConfigs( |
172 VideoSendStream::Config* send_config, | 179 VideoSendStream::Config* send_config, |
173 std::vector<VideoReceiveStream::Config>* receive_configs, | 180 std::vector<VideoReceiveStream::Config>* receive_configs, |
(...skipping 13 matching lines...) Expand all Loading... |
187 const std::vector<AudioReceiveStream*>& receive_streams); | 194 const std::vector<AudioReceiveStream*>& receive_streams); |
188 | 195 |
189 virtual void ModifyFlexfecConfigs( | 196 virtual void ModifyFlexfecConfigs( |
190 std::vector<FlexfecReceiveStream::Config>* receive_configs); | 197 std::vector<FlexfecReceiveStream::Config>* receive_configs); |
191 virtual void OnFlexfecStreamsCreated( | 198 virtual void OnFlexfecStreamsCreated( |
192 const std::vector<FlexfecReceiveStream*>& receive_streams); | 199 const std::vector<FlexfecReceiveStream*>& receive_streams); |
193 | 200 |
194 virtual void OnFrameGeneratorCapturerCreated( | 201 virtual void OnFrameGeneratorCapturerCreated( |
195 FrameGeneratorCapturer* frame_generator_capturer); | 202 FrameGeneratorCapturer* frame_generator_capturer); |
196 | 203 |
| 204 virtual void OnTestFinished(); |
| 205 |
197 webrtc::RtcEventLogNullImpl event_log_; | 206 webrtc::RtcEventLogNullImpl event_log_; |
198 }; | 207 }; |
199 | 208 |
200 class SendTest : public BaseTest { | 209 class SendTest : public BaseTest { |
201 public: | 210 public: |
202 explicit SendTest(unsigned int timeout_ms); | 211 explicit SendTest(unsigned int timeout_ms); |
203 | 212 |
204 bool ShouldCreateReceivers() const override; | 213 bool ShouldCreateReceivers() const override; |
205 }; | 214 }; |
206 | 215 |
207 class EndToEndTest : public BaseTest { | 216 class EndToEndTest : public BaseTest { |
208 public: | 217 public: |
209 EndToEndTest(); | 218 EndToEndTest(); |
210 explicit EndToEndTest(unsigned int timeout_ms); | 219 explicit EndToEndTest(unsigned int timeout_ms); |
211 | 220 |
212 bool ShouldCreateReceivers() const override; | 221 bool ShouldCreateReceivers() const override; |
213 }; | 222 }; |
214 | 223 |
215 } // namespace test | 224 } // namespace test |
216 } // namespace webrtc | 225 } // namespace webrtc |
217 | 226 |
218 #endif // WEBRTC_TEST_CALL_TEST_H_ | 227 #endif // WEBRTC_TEST_CALL_TEST_H_ |
OLD | NEW |