Reland of: Separating SCTP code from BaseChannel/MediaChannel.
The BaseChannel code is geared around RTP; the presence of media engines,
send and receive streams, SRTP, SDP directional attribute negotiation, etc.
It doesn't make sense to use it for SCTP as well. This separation should make
future work both on BaseChannel and the SCTP code paths easier.
SctpDataEngine now becomes SctpTransport, and is used by WebRtcSession
directly. cricket::DataChannel is also renamed, to RtpDataChannel, so it
doesn't get confused with webrtc::DataChannel any more.
Beyond just moving code around, some consequences of this CL:
- We'll now stop using the worker thread for SCTP. Packets will be
processed right on the network thread instead.
- The SDP directional attribute is ignored, as it's supposed to be.
BUG=None
Review-Url: https://codereview.webrtc.org/2564333002
Cr-Original-Commit-Position: refs/heads/master@{#15906}
Committed: https://chromium.googlesource.com/external/webrtc/+/67b3bbe639645ab719972682359acda303d94454
Review-Url: https://codereview.webrtc.org/2564333002
Cr-Commit-Position: refs/heads/master@{#15973}
diff --git a/webrtc/api/datachannel.h b/webrtc/api/datachannel.h
index 9208ada..19f95df 100644
--- a/webrtc/api/datachannel.h
+++ b/webrtc/api/datachannel.h
@@ -144,11 +144,10 @@
// stream on an existing DataMediaChannel, and we've finished negotiation.
void OnChannelReady(bool writable);
- // Sigslots from cricket::DataChannel
- void OnDataReceived(cricket::DataChannel* channel,
- const cricket::ReceiveDataParams& params,
+ // Slots for provider to connect signals to.
+ void OnDataReceived(const cricket::ReceiveDataParams& params,
const rtc::CopyOnWriteBuffer& payload);
- void OnStreamClosedRemotely(uint32_t sid);
+ void OnStreamClosedRemotely(int sid);
// The remote peer request that this channel should be closed.
void RemotePeerRequestClose();