Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(851)

Unified Diff: talk/session/media/channelmanager.cc

Issue 1246913005: TransportController refactoring (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: minor cleanup Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: talk/session/media/channelmanager.cc
diff --git a/talk/session/media/channelmanager.cc b/talk/session/media/channelmanager.cc
index f3c43d03a9381c651a29ba50ca8d2600733a54cc..4f9af4597914dffe88791898afde40bd293959b1 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) {
@@ -339,7 +339,7 @@ VoiceChannel* ChannelManager::CreateVoiceChannel_w(
VoiceChannel* voice_channel = new VoiceChannel(
worker_thread_, media_engine_.get(), media_channel,
- session, content_name, rtcp);
+ transport_controller, content_name, rtcp);
if (!voice_channel->Init()) {
delete voice_channel;
return nullptr;
@@ -376,14 +376,14 @@ 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,
+ transport_controller,
content_name,
rtcp,
VideoOptions(),
@@ -391,7 +391,7 @@ VideoChannel* ChannelManager::CreateVideoChannel(
}
VideoChannel* ChannelManager::CreateVideoChannel(
- BaseSession* session,
+ TransportController* transport_controller,
const std::string& content_name,
bool rtcp,
const VideoOptions& options,
@@ -399,7 +399,7 @@ VideoChannel* ChannelManager::CreateVideoChannel(
return worker_thread_->Invoke<VideoChannel*>(
Bind(&ChannelManager::CreateVideoChannel_w,
this,
- session,
+ transport_controller,
content_name,
rtcp,
options,
@@ -407,7 +407,7 @@ VideoChannel* ChannelManager::CreateVideoChannel(
}
VideoChannel* ChannelManager::CreateVideoChannel_w(
- BaseSession* session,
+ TransportController* transport_controller,
const std::string& content_name,
bool rtcp,
const VideoOptions& options,
@@ -418,12 +418,13 @@ 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);
+ transport_controller, content_name, rtcp);
if (!video_channel->Init()) {
delete video_channel;
return NULL;
@@ -454,15 +455,15 @@ void ChannelManager::DestroyVideoChannel_w(VideoChannel* video_channel) {
}
DataChannel* ChannelManager::CreateDataChannel(
- BaseSession* session, const std::string& content_name,
+ 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,
+ 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_);
@@ -476,7 +477,7 @@ DataChannel* ChannelManager::CreateDataChannel_w(
DataChannel* data_channel = new DataChannel(
worker_thread_, media_channel,
- session, content_name, rtcp);
+ transport_controller, content_name, rtcp);
if (!data_channel->Init()) {
LOG(LS_WARNING) << "Failed to init data channel.";
delete data_channel;

Powered by Google App Engine
This is Rietveld 408576698