Adding "adapter" ORTC objects on top of ChannelManager/BaseChannel/etc.
This CL adds the following interfaces:
* RtpTransportController
* RtpTransport
* RtpSender
* RtpReceiver
They're implemented on top of the "BaseChannel" object, which is normally used
in a PeerConnection, and roughly corresponds to an SDP "m=" section. As a result
of this, there are several limitations:
* You can only have one of each type of sender and receiver (audio/video) on top
of the same transport controller.
* The sender/receiver with the same media type must use the same RTP transport.
* You can't change the transport after creating the sender or receiver.
* Some of the parameters aren't supported.
Later, these "adapter" objects will be gradually replaced by real objects that don't
have these limitations, as "BaseChannel", "MediaChannel" and related code is
restructured. In this CL, we essentially have:
ORTC adapter objects -> BaseChannel -> Media engine
PeerConnection -> BaseChannel -> Media engine
And later we hope to have simply:
PeerConnection -> "Real" ORTC objects -> Media engine
See the linked bug for more context.
BUG=webrtc:7013
TBR=stefan@webrtc.org
Review-Url: https://codereview.webrtc.org/2675173003
Cr-Commit-Position: refs/heads/master@{#16842}
diff --git a/webrtc/pc/channelmanager.h b/webrtc/pc/channelmanager.h
index 8c6ee7f..b763fa1 100644
--- a/webrtc/pc/channelmanager.h
+++ b/webrtc/pc/channelmanager.h
@@ -95,6 +95,15 @@
const std::string& content_name,
bool srtp_required,
const AudioOptions& options);
+ // Version of the above that takes PacketTransportInternal.
+ VoiceChannel* CreateVoiceChannel(
+ webrtc::MediaControllerInterface* media_controller,
+ rtc::PacketTransportInternal* rtp_transport,
+ rtc::PacketTransportInternal* rtcp_transport,
+ rtc::Thread* signaling_thread,
+ const std::string& content_name,
+ bool srtp_required,
+ const AudioOptions& options);
// Destroys a voice channel created with the Create API.
void DestroyVoiceChannel(VoiceChannel* voice_channel);
// Creates a video channel, synced with the specified voice channel, and
@@ -107,6 +116,15 @@
const std::string& content_name,
bool srtp_required,
const VideoOptions& options);
+ // Version of the above that takes PacketTransportInternal.
+ VideoChannel* CreateVideoChannel(
+ webrtc::MediaControllerInterface* media_controller,
+ rtc::PacketTransportInternal* rtp_transport,
+ rtc::PacketTransportInternal* rtcp_transport,
+ rtc::Thread* signaling_thread,
+ const std::string& content_name,
+ bool srtp_required,
+ const VideoOptions& options);
// Destroys a video channel created with the Create API.
void DestroyVideoChannel(VideoChannel* video_channel);
RtpDataChannel* CreateRtpDataChannel(
@@ -160,8 +178,10 @@
bool SetCryptoOptions_w(const rtc::CryptoOptions& crypto_options);
VoiceChannel* CreateVoiceChannel_w(
webrtc::MediaControllerInterface* media_controller,
- DtlsTransportInternal* rtp_transport,
- DtlsTransportInternal* rtcp_transport,
+ 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,
@@ -169,8 +189,10 @@
void DestroyVoiceChannel_w(VoiceChannel* voice_channel);
VideoChannel* CreateVideoChannel_w(
webrtc::MediaControllerInterface* media_controller,
- DtlsTransportInternal* rtp_transport,
- DtlsTransportInternal* rtcp_transport,
+ 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,