Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: webrtc/test/call_test.h

Issue 2694203002: Low-bandwidth audio testing (Closed)
Patch Set: Fix build errors Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 explicit BaseTest(unsigned int timeout_ms); 155 explicit BaseTest(unsigned int timeout_ms);
154 virtual ~BaseTest(); 156 virtual ~BaseTest();
155 157
156 virtual void PerformTest() = 0; 158 virtual void PerformTest() = 0;
157 virtual bool ShouldCreateReceivers() const = 0; 159 virtual bool ShouldCreateReceivers() const = 0;
158 160
159 virtual size_t GetNumVideoStreams() const; 161 virtual size_t GetNumVideoStreams() const;
160 virtual size_t GetNumAudioStreams() const; 162 virtual size_t GetNumAudioStreams() const;
161 virtual size_t GetNumFlexfecStreams() const; 163 virtual size_t GetNumFlexfecStreams() const;
162 164
165 virtual std::unique_ptr<FakeAudioDevice::Capturer> CreateCapturer();
166 virtual std::unique_ptr<FakeAudioDevice::Renderer> CreateRenderer();
167 virtual void OnFakeAudioDevicesCreated(FakeAudioDevice* send_audio_device,
168 FakeAudioDevice* recv_audio_device);
169
163 virtual Call::Config GetSenderCallConfig(); 170 virtual Call::Config GetSenderCallConfig();
164 virtual Call::Config GetReceiverCallConfig(); 171 virtual Call::Config GetReceiverCallConfig();
165 virtual void OnCallsCreated(Call* sender_call, Call* receiver_call); 172 virtual void OnCallsCreated(Call* sender_call, Call* receiver_call);
166 173
167 virtual test::PacketTransport* CreateSendTransport(Call* sender_call); 174 virtual test::PacketTransport* CreateSendTransport(Call* sender_call);
168 virtual test::PacketTransport* CreateReceiveTransport(); 175 virtual test::PacketTransport* CreateReceiveTransport();
169 176
170 virtual void ModifyVideoConfigs( 177 virtual void ModifyVideoConfigs(
171 VideoSendStream::Config* send_config, 178 VideoSendStream::Config* send_config,
172 std::vector<VideoReceiveStream::Config>* receive_configs, 179 std::vector<VideoReceiveStream::Config>* receive_configs,
(...skipping 13 matching lines...) Expand all
186 const std::vector<AudioReceiveStream*>& receive_streams); 193 const std::vector<AudioReceiveStream*>& receive_streams);
187 194
188 virtual void ModifyFlexfecConfigs( 195 virtual void ModifyFlexfecConfigs(
189 std::vector<FlexfecReceiveStream::Config>* receive_configs); 196 std::vector<FlexfecReceiveStream::Config>* receive_configs);
190 virtual void OnFlexfecStreamsCreated( 197 virtual void OnFlexfecStreamsCreated(
191 const std::vector<FlexfecReceiveStream*>& receive_streams); 198 const std::vector<FlexfecReceiveStream*>& receive_streams);
192 199
193 virtual void OnFrameGeneratorCapturerCreated( 200 virtual void OnFrameGeneratorCapturerCreated(
194 FrameGeneratorCapturer* frame_generator_capturer); 201 FrameGeneratorCapturer* frame_generator_capturer);
195 202
203 virtual void OnTestFinished();
204
196 webrtc::RtcEventLogNullImpl event_log_; 205 webrtc::RtcEventLogNullImpl event_log_;
197 }; 206 };
198 207
199 class SendTest : public BaseTest { 208 class SendTest : public BaseTest {
200 public: 209 public:
201 explicit SendTest(unsigned int timeout_ms); 210 explicit SendTest(unsigned int timeout_ms);
202 211
203 bool ShouldCreateReceivers() const override; 212 bool ShouldCreateReceivers() const override;
204 }; 213 };
205 214
206 class EndToEndTest : public BaseTest { 215 class EndToEndTest : public BaseTest {
207 public: 216 public:
208 explicit EndToEndTest(unsigned int timeout_ms); 217 explicit EndToEndTest(unsigned int timeout_ms);
209 218
210 bool ShouldCreateReceivers() const override; 219 bool ShouldCreateReceivers() const override;
211 }; 220 };
212 221
213 } // namespace test 222 } // namespace test
214 } // namespace webrtc 223 } // namespace webrtc
215 224
216 #endif // WEBRTC_TEST_CALL_TEST_H_ 225 #endif // WEBRTC_TEST_CALL_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698