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

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

Issue 1369263002: Unify Transport and newapi::Transport interfaces. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: self-review Created 5 years, 2 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/test/call_test.h ('k') | webrtc/test/channel_transport/udp_transport.h » ('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 #include "webrtc/test/call_test.h" 10 #include "webrtc/test/call_test.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 void CallTest::CreateSenderCall(const Call::Config& config) { 84 void CallTest::CreateSenderCall(const Call::Config& config) {
85 sender_call_.reset(Call::Create(config)); 85 sender_call_.reset(Call::Create(config));
86 } 86 }
87 87
88 void CallTest::CreateReceiverCall(const Call::Config& config) { 88 void CallTest::CreateReceiverCall(const Call::Config& config) {
89 receiver_call_.reset(Call::Create(config)); 89 receiver_call_.reset(Call::Create(config));
90 } 90 }
91 91
92 void CallTest::CreateSendConfig(size_t num_streams, 92 void CallTest::CreateSendConfig(size_t num_streams,
93 newapi::Transport* send_transport) { 93 Transport* send_transport) {
94 assert(num_streams <= kNumSsrcs); 94 assert(num_streams <= kNumSsrcs);
95 send_config_ = VideoSendStream::Config(send_transport); 95 send_config_ = VideoSendStream::Config(send_transport);
96 send_config_.encoder_settings.encoder = &fake_encoder_; 96 send_config_.encoder_settings.encoder = &fake_encoder_;
97 send_config_.encoder_settings.payload_name = "FAKE"; 97 send_config_.encoder_settings.payload_name = "FAKE";
98 send_config_.encoder_settings.payload_type = kFakeSendPayloadType; 98 send_config_.encoder_settings.payload_type = kFakeSendPayloadType;
99 send_config_.rtp.extensions.push_back( 99 send_config_.rtp.extensions.push_back(
100 RtpExtension(RtpExtension::kAbsSendTime, kAbsSendTimeExtensionId)); 100 RtpExtension(RtpExtension::kAbsSendTime, kAbsSendTimeExtensionId));
101 encoder_config_.streams = test::CreateVideoStreams(num_streams); 101 encoder_config_.streams = test::CreateVideoStreams(num_streams);
102 for (size_t i = 0; i < num_streams; ++i) 102 for (size_t i = 0; i < num_streams; ++i)
103 send_config_.rtp.ssrcs.push_back(kSendSsrcs[i]); 103 send_config_.rtp.ssrcs.push_back(kSendSsrcs[i]);
104 send_config_.rtp.extensions.push_back( 104 send_config_.rtp.extensions.push_back(
105 RtpExtension(RtpExtension::kVideoRotation, kVideoRotationRtpExtensionId)); 105 RtpExtension(RtpExtension::kVideoRotation, kVideoRotationRtpExtensionId));
106 } 106 }
107 107
108 void CallTest::CreateMatchingReceiveConfigs( 108 void CallTest::CreateMatchingReceiveConfigs(
109 newapi::Transport* rtcp_send_transport) { 109 Transport* rtcp_send_transport) {
110 assert(!send_config_.rtp.ssrcs.empty()); 110 assert(!send_config_.rtp.ssrcs.empty());
111 assert(receive_configs_.empty()); 111 assert(receive_configs_.empty());
112 assert(allocated_decoders_.empty()); 112 assert(allocated_decoders_.empty());
113 VideoReceiveStream::Config config(rtcp_send_transport); 113 VideoReceiveStream::Config config(rtcp_send_transport);
114 config.rtp.remb = true; 114 config.rtp.remb = true;
115 config.rtp.local_ssrc = kReceiverLocalSsrc; 115 config.rtp.local_ssrc = kReceiverLocalSsrc;
116 for (const RtpExtension& extension : send_config_.rtp.extensions) 116 for (const RtpExtension& extension : send_config_.rtp.extensions)
117 config.rtp.extensions.push_back(extension); 117 config.rtp.extensions.push_back(extension);
118 for (size_t i = 0; i < send_config_.rtp.ssrcs.size(); ++i) { 118 for (size_t i = 0; i < send_config_.rtp.ssrcs.size(); ++i) {
119 VideoReceiveStream::Decoder decoder = 119 VideoReceiveStream::Decoder decoder =
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 const FakeNetworkPipe::Config& config) 234 const FakeNetworkPipe::Config& config)
235 : BaseTest(timeout_ms, config) { 235 : BaseTest(timeout_ms, config) {
236 } 236 }
237 237
238 bool EndToEndTest::ShouldCreateReceivers() const { 238 bool EndToEndTest::ShouldCreateReceivers() const {
239 return true; 239 return true;
240 } 240 }
241 241
242 } // namespace test 242 } // namespace test
243 } // namespace webrtc 243 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/test/call_test.h ('k') | webrtc/test/channel_transport/udp_transport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698