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

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

Issue 2998923002: Use SingleThreadedTaskQueue in DirectTransport (Closed)
Patch Set: Appease win_msvc_rel. Created 3 years, 4 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_
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/call.h" 16 #include "webrtc/call/call.h"
17 #include "webrtc/call/rtp_transport_controller_send.h" 17 #include "webrtc/call/rtp_transport_controller_send.h"
18 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" 18 #include "webrtc/logging/rtc_event_log/rtc_event_log.h"
19 #include "webrtc/test/encoder_settings.h" 19 #include "webrtc/test/encoder_settings.h"
20 #include "webrtc/test/fake_audio_device.h" 20 #include "webrtc/test/fake_audio_device.h"
21 #include "webrtc/test/fake_decoder.h" 21 #include "webrtc/test/fake_decoder.h"
22 #include "webrtc/test/fake_encoder.h" 22 #include "webrtc/test/fake_encoder.h"
23 #include "webrtc/test/fake_videorenderer.h" 23 #include "webrtc/test/fake_videorenderer.h"
24 #include "webrtc/test/frame_generator_capturer.h" 24 #include "webrtc/test/frame_generator_capturer.h"
25 #include "webrtc/test/rtp_rtcp_observer.h" 25 #include "webrtc/test/rtp_rtcp_observer.h"
26 #include "webrtc/test/single_threaded_task_queue.h"
26 27
27 namespace webrtc { 28 namespace webrtc {
28 29
29 class VoEBase; 30 class VoEBase;
30 31
31 namespace test { 32 namespace test {
32 33
33 class BaseTest; 34 class BaseTest;
34 35
35 class CallTest : public ::testing::Test { 36 class CallTest : public ::testing::Test {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 std::unique_ptr<test::FrameGeneratorCapturer> frame_generator_capturer_; 130 std::unique_ptr<test::FrameGeneratorCapturer> frame_generator_capturer_;
130 test::FakeEncoder fake_encoder_; 131 test::FakeEncoder fake_encoder_;
131 std::vector<std::unique_ptr<VideoDecoder>> allocated_decoders_; 132 std::vector<std::unique_ptr<VideoDecoder>> allocated_decoders_;
132 size_t num_video_streams_; 133 size_t num_video_streams_;
133 size_t num_audio_streams_; 134 size_t num_audio_streams_;
134 size_t num_flexfec_streams_; 135 size_t num_flexfec_streams_;
135 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; 136 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_;
136 rtc::scoped_refptr<AudioEncoderFactory> encoder_factory_; 137 rtc::scoped_refptr<AudioEncoderFactory> encoder_factory_;
137 test::FakeVideoRenderer fake_renderer_; 138 test::FakeVideoRenderer fake_renderer_;
138 139
140 SingleThreadedTaskQueueForTesting task_queue_;
141
139 private: 142 private:
140 // TODO(holmer): Remove once VoiceEngine is fully refactored to the new API. 143 // TODO(holmer): Remove once VoiceEngine is fully refactored to the new API.
141 // These methods are used to set up legacy voice engines and channels which is 144 // These methods are used to set up legacy voice engines and channels which is
142 // necessary while voice engine is being refactored to the new stream API. 145 // necessary while voice engine is being refactored to the new stream API.
143 struct VoiceEngineState { 146 struct VoiceEngineState {
144 VoiceEngineState() 147 VoiceEngineState()
145 : voice_engine(nullptr), 148 : voice_engine(nullptr),
146 base(nullptr), 149 base(nullptr),
147 channel_id(-1) {} 150 channel_id(-1) {}
148 151
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 virtual std::unique_ptr<FakeAudioDevice::Renderer> CreateRenderer(); 184 virtual std::unique_ptr<FakeAudioDevice::Renderer> CreateRenderer();
182 virtual void OnFakeAudioDevicesCreated(FakeAudioDevice* send_audio_device, 185 virtual void OnFakeAudioDevicesCreated(FakeAudioDevice* send_audio_device,
183 FakeAudioDevice* recv_audio_device); 186 FakeAudioDevice* recv_audio_device);
184 187
185 virtual Call::Config GetSenderCallConfig(); 188 virtual Call::Config GetSenderCallConfig();
186 virtual Call::Config GetReceiverCallConfig(); 189 virtual Call::Config GetReceiverCallConfig();
187 virtual void OnRtpTransportControllerSendCreated( 190 virtual void OnRtpTransportControllerSendCreated(
188 RtpTransportControllerSend* controller); 191 RtpTransportControllerSend* controller);
189 virtual void OnCallsCreated(Call* sender_call, Call* receiver_call); 192 virtual void OnCallsCreated(Call* sender_call, Call* receiver_call);
190 193
191 virtual test::PacketTransport* CreateSendTransport(Call* sender_call); 194 virtual test::PacketTransport* CreateSendTransport(
192 virtual test::PacketTransport* CreateReceiveTransport(); 195 SingleThreadedTaskQueueForTesting* task_queue,
196 Call* sender_call);
197 virtual test::PacketTransport* CreateReceiveTransport(
198 SingleThreadedTaskQueueForTesting* task_queue);
193 199
194 virtual void ModifyVideoConfigs( 200 virtual void ModifyVideoConfigs(
195 VideoSendStream::Config* send_config, 201 VideoSendStream::Config* send_config,
196 std::vector<VideoReceiveStream::Config>* receive_configs, 202 std::vector<VideoReceiveStream::Config>* receive_configs,
197 VideoEncoderConfig* encoder_config); 203 VideoEncoderConfig* encoder_config);
198 virtual void ModifyVideoCaptureStartResolution(int* width, 204 virtual void ModifyVideoCaptureStartResolution(int* width,
199 int* heigt, 205 int* heigt,
200 int* frame_rate); 206 int* frame_rate);
201 virtual void OnVideoStreamsCreated( 207 virtual void OnVideoStreamsCreated(
202 VideoSendStream* send_stream, 208 VideoSendStream* send_stream,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 EndToEndTest(); 240 EndToEndTest();
235 explicit EndToEndTest(unsigned int timeout_ms); 241 explicit EndToEndTest(unsigned int timeout_ms);
236 242
237 bool ShouldCreateReceivers() const override; 243 bool ShouldCreateReceivers() const override;
238 }; 244 };
239 245
240 } // namespace test 246 } // namespace test
241 } // namespace webrtc 247 } // namespace webrtc
242 248
243 #endif // WEBRTC_TEST_CALL_TEST_H_ 249 #endif // WEBRTC_TEST_CALL_TEST_H_
OLDNEW
« no previous file with comments | « webrtc/test/BUILD.gn ('k') | webrtc/test/call_test.cc » ('j') | webrtc/test/direct_transport.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698