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

Unified Diff: webrtc/test/call_test.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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/test/call_test.h ('k') | webrtc/video/bitrate_estimator_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/call_test.cc
diff --git a/webrtc/test/call_test.cc b/webrtc/test/call_test.cc
index 185ed2661b3dd2900dba63c4101dee1177460be4..19e292f6b98a6870b8585ed1771db00361c083e0 100644
--- a/webrtc/test/call_test.cc
+++ b/webrtc/test/call_test.cc
@@ -19,6 +19,7 @@ const int kVideoRotationRtpExtensionId = 4;
CallTest::CallTest()
: clock_(Clock::GetRealTimeClock()),
+ send_config_(nullptr),
send_stream_(NULL),
fake_encoder_(clock_) {
}
@@ -39,9 +40,9 @@ void CallTest::RunBaseTest(BaseTest* test) {
test->SetReceivers(sender_call_->Receiver(), NULL);
}
- CreateSendConfig(test->GetNumStreams());
+ CreateSendConfig(test->GetNumStreams(), test->SendTransport());
if (test->ShouldCreateReceivers()) {
- CreateMatchingReceiveConfigs();
+ CreateMatchingReceiveConfigs(test->ReceiveTransport());
}
test->ModifyConfigs(&send_config_, &receive_configs_, &encoder_config_);
CreateStreams();
@@ -88,9 +89,10 @@ void CallTest::CreateReceiverCall(const Call::Config& config) {
receiver_call_.reset(Call::Create(config));
}
-void CallTest::CreateSendConfig(size_t num_streams) {
+void CallTest::CreateSendConfig(size_t num_streams,
+ newapi::Transport* send_transport) {
assert(num_streams <= kNumSsrcs);
- send_config_ = VideoSendStream::Config();
+ send_config_ = VideoSendStream::Config(send_transport);
send_config_.encoder_settings.encoder = &fake_encoder_;
send_config_.encoder_settings.payload_name = "FAKE";
send_config_.encoder_settings.payload_type = kFakeSendPayloadType;
@@ -103,11 +105,12 @@ void CallTest::CreateSendConfig(size_t num_streams) {
RtpExtension(RtpExtension::kVideoRotation, kVideoRotationRtpExtensionId));
}
-void CallTest::CreateMatchingReceiveConfigs() {
+void CallTest::CreateMatchingReceiveConfigs(
+ newapi::Transport* rtcp_send_transport) {
assert(!send_config_.rtp.ssrcs.empty());
assert(receive_configs_.empty());
assert(allocated_decoders_.empty());
- VideoReceiveStream::Config config;
+ VideoReceiveStream::Config config(rtcp_send_transport);
config.rtp.remb = true;
config.rtp.local_ssrc = kReceiverLocalSsrc;
for (const RtpExtension& extension : send_config_.rtp.extensions)
@@ -183,11 +186,11 @@ BaseTest::~BaseTest() {
}
Call::Config BaseTest::GetSenderCallConfig() {
- return Call::Config(SendTransport());
+ return Call::Config();
}
Call::Config BaseTest::GetReceiverCallConfig() {
- return Call::Config(ReceiveTransport());
+ return Call::Config();
}
void BaseTest::OnCallsCreated(Call* sender_call, Call* receiver_call) {
« no previous file with comments | « webrtc/test/call_test.h ('k') | webrtc/video/bitrate_estimator_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698