This changes PeerConnection to allow sending and receiving data channel
messages over the media transport. If |use_media_transport_for_data_channels|
is set, PeerConnection will use a DCT_MEDIA_TRANSPORT mode for data
channels.
DCT_MEDIA_TRANSPORT acts exactly like DCT_SCTP within the data channel
and peer connection layers. On the transport layer, it uses the media
transport instead of SCTP. It appears as an RTP data channel in SDP
(just as media over media-transport appears as RTP in SDP).
Bug: webrtc:9719
Change-Id: I6a90142bd3f43668479c825ed02689dcd0d58b78
Reviewed-on: https://webrtc-review.googlesource.com/c/109740
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25575}
This enables PeerConnection tests to use LoopbackMediaTransport to test
data-channel-over-media-transport code.
Also changes LoopbackMediaTransport to invoke callbacks asynchronously.
This is more accurate, as these callbacks are triggered by network
events. The caller should not block while the callback executes.
Since LoopbackMediaTransport is used for testing, it provides a
FlushAsyncInvokes() method which may be used to ensure that callbacks
occur deterministically (eg. before checking that data has been
received).
Bug: webrtc:9719
Change-Id: Ib8ea9aebf4a0ad3d5934a6fe4ab33432c68523fd
Tbr: stefan@webrtc.org
Reviewed-on: https://webrtc-review.googlesource.com/c/109060
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25489}