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

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

Issue 2880323002: Move ownership of RtpTransportControllerSendInterface from Call to PeerConnection.
Patch Set: Delete shadowing member variables in BitrateEstimatorTest. Created 3 years, 6 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/pc/peerconnection.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_
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/logging/rtc_event_log/rtc_event_log.h" 18 #include "webrtc/logging/rtc_event_log/rtc_event_log.h"
18 #include "webrtc/test/encoder_settings.h" 19 #include "webrtc/test/encoder_settings.h"
19 #include "webrtc/test/fake_audio_device.h" 20 #include "webrtc/test/fake_audio_device.h"
20 #include "webrtc/test/fake_decoder.h" 21 #include "webrtc/test/fake_decoder.h"
21 #include "webrtc/test/fake_encoder.h" 22 #include "webrtc/test/fake_encoder.h"
22 #include "webrtc/test/fake_videorenderer.h" 23 #include "webrtc/test/fake_videorenderer.h"
23 #include "webrtc/test/frame_generator_capturer.h" 24 #include "webrtc/test/frame_generator_capturer.h"
24 #include "webrtc/test/rtp_rtcp_observer.h" 25 #include "webrtc/test/rtp_rtcp_observer.h"
25 26
26 namespace webrtc { 27 namespace webrtc {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 static const std::map<uint8_t, MediaType> payload_type_map_; 61 static const std::map<uint8_t, MediaType> payload_type_map_;
61 62
62 protected: 63 protected:
63 // RunBaseTest overwrites the audio_state and the voice_engine of the send and 64 // RunBaseTest overwrites the audio_state and the voice_engine of the send and
64 // receive Call configs to simplify test code and avoid having old VoiceEngine 65 // receive Call configs to simplify test code and avoid having old VoiceEngine
65 // APIs in the tests. 66 // APIs in the tests.
66 void RunBaseTest(BaseTest* test); 67 void RunBaseTest(BaseTest* test);
67 68
68 void CreateCalls(const Call::Config& sender_config, 69 void CreateCalls(const Call::Config& sender_config,
69 const Call::Config& receiver_config); 70 const Call::Config& receiver_config);
70 void CreateSenderCall(const Call::Config& config); 71 void CreateSenderCall(Call::Config config);
71 void CreateReceiverCall(const Call::Config& config); 72 void CreateReceiverCall(Call::Config config);
72 void DestroyCalls(); 73 void DestroyCalls();
73 74
74 void CreateSendConfig(size_t num_video_streams, 75 void CreateSendConfig(size_t num_video_streams,
75 size_t num_audio_streams, 76 size_t num_audio_streams,
76 size_t num_flexfec_streams, 77 size_t num_flexfec_streams,
77 Transport* send_transport); 78 Transport* send_transport);
78 79
79 void CreateMatchingReceiveConfigs(Transport* rtcp_send_transport); 80 void CreateMatchingReceiveConfigs(Transport* rtcp_send_transport);
80 81
81 void CreateFrameGeneratorCapturerWithDrift(Clock* drift_clock, 82 void CreateFrameGeneratorCapturerWithDrift(Clock* drift_clock,
(...skipping 10 matching lines...) Expand all
92 void CreateAudioStreams(); 93 void CreateAudioStreams();
93 void CreateFlexfecStreams(); 94 void CreateFlexfecStreams();
94 void Start(); 95 void Start();
95 void Stop(); 96 void Stop();
96 void DestroyStreams(); 97 void DestroyStreams();
97 void SetFakeVideoCaptureRotation(VideoRotation rotation); 98 void SetFakeVideoCaptureRotation(VideoRotation rotation);
98 99
99 Clock* const clock_; 100 Clock* const clock_;
100 101
101 std::unique_ptr<webrtc::RtcEventLog> event_log_; 102 std::unique_ptr<webrtc::RtcEventLog> event_log_;
103 std::unique_ptr<RtpTransportControllerSend> sender_rtp_transport_send_;
102 std::unique_ptr<Call> sender_call_; 104 std::unique_ptr<Call> sender_call_;
103 std::unique_ptr<PacketTransport> send_transport_; 105 std::unique_ptr<PacketTransport> send_transport_;
104 VideoSendStream::Config video_send_config_; 106 VideoSendStream::Config video_send_config_;
105 VideoEncoderConfig video_encoder_config_; 107 VideoEncoderConfig video_encoder_config_;
106 VideoSendStream* video_send_stream_; 108 VideoSendStream* video_send_stream_;
107 AudioSendStream::Config audio_send_config_; 109 AudioSendStream::Config audio_send_config_;
108 AudioSendStream* audio_send_stream_; 110 AudioSendStream* audio_send_stream_;
109 111
112 // Needed at for sending feedback messages.
113 std::unique_ptr<RtpTransportControllerSend> receiver_rtp_transport_send_;
110 std::unique_ptr<Call> receiver_call_; 114 std::unique_ptr<Call> receiver_call_;
111 std::unique_ptr<PacketTransport> receive_transport_; 115 std::unique_ptr<PacketTransport> receive_transport_;
112 std::vector<VideoReceiveStream::Config> video_receive_configs_; 116 std::vector<VideoReceiveStream::Config> video_receive_configs_;
113 std::vector<VideoReceiveStream*> video_receive_streams_; 117 std::vector<VideoReceiveStream*> video_receive_streams_;
114 std::vector<AudioReceiveStream::Config> audio_receive_configs_; 118 std::vector<AudioReceiveStream::Config> audio_receive_configs_;
115 std::vector<AudioReceiveStream*> audio_receive_streams_; 119 std::vector<AudioReceiveStream*> audio_receive_streams_;
116 std::vector<FlexfecReceiveStream::Config> flexfec_receive_configs_; 120 std::vector<FlexfecReceiveStream::Config> flexfec_receive_configs_;
117 std::vector<FlexfecReceiveStream*> flexfec_receive_streams_; 121 std::vector<FlexfecReceiveStream*> flexfec_receive_streams_;
118 122
119 std::unique_ptr<test::FrameGeneratorCapturer> frame_generator_capturer_; 123 std::unique_ptr<test::FrameGeneratorCapturer> frame_generator_capturer_;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 EndToEndTest(); 224 EndToEndTest();
221 explicit EndToEndTest(unsigned int timeout_ms); 225 explicit EndToEndTest(unsigned int timeout_ms);
222 226
223 bool ShouldCreateReceivers() const override; 227 bool ShouldCreateReceivers() const override;
224 }; 228 };
225 229
226 } // namespace test 230 } // namespace test
227 } // namespace webrtc 231 } // namespace webrtc
228 232
229 #endif // WEBRTC_TEST_CALL_TEST_H_ 233 #endif // WEBRTC_TEST_CALL_TEST_H_
OLDNEW
« no previous file with comments | « webrtc/pc/peerconnection.cc ('k') | webrtc/test/call_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698