Index: webrtc/pc/channelmanager.cc |
diff --git a/webrtc/pc/channelmanager.cc b/webrtc/pc/channelmanager.cc |
index cdfed68bb6bbd7f98b70c2f13a5bec3da48f4e57..217ac236d4d7e112cc68fe206403bfc2b5e0038e 100644 |
--- a/webrtc/pc/channelmanager.cc |
+++ b/webrtc/pc/channelmanager.cc |
@@ -206,21 +206,26 @@ void ChannelManager::Terminate_w() { |
VoiceChannel* ChannelManager::CreateVoiceChannel( |
webrtc::MediaControllerInterface* media_controller, |
- TransportController* transport_controller, |
+ TransportChannel* rtp_transport, |
+ TransportChannel* rtcp_transport, |
+ rtc::Thread* signaling_thread, |
const std::string& content_name, |
const std::string* bundle_transport_name, |
bool rtcp, |
bool srtp_required, |
const AudioOptions& options) { |
return worker_thread_->Invoke<VoiceChannel*>( |
- RTC_FROM_HERE, Bind(&ChannelManager::CreateVoiceChannel_w, this, |
- media_controller, transport_controller, content_name, |
- bundle_transport_name, rtcp, srtp_required, options)); |
+ RTC_FROM_HERE, |
+ Bind(&ChannelManager::CreateVoiceChannel_w, this, media_controller, |
+ rtp_transport, rtcp_transport, signaling_thread, content_name, |
+ bundle_transport_name, rtcp, srtp_required, options)); |
} |
VoiceChannel* ChannelManager::CreateVoiceChannel_w( |
webrtc::MediaControllerInterface* media_controller, |
- TransportController* transport_controller, |
+ TransportChannel* rtp_transport, |
+ TransportChannel* rtcp_transport, |
+ rtc::Thread* signaling_thread, |
const std::string& content_name, |
const std::string* bundle_transport_name, |
bool rtcp, |
@@ -229,16 +234,18 @@ VoiceChannel* ChannelManager::CreateVoiceChannel_w( |
ASSERT(initialized_); |
ASSERT(worker_thread_ == rtc::Thread::Current()); |
ASSERT(nullptr != media_controller); |
+ |
VoiceMediaChannel* media_channel = media_engine_->CreateChannel( |
media_controller->call_w(), media_controller->config(), options); |
if (!media_channel) |
return nullptr; |
VoiceChannel* voice_channel = new VoiceChannel( |
- worker_thread_, network_thread_, media_engine_.get(), media_channel, |
- transport_controller, content_name, rtcp, srtp_required); |
+ worker_thread_, network_thread_, signaling_thread, media_engine_.get(), |
+ media_channel, content_name, rtcp, srtp_required); |
voice_channel->SetCryptoOptions(crypto_options_); |
- if (!voice_channel->Init_w(bundle_transport_name)) { |
+ |
+ if (!voice_channel->Init_w(rtp_transport, rtcp_transport)) { |
delete voice_channel; |
return nullptr; |
} |
@@ -271,21 +278,26 @@ void ChannelManager::DestroyVoiceChannel_w(VoiceChannel* voice_channel) { |
VideoChannel* ChannelManager::CreateVideoChannel( |
webrtc::MediaControllerInterface* media_controller, |
- TransportController* transport_controller, |
+ TransportChannel* rtp_transport, |
+ TransportChannel* rtcp_transport, |
+ rtc::Thread* signaling_thread, |
const std::string& content_name, |
const std::string* bundle_transport_name, |
bool rtcp, |
bool srtp_required, |
const VideoOptions& options) { |
return worker_thread_->Invoke<VideoChannel*>( |
- RTC_FROM_HERE, Bind(&ChannelManager::CreateVideoChannel_w, this, |
- media_controller, transport_controller, content_name, |
- bundle_transport_name, rtcp, srtp_required, options)); |
+ RTC_FROM_HERE, |
+ Bind(&ChannelManager::CreateVideoChannel_w, this, media_controller, |
+ rtp_transport, rtcp_transport, signaling_thread, content_name, |
+ bundle_transport_name, rtcp, srtp_required, options)); |
} |
VideoChannel* ChannelManager::CreateVideoChannel_w( |
webrtc::MediaControllerInterface* media_controller, |
- TransportController* transport_controller, |
+ TransportChannel* rtp_transport, |
+ TransportChannel* rtcp_transport, |
+ rtc::Thread* signaling_thread, |
const std::string& content_name, |
const std::string* bundle_transport_name, |
bool rtcp, |
@@ -301,10 +313,10 @@ VideoChannel* ChannelManager::CreateVideoChannel_w( |
} |
VideoChannel* video_channel = |
- new VideoChannel(worker_thread_, network_thread_, media_channel, |
- transport_controller, content_name, rtcp, srtp_required); |
+ new VideoChannel(worker_thread_, network_thread_, signaling_thread, |
+ media_channel, content_name, rtcp, srtp_required); |
video_channel->SetCryptoOptions(crypto_options_); |
- if (!video_channel->Init_w(bundle_transport_name)) { |
+ if (!video_channel->Init_w(rtp_transport, rtcp_transport)) { |
delete video_channel; |
return NULL; |
} |
@@ -338,20 +350,25 @@ void ChannelManager::DestroyVideoChannel_w(VideoChannel* video_channel) { |
RtpDataChannel* ChannelManager::CreateRtpDataChannel( |
webrtc::MediaControllerInterface* media_controller, |
- TransportController* transport_controller, |
+ TransportChannel* rtp_transport, |
+ TransportChannel* rtcp_transport, |
+ rtc::Thread* signaling_thread, |
const std::string& content_name, |
const std::string* bundle_transport_name, |
bool rtcp, |
bool srtp_required) { |
return worker_thread_->Invoke<RtpDataChannel*>( |
- RTC_FROM_HERE, Bind(&ChannelManager::CreateRtpDataChannel_w, this, |
- media_controller, transport_controller, content_name, |
- bundle_transport_name, rtcp, srtp_required)); |
+ RTC_FROM_HERE, |
+ Bind(&ChannelManager::CreateRtpDataChannel_w, this, media_controller, |
+ rtp_transport, rtcp_transport, signaling_thread, content_name, |
+ bundle_transport_name, rtcp, srtp_required)); |
} |
RtpDataChannel* ChannelManager::CreateRtpDataChannel_w( |
webrtc::MediaControllerInterface* media_controller, |
- TransportController* transport_controller, |
+ TransportChannel* rtp_transport, |
+ TransportChannel* rtcp_transport, |
+ rtc::Thread* signaling_thread, |
const std::string& content_name, |
const std::string* bundle_transport_name, |
bool rtcp, |
@@ -368,11 +385,11 @@ RtpDataChannel* ChannelManager::CreateRtpDataChannel_w( |
return nullptr; |
} |
- RtpDataChannel* data_channel = new RtpDataChannel( |
- worker_thread_, network_thread_, media_channel, transport_controller, |
- content_name, rtcp, srtp_required); |
+ RtpDataChannel* data_channel = |
+ new RtpDataChannel(worker_thread_, network_thread_, signaling_thread, |
+ media_channel, content_name, rtcp, srtp_required); |
data_channel->SetCryptoOptions(crypto_options_); |
- if (!data_channel->Init_w(bundle_transport_name)) { |
+ if (!data_channel->Init_w(rtp_transport, rtcp_transport)) { |
LOG(LS_WARNING) << "Failed to init data channel."; |
delete data_channel; |
return nullptr; |