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

@ -18,6 +18,7 @@
#include "absl/algorithm/container.h"
#include "absl/strings/match.h"
#include "api/datagram_transport_interface.h"
#include "api/video/video_codec_constants.h"
#include "api/video_codecs/sdp_video_format.h"
#include "api/video_codecs/video_decoder_factory.h"
@ -1101,6 +1102,13 @@ bool WebRtcVideoChannel::AddSendStream(const StreamParams& sp) {
config.rtp.extmap_allow_mixed = ExtmapAllowMixed();
config.rtcp_report_interval_ms = video_config_.rtcp_report_interval_ms;
// If sending through Datagram Transport, limit packet size to maximum
// packet size supported by datagram_transport.
if (media_transport_config().rtp_max_packet_size) {
config.rtp.max_packet_size =
media_transport_config().rtp_max_packet_size.value();
}
WebRtcVideoSendStream* stream = new WebRtcVideoSendStream(
call_, sp, std::move(config), default_send_options_,
video_config_.enable_cpu_adaptation, bitrate_config_.max_bitrate_bps,