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

Side by Side Diff: webrtc/video/bitrate_estimator_tests.cc

Issue 1273363005: Add send transports to individual webrtc::Call streams. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase+comment Created 5 years, 3 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.cc ('k') | webrtc/video/call.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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 <functional> 10 #include <functional>
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 static const int kASTExtensionId = 5; 114 static const int kASTExtensionId = 5;
115 115
116 class BitrateEstimatorTest : public test::CallTest { 116 class BitrateEstimatorTest : public test::CallTest {
117 public: 117 public:
118 BitrateEstimatorTest() 118 BitrateEstimatorTest()
119 : receiver_trace_(), 119 : receiver_trace_(),
120 send_transport_(), 120 send_transport_(),
121 receive_transport_(), 121 receive_transport_(),
122 sender_call_(), 122 sender_call_(),
123 receiver_call_(), 123 receiver_call_(),
124 receive_config_(), 124 receive_config_(nullptr),
125 streams_() { 125 streams_() {
126 } 126 }
127 127
128 virtual ~BitrateEstimatorTest() { 128 virtual ~BitrateEstimatorTest() {
129 EXPECT_TRUE(streams_.empty()); 129 EXPECT_TRUE(streams_.empty());
130 } 130 }
131 131
132 virtual void SetUp() { 132 virtual void SetUp() {
133 Call::Config receiver_call_config(&receive_transport_); 133 receiver_call_.reset(Call::Create(Call::Config()));
134 receiver_call_.reset(Call::Create(receiver_call_config)); 134 sender_call_.reset(Call::Create(Call::Config()));
135
136 Call::Config sender_call_config(&send_transport_);
137 sender_call_.reset(Call::Create(sender_call_config));
138 135
139 send_transport_.SetReceiver(receiver_call_->Receiver()); 136 send_transport_.SetReceiver(receiver_call_->Receiver());
140 receive_transport_.SetReceiver(sender_call_->Receiver()); 137 receive_transport_.SetReceiver(sender_call_->Receiver());
141 138
142 send_config_ = VideoSendStream::Config(); 139 send_config_ = VideoSendStream::Config(&send_transport_);
143 send_config_.rtp.ssrcs.push_back(kSendSsrcs[0]); 140 send_config_.rtp.ssrcs.push_back(kSendSsrcs[0]);
144 // Encoders will be set separately per stream. 141 // Encoders will be set separately per stream.
145 send_config_.encoder_settings.encoder = nullptr; 142 send_config_.encoder_settings.encoder = nullptr;
146 send_config_.encoder_settings.payload_name = "FAKE"; 143 send_config_.encoder_settings.payload_name = "FAKE";
147 send_config_.encoder_settings.payload_type = kFakeSendPayloadType; 144 send_config_.encoder_settings.payload_type = kFakeSendPayloadType;
148 encoder_config_.streams = test::CreateVideoStreams(1); 145 encoder_config_.streams = test::CreateVideoStreams(1);
149 146
150 receive_config_ = VideoReceiveStream::Config(); 147 receive_config_ = VideoReceiveStream::Config(&receive_transport_);
151 // receive_config_.decoders will be set by every stream separately. 148 // receive_config_.decoders will be set by every stream separately.
152 receive_config_.rtp.remote_ssrc = send_config_.rtp.ssrcs[0]; 149 receive_config_.rtp.remote_ssrc = send_config_.rtp.ssrcs[0];
153 receive_config_.rtp.local_ssrc = kReceiverLocalSsrc; 150 receive_config_.rtp.local_ssrc = kReceiverLocalSsrc;
154 receive_config_.rtp.remb = true; 151 receive_config_.rtp.remb = true;
155 receive_config_.rtp.extensions.push_back( 152 receive_config_.rtp.extensions.push_back(
156 RtpExtension(RtpExtension::kTOffset, kTOFExtensionId)); 153 RtpExtension(RtpExtension::kTOffset, kTOFExtensionId));
157 receive_config_.rtp.extensions.push_back( 154 receive_config_.rtp.extensions.push_back(
158 RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId)); 155 RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId));
159 } 156 }
160 157
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 RtpExtension(RtpExtension::kTOffset, kTOFExtensionId); 359 RtpExtension(RtpExtension::kTOffset, kTOFExtensionId);
363 receiver_trace_.PushExpectedLogLine( 360 receiver_trace_.PushExpectedLogLine(
364 "WrappingBitrateEstimator: Switching to transmission time offset RBE."); 361 "WrappingBitrateEstimator: Switching to transmission time offset RBE.");
365 receiver_trace_.PushExpectedLogLine(kSingleStreamLog); 362 receiver_trace_.PushExpectedLogLine(kSingleStreamLog);
366 streams_.push_back(new Stream(this, false)); 363 streams_.push_back(new Stream(this, false));
367 streams_[0]->StopSending(); 364 streams_[0]->StopSending();
368 streams_[1]->StopSending(); 365 streams_[1]->StopSending();
369 EXPECT_EQ(kEventSignaled, receiver_trace_.Wait()); 366 EXPECT_EQ(kEventSignaled, receiver_trace_.Wait());
370 } 367 }
371 } // namespace webrtc 368 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/test/call_test.cc ('k') | webrtc/video/call.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698