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:
committed by
Commit Bot
parent
c1c0d6d8ad
commit
316f3ac13b
@ -13,10 +13,13 @@
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "api/crypto/crypto_options.h"
|
||||
#include "api/datagram_transport_interface.h"
|
||||
#include "api/dtls_transport_interface.h"
|
||||
#include "api/scoped_refptr.h"
|
||||
#include "p2p/base/ice_transport_internal.h"
|
||||
#include "p2p/base/packet_transport_internal.h"
|
||||
@ -41,6 +44,9 @@ enum DtlsTransportState {
|
||||
DTLS_TRANSPORT_FAILED,
|
||||
};
|
||||
|
||||
webrtc::DtlsTransportState ConvertDtlsTransportState(
|
||||
cricket::DtlsTransportState cricket_state);
|
||||
|
||||
enum PacketFlags {
|
||||
PF_NORMAL = 0x00, // A normal packet.
|
||||
PF_SRTP_BYPASS = 0x01, // An encrypted SRTP packet; bypass any additional
|
||||
@ -59,6 +65,14 @@ class DtlsTransportInternal : public rtc::PacketTransportInternal {
|
||||
|
||||
virtual const webrtc::CryptoOptions& crypto_options() const = 0;
|
||||
|
||||
// Returns datagram transport or nullptr if not using datagram transport.
|
||||
// TODO(sukhanov): Make pure virtual.
|
||||
// TODO(sukhanov): Consider moving ownership of datagram transport and ICE
|
||||
// to JsepTransport.
|
||||
virtual webrtc::DatagramTransportInterface* datagram_transport() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
virtual DtlsTransportState dtls_state() const = 0;
|
||||
|
||||
virtual int component() const = 0;
|
||||
|
||||
Reference in New Issue
Block a user