| Index: talk/session/media/channelmanager.cc
|
| diff --git a/talk/session/media/channelmanager.cc b/talk/session/media/channelmanager.cc
|
| index f3c43d03a9381c651a29ba50ca8d2600733a54cc..d086519f822f1c54777d6baa96bd0b94d57547ee 100644
|
| --- a/talk/session/media/channelmanager.cc
|
| +++ b/talk/session/media/channelmanager.cc
|
| @@ -317,17 +317,17 @@ void ChannelManager::Terminate_w() {
|
| }
|
|
|
| VoiceChannel* ChannelManager::CreateVoiceChannel(
|
| - BaseSession* session,
|
| + TransportController* transport_controller,
|
| const std::string& content_name,
|
| bool rtcp,
|
| const AudioOptions& options) {
|
| return worker_thread_->Invoke<VoiceChannel*>(
|
| - Bind(&ChannelManager::CreateVoiceChannel_w, this, session, content_name,
|
| - rtcp, options));
|
| + Bind(&ChannelManager::CreateVoiceChannel_w, this, transport_controller,
|
| + content_name, rtcp, options));
|
| }
|
|
|
| VoiceChannel* ChannelManager::CreateVoiceChannel_w(
|
| - BaseSession* session,
|
| + TransportController* transport_controller,
|
| const std::string& content_name,
|
| bool rtcp,
|
| const AudioOptions& options) {
|
| @@ -337,9 +337,9 @@ VoiceChannel* ChannelManager::CreateVoiceChannel_w(
|
| if (!media_channel)
|
| return nullptr;
|
|
|
| - VoiceChannel* voice_channel = new VoiceChannel(
|
| - worker_thread_, media_engine_.get(), media_channel,
|
| - session, content_name, rtcp);
|
| + VoiceChannel* voice_channel =
|
| + new VoiceChannel(worker_thread_, media_engine_.get(), media_channel,
|
| + transport_controller, content_name, rtcp);
|
| if (!voice_channel->Init()) {
|
| delete voice_channel;
|
| return nullptr;
|
| @@ -376,38 +376,28 @@ void ChannelManager::DestroyVoiceChannel_w(VoiceChannel* voice_channel,
|
| }
|
|
|
| VideoChannel* ChannelManager::CreateVideoChannel(
|
| - BaseSession* session,
|
| + TransportController* transport_controller,
|
| const std::string& content_name,
|
| bool rtcp,
|
| VoiceChannel* voice_channel) {
|
| return worker_thread_->Invoke<VideoChannel*>(
|
| - Bind(&ChannelManager::CreateVideoChannel_w,
|
| - this,
|
| - session,
|
| - content_name,
|
| - rtcp,
|
| - VideoOptions(),
|
| - voice_channel));
|
| + Bind(&ChannelManager::CreateVideoChannel_w, this, transport_controller,
|
| + content_name, rtcp, VideoOptions(), voice_channel));
|
| }
|
|
|
| VideoChannel* ChannelManager::CreateVideoChannel(
|
| - BaseSession* session,
|
| + TransportController* transport_controller,
|
| const std::string& content_name,
|
| bool rtcp,
|
| const VideoOptions& options,
|
| VoiceChannel* voice_channel) {
|
| return worker_thread_->Invoke<VideoChannel*>(
|
| - Bind(&ChannelManager::CreateVideoChannel_w,
|
| - this,
|
| - session,
|
| - content_name,
|
| - rtcp,
|
| - options,
|
| - voice_channel));
|
| + Bind(&ChannelManager::CreateVideoChannel_w, this, transport_controller,
|
| + content_name, rtcp, options, voice_channel));
|
| }
|
|
|
| VideoChannel* ChannelManager::CreateVideoChannel_w(
|
| - BaseSession* session,
|
| + TransportController* transport_controller,
|
| const std::string& content_name,
|
| bool rtcp,
|
| const VideoOptions& options,
|
| @@ -418,12 +408,12 @@ VideoChannel* ChannelManager::CreateVideoChannel_w(
|
| // voice_channel can be NULL in case of NullVoiceEngine.
|
| media_engine_->CreateVideoChannel(
|
| options, voice_channel ? voice_channel->media_channel() : NULL);
|
| - if (media_channel == NULL)
|
| + if (media_channel == NULL) {
|
| return NULL;
|
| + }
|
|
|
| VideoChannel* video_channel = new VideoChannel(
|
| - worker_thread_, media_channel,
|
| - session, content_name, rtcp);
|
| + worker_thread_, media_channel, transport_controller, content_name, rtcp);
|
| if (!video_channel->Init()) {
|
| delete video_channel;
|
| return NULL;
|
| @@ -454,16 +444,20 @@ void ChannelManager::DestroyVideoChannel_w(VideoChannel* video_channel) {
|
| }
|
|
|
| DataChannel* ChannelManager::CreateDataChannel(
|
| - BaseSession* session, const std::string& content_name,
|
| - bool rtcp, DataChannelType channel_type) {
|
| + TransportController* transport_controller,
|
| + const std::string& content_name,
|
| + bool rtcp,
|
| + DataChannelType channel_type) {
|
| return worker_thread_->Invoke<DataChannel*>(
|
| - Bind(&ChannelManager::CreateDataChannel_w, this, session, content_name,
|
| - rtcp, channel_type));
|
| + Bind(&ChannelManager::CreateDataChannel_w, this, transport_controller,
|
| + content_name, rtcp, channel_type));
|
| }
|
|
|
| DataChannel* ChannelManager::CreateDataChannel_w(
|
| - BaseSession* session, const std::string& content_name,
|
| - bool rtcp, DataChannelType data_channel_type) {
|
| + TransportController* transport_controller,
|
| + 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(
|
| @@ -475,8 +469,7 @@ DataChannel* ChannelManager::CreateDataChannel_w(
|
| }
|
|
|
| DataChannel* data_channel = new DataChannel(
|
| - worker_thread_, media_channel,
|
| - session, content_name, rtcp);
|
| + worker_thread_, media_channel, transport_controller, content_name, rtcp);
|
| if (!data_channel->Init()) {
|
| LOG(LS_WARNING) << "Failed to init data channel.";
|
| delete data_channel;
|
|
|