Use new TransportController implementation in PeerConnection.
The TransportController will be replaced by the JsepTransportController
and JsepTransport will be replace be JsepTransport2.
The JsepTransportController will take the entire SessionDescription
and handle the RtcpMux, Sdes and BUNDLE internally.
The ownership model is also changed. The P2P layer transports are not
ref-counted and will be owned by the JsepTransport2.
In ORTC aspect, RtpTransportAdapter is now a wrapper over RtpTransport
or SrtpTransport and it implements the public and internal interface
by calling the transport underneath.
Bug: webrtc:8587
Change-Id: Ia7fa61288a566f211f8560072ea0eecaf19e48df
Reviewed-on: https://webrtc-review.googlesource.com/59586
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22693}
diff --git a/pc/channelmanager.h b/pc/channelmanager.h
index 72d218a..c6b601e 100644
--- a/pc/channelmanager.h
+++ b/pc/channelmanager.h
@@ -80,90 +80,38 @@
// call the appropriate Destroy*Channel method when done.
// Creates a voice channel, to be associated with the specified session.
- // TODO(zhihuang): Replace this with the method taking an
- // RtpTransportInternal*;
- VoiceChannel* CreateVoiceChannel(
- webrtc::Call* call,
- const cricket::MediaConfig& media_config,
- DtlsTransportInternal* rtp_transport,
- DtlsTransportInternal* rtcp_transport,
- rtc::Thread* signaling_thread,
- const std::string& content_name,
- bool srtp_required,
- const AudioOptions& options);
- // Version of the above that takes PacketTransportInternal.
- // TODO(zhihuang): Replace this with the method taking an
- // RtpTransportInternal*;
- VoiceChannel* CreateVoiceChannel(
- webrtc::Call* call,
- const cricket::MediaConfig& media_config,
- rtc::PacketTransportInternal* rtp_transport,
- rtc::PacketTransportInternal* rtcp_transport,
- rtc::Thread* signaling_thread,
- const std::string& content_name,
- bool srtp_required,
- const AudioOptions& options);
-
VoiceChannel* CreateVoiceChannel(webrtc::Call* call,
const cricket::MediaConfig& media_config,
webrtc::RtpTransportInternal* rtp_transport,
rtc::Thread* signaling_thread,
const std::string& content_name,
bool srtp_required,
+ const rtc::CryptoOptions& crypto_options,
const AudioOptions& options);
// Destroys a voice channel created by CreateVoiceChannel.
void DestroyVoiceChannel(VoiceChannel* voice_channel);
// Creates a video channel, synced with the specified voice channel, and
// associated with the specified session.
- // TODO(zhihuang): Replace this with the method taking an
- // RtpTransportInternal*;
- VideoChannel* CreateVideoChannel(
- webrtc::Call* call,
- const cricket::MediaConfig& media_config,
- DtlsTransportInternal* rtp_transport,
- DtlsTransportInternal* rtcp_transport,
- rtc::Thread* signaling_thread,
- const std::string& content_name,
- bool srtp_required,
- const VideoOptions& options);
// Version of the above that takes PacketTransportInternal.
- // TODO(zhihuang): Replace this with the method taking an
- // RtpTransportInternal*;
- VideoChannel* CreateVideoChannel(
- webrtc::Call* call,
- const cricket::MediaConfig& media_config,
- rtc::PacketTransportInternal* rtp_transport,
- rtc::PacketTransportInternal* rtcp_transport,
- rtc::Thread* signaling_thread,
- const std::string& content_name,
- bool srtp_required,
- const VideoOptions& options);
VideoChannel* CreateVideoChannel(webrtc::Call* call,
const cricket::MediaConfig& media_config,
webrtc::RtpTransportInternal* rtp_transport,
rtc::Thread* signaling_thread,
const std::string& content_name,
bool srtp_required,
+ const rtc::CryptoOptions& crypto_options,
const VideoOptions& options);
// Destroys a video channel created by CreateVideoChannel.
void DestroyVideoChannel(VideoChannel* video_channel);
- // TODO(zhihuang): Replace this with the method taking an
- // RtpTransportInternal*;
- RtpDataChannel* CreateRtpDataChannel(
- const cricket::MediaConfig& media_config,
- DtlsTransportInternal* rtp_transport,
- DtlsTransportInternal* rtcp_transport,
- rtc::Thread* signaling_thread,
- const std::string& content_name,
- bool srtp_required);
RtpDataChannel* CreateRtpDataChannel(
const cricket::MediaConfig& media_config,
webrtc::RtpTransportInternal* rtp_transport,
rtc::Thread* signaling_thread,
const std::string& content_name,
- bool srtp_required);
+ bool srtp_required,
+ const rtc::CryptoOptions& crypto_options);
// Destroys a data channel created by CreateRtpDataChannel.
void DestroyRtpDataChannel(RtpDataChannel* data_channel);
@@ -191,29 +139,6 @@
void StopAecDump();
private:
- VoiceChannel* CreateVoiceChannel_w(
- webrtc::Call* call,
- const cricket::MediaConfig& media_config,
- DtlsTransportInternal* rtp_dtls_transport,
- DtlsTransportInternal* rtcp_dtls_transport,
- rtc::PacketTransportInternal* rtp_packet_transport,
- rtc::PacketTransportInternal* rtcp_packet_transport,
- rtc::Thread* signaling_thread,
- const std::string& content_name,
- bool srtp_required,
- const AudioOptions& options);
- VideoChannel* CreateVideoChannel_w(
- webrtc::Call* call,
- const cricket::MediaConfig& media_config,
- DtlsTransportInternal* rtp_dtls_transport,
- DtlsTransportInternal* rtcp_dtls_transport,
- rtc::PacketTransportInternal* rtp_packet_transport,
- rtc::PacketTransportInternal* rtcp_packet_transport,
- rtc::Thread* signaling_thread,
- const std::string& content_name,
- bool srtp_required,
- const VideoOptions& options);
-
std::unique_ptr<MediaEngineInterface> media_engine_; // Nullable.
std::unique_ptr<DataEngineInterface> data_engine_; // Non-null.
bool initialized_ = false;