| Index: talk/session/media/channelmanager.cc
|
| diff --git a/talk/session/media/channelmanager.cc b/talk/session/media/channelmanager.cc
|
| index 11fd41dd14d57607bd6ec04ab52aa79049c27caf..c109d60388bb5fb37e4aaa856bbe6b048b292599 100644
|
| --- a/talk/session/media/channelmanager.cc
|
| +++ b/talk/session/media/channelmanager.cc
|
| @@ -319,18 +319,23 @@
|
|
|
| VoiceChannel* ChannelManager::CreateVoiceChannel(
|
| webrtc::MediaControllerInterface* media_controller,
|
| - TransportController* transport_controller,
|
| + BaseSession* session,
|
| const std::string& content_name,
|
| bool rtcp,
|
| const AudioOptions& options) {
|
| return worker_thread_->Invoke<VoiceChannel*>(
|
| - Bind(&ChannelManager::CreateVoiceChannel_w, this, media_controller,
|
| - transport_controller, content_name, rtcp, options));
|
| + Bind(&ChannelManager::CreateVoiceChannel_w,
|
| + this,
|
| + media_controller,
|
| + session,
|
| + content_name,
|
| + rtcp,
|
| + options));
|
| }
|
|
|
| VoiceChannel* ChannelManager::CreateVoiceChannel_w(
|
| webrtc::MediaControllerInterface* media_controller,
|
| - TransportController* transport_controller,
|
| + BaseSession* session,
|
| const std::string& content_name,
|
| bool rtcp,
|
| const AudioOptions& options) {
|
| @@ -342,9 +347,9 @@
|
| if (!media_channel)
|
| return nullptr;
|
|
|
| - VoiceChannel* voice_channel =
|
| - new VoiceChannel(worker_thread_, media_engine_.get(), media_channel,
|
| - transport_controller, content_name, rtcp);
|
| + VoiceChannel* voice_channel = new VoiceChannel(
|
| + worker_thread_, media_engine_.get(), media_channel,
|
| + session, content_name, rtcp);
|
| if (!voice_channel->Init()) {
|
| delete voice_channel;
|
| return nullptr;
|
| @@ -375,18 +380,23 @@
|
|
|
| VideoChannel* ChannelManager::CreateVideoChannel(
|
| webrtc::MediaControllerInterface* media_controller,
|
| - TransportController* transport_controller,
|
| + BaseSession* session,
|
| const std::string& content_name,
|
| bool rtcp,
|
| const VideoOptions& options) {
|
| return worker_thread_->Invoke<VideoChannel*>(
|
| - Bind(&ChannelManager::CreateVideoChannel_w, this, media_controller,
|
| - transport_controller, content_name, rtcp, options));
|
| + Bind(&ChannelManager::CreateVideoChannel_w,
|
| + this,
|
| + media_controller,
|
| + session,
|
| + content_name,
|
| + rtcp,
|
| + options));
|
| }
|
|
|
| VideoChannel* ChannelManager::CreateVideoChannel_w(
|
| webrtc::MediaControllerInterface* media_controller,
|
| - TransportController* transport_controller,
|
| + BaseSession* session,
|
| const std::string& content_name,
|
| bool rtcp,
|
| const VideoOptions& options) {
|
| @@ -395,12 +405,12 @@
|
| ASSERT(nullptr != media_controller);
|
| VideoMediaChannel* media_channel =
|
| media_engine_->CreateVideoChannel(media_controller->call_w(), options);
|
| - if (media_channel == NULL) {
|
| + if (media_channel == NULL)
|
| return NULL;
|
| - }
|
|
|
| VideoChannel* video_channel = new VideoChannel(
|
| - worker_thread_, media_channel, transport_controller, content_name, rtcp);
|
| + worker_thread_, media_channel,
|
| + session, content_name, rtcp);
|
| if (!video_channel->Init()) {
|
| delete video_channel;
|
| return NULL;
|
| @@ -431,20 +441,16 @@
|
| }
|
|
|
| DataChannel* ChannelManager::CreateDataChannel(
|
| - TransportController* transport_controller,
|
| - const std::string& content_name,
|
| - bool rtcp,
|
| - DataChannelType channel_type) {
|
| + BaseSession* session, const std::string& content_name,
|
| + bool rtcp, DataChannelType channel_type) {
|
| return worker_thread_->Invoke<DataChannel*>(
|
| - Bind(&ChannelManager::CreateDataChannel_w, this, transport_controller,
|
| - content_name, rtcp, channel_type));
|
| + Bind(&ChannelManager::CreateDataChannel_w, this, session, content_name,
|
| + rtcp, channel_type));
|
| }
|
|
|
| DataChannel* ChannelManager::CreateDataChannel_w(
|
| - TransportController* transport_controller,
|
| - const std::string& content_name,
|
| - bool rtcp,
|
| - DataChannelType data_channel_type) {
|
| + BaseSession* session, const std::string& content_name,
|
| + bool rtcp, DataChannelType data_channel_type) {
|
| // This is ok to alloc from a thread other than the worker thread.
|
| ASSERT(initialized_);
|
| DataMediaChannel* media_channel = data_media_engine_->CreateChannel(
|
| @@ -456,7 +462,8 @@
|
| }
|
|
|
| DataChannel* data_channel = new DataChannel(
|
| - worker_thread_, media_channel, transport_controller, content_name, rtcp);
|
| + worker_thread_, media_channel,
|
| + session, content_name, rtcp);
|
| if (!data_channel->Init()) {
|
| LOG(LS_WARNING) << "Failed to init data channel.";
|
| delete data_channel;
|
|
|