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

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

Issue 1573453002: Add CreateSend/ReceiveTransport() methods to CallTest. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « webrtc/call/rampup_tests.cc ('k') | webrtc/test/call_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 static const uint32_t kVideoSendSsrcs[kNumSsrcs]; 51 static const uint32_t kVideoSendSsrcs[kNumSsrcs];
52 static const uint32_t kAudioSendSsrc; 52 static const uint32_t kAudioSendSsrc;
53 static const uint32_t kReceiverLocalVideoSsrc; 53 static const uint32_t kReceiverLocalVideoSsrc;
54 static const uint32_t kReceiverLocalAudioSsrc; 54 static const uint32_t kReceiverLocalAudioSsrc;
55 static const int kNackRtpHistoryMs; 55 static const int kNackRtpHistoryMs;
56 56
57 protected: 57 protected:
58 // RunBaseTest overwrites the audio_state and the voice_engine of the send and 58 // RunBaseTest overwrites the audio_state and the voice_engine of the send and
59 // receive Call configs to simplify test code and avoid having old VoiceEngine 59 // receive Call configs to simplify test code and avoid having old VoiceEngine
60 // APIs in the tests. 60 // APIs in the tests.
61 void RunBaseTest(BaseTest* test, const FakeNetworkPipe::Config& config); 61 void RunBaseTest(BaseTest* test);
62 62
63 void CreateCalls(const Call::Config& sender_config, 63 void CreateCalls(const Call::Config& sender_config,
64 const Call::Config& receiver_config); 64 const Call::Config& receiver_config);
65 void CreateSenderCall(const Call::Config& config); 65 void CreateSenderCall(const Call::Config& config);
66 void CreateReceiverCall(const Call::Config& config); 66 void CreateReceiverCall(const Call::Config& config);
67 void DestroyCalls(); 67 void DestroyCalls();
68 68
69 void CreateSendConfig(size_t num_video_streams, 69 void CreateSendConfig(size_t num_video_streams,
70 size_t num_audio_streams, 70 size_t num_audio_streams,
71 Transport* send_transport); 71 Transport* send_transport);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 virtual void PerformTest() = 0; 145 virtual void PerformTest() = 0;
146 virtual bool ShouldCreateReceivers() const = 0; 146 virtual bool ShouldCreateReceivers() const = 0;
147 147
148 virtual size_t GetNumVideoStreams() const; 148 virtual size_t GetNumVideoStreams() const;
149 virtual size_t GetNumAudioStreams() const; 149 virtual size_t GetNumAudioStreams() const;
150 150
151 virtual Call::Config GetSenderCallConfig(); 151 virtual Call::Config GetSenderCallConfig();
152 virtual Call::Config GetReceiverCallConfig(); 152 virtual Call::Config GetReceiverCallConfig();
153 virtual void OnCallsCreated(Call* sender_call, Call* receiver_call); 153 virtual void OnCallsCreated(Call* sender_call, Call* receiver_call);
154 virtual void OnTransportsCreated(PacketTransport* send_transport, 154
155 PacketTransport* receive_transport); 155 virtual test::PacketTransport* CreateSendTransport(Call* sender_call);
156 virtual test::PacketTransport* CreateReceiveTransport();
156 157
157 virtual void ModifyVideoConfigs( 158 virtual void ModifyVideoConfigs(
158 VideoSendStream::Config* send_config, 159 VideoSendStream::Config* send_config,
159 std::vector<VideoReceiveStream::Config>* receive_configs, 160 std::vector<VideoReceiveStream::Config>* receive_configs,
160 VideoEncoderConfig* encoder_config); 161 VideoEncoderConfig* encoder_config);
161 virtual void OnVideoStreamsCreated( 162 virtual void OnVideoStreamsCreated(
162 VideoSendStream* send_stream, 163 VideoSendStream* send_stream,
163 const std::vector<VideoReceiveStream*>& receive_streams); 164 const std::vector<VideoReceiveStream*>& receive_streams);
164 165
165 virtual void ModifyAudioConfigs( 166 virtual void ModifyAudioConfigs(
(...skipping 18 matching lines...) Expand all
184 public: 185 public:
185 explicit EndToEndTest(unsigned int timeout_ms); 186 explicit EndToEndTest(unsigned int timeout_ms);
186 187
187 bool ShouldCreateReceivers() const override; 188 bool ShouldCreateReceivers() const override;
188 }; 189 };
189 190
190 } // namespace test 191 } // namespace test
191 } // namespace webrtc 192 } // namespace webrtc
192 193
193 #endif // WEBRTC_TEST_CALL_TEST_H_ 194 #endif // WEBRTC_TEST_CALL_TEST_H_
OLDNEW
« no previous file with comments | « webrtc/call/rampup_tests.cc ('k') | webrtc/test/call_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698