Datagram Transport Integration

- Implement datagram transport adaptor, which wraps datagram transport in DtlsTransportInternal. Datagram adaptor owns both ICE and Datagram Transports.
- Implement setup of datagram transport based on RTCConfiguration flag use_datagram_transport. This is very similar to MediaTransport setup with the exception that we create DTLS datagram adaptor.
- Propagate maximum datagram size to video encoder via MediaTransportConfig.

TODO: Currently this CL can only be tested in downstream projects. Once we add fake datagram transport, we will be able to implement unit tests similar to loopback media transport.

Bug: webrtc:9719
Change-Id: I4fa4a5725598dfee5da4f0f374269a7e289d48ed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138100
Commit-Queue: Anton Sukhanov <sukhanov@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28047}
This commit is contained in:
Anton Sukhanov
2019-05-23 15:50:38 -07:00
committed by Commit Bot
parent c1c0d6d8ad
commit 316f3ac13b
17 changed files with 917 additions and 98 deletions

View File

@ -442,7 +442,7 @@ TEST_F(JsepTransportControllerTest,
.ok());
FakeMediaTransport* media_transport = static_cast<FakeMediaTransport*>(
transport_controller_->GetMediaTransport(kAudioMid1));
transport_controller_->GetMediaTransportForDataChannel(kAudioMid1));
ASSERT_NE(nullptr, media_transport);
@ -451,7 +451,8 @@ TEST_F(JsepTransportControllerTest,
EXPECT_TRUE(media_transport->pre_shared_key().has_value());
// Return nullptr for non-existing mids.
EXPECT_EQ(nullptr, transport_controller_->GetMediaTransport(kVideoMid2));
EXPECT_EQ(nullptr,
transport_controller_->GetMediaTransportForDataChannel(kVideoMid2));
EXPECT_EQ(cricket::ICE_CANDIDATE_COMPONENT_RTP,
transport_controller_->GetDtlsTransport(kAudioMid1)->component())
@ -563,8 +564,6 @@ TEST_F(JsepTransportControllerTest, GetMediaTransportInCallee) {
EXPECT_EQ(absl::nullopt, media_transport->settings().pre_shared_key);
EXPECT_TRUE(media_transport->is_connected());
EXPECT_EQ("fake-remote-settings",
media_transport->remote_transport_parameters());
// Return nullptr for non-existing mids.
EXPECT_EQ(nullptr, transport_controller_->GetMediaTransport(kVideoMid2));