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

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

Issue 1350523003: TransportController refactoring. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing Mac test. Created 5 years, 3 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
« no previous file with comments | « talk/session/media/channelmanager.h ('k') | talk/session/media/channelmanager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/session/media/channelmanager.cc
diff --git a/talk/session/media/channelmanager.cc b/talk/session/media/channelmanager.cc
index c109d60388bb5fb37e4aaa856bbe6b048b292599..11fd41dd14d57607bd6ec04ab52aa79049c27caf 100644
--- a/talk/session/media/channelmanager.cc
+++ b/talk/session/media/channelmanager.cc
@@ -319,23 +319,18 @@ void ChannelManager::Terminate_w() {
VoiceChannel* ChannelManager::CreateVoiceChannel(
webrtc::MediaControllerInterface* media_controller,
- 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,
- media_controller,
- session,
- content_name,
- rtcp,
- options));
+ Bind(&ChannelManager::CreateVoiceChannel_w, this, media_controller,
+ transport_controller, content_name, rtcp, options));
}
VoiceChannel* ChannelManager::CreateVoiceChannel_w(
webrtc::MediaControllerInterface* media_controller,
- BaseSession* session,
+ TransportController* transport_controller,
const std::string& content_name,
bool rtcp,
const AudioOptions& options) {
@@ -347,9 +342,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;
@@ -380,23 +375,18 @@ void ChannelManager::DestroyVoiceChannel_w(VoiceChannel* voice_channel) {
VideoChannel* ChannelManager::CreateVideoChannel(
webrtc::MediaControllerInterface* media_controller,
- BaseSession* session,
+ TransportController* transport_controller,
const std::string& content_name,
bool rtcp,
const VideoOptions& options) {
return worker_thread_->Invoke<VideoChannel*>(
- Bind(&ChannelManager::CreateVideoChannel_w,
- this,
- media_controller,
- session,
- content_name,
- rtcp,
- options));
+ Bind(&ChannelManager::CreateVideoChannel_w, this, media_controller,
+ transport_controller, content_name, rtcp, options));
}
VideoChannel* ChannelManager::CreateVideoChannel_w(
webrtc::MediaControllerInterface* media_controller,
- BaseSession* session,
+ TransportController* transport_controller,
const std::string& content_name,
bool rtcp,
const VideoOptions& options) {
@@ -405,12 +395,12 @@ VideoChannel* ChannelManager::CreateVideoChannel_w(
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,
- session, content_name, rtcp);
+ worker_thread_, media_channel, transport_controller, content_name, rtcp);
if (!video_channel->Init()) {
delete video_channel;
return NULL;
@@ -441,16 +431,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(
@@ -462,8 +456,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;
« no previous file with comments | « talk/session/media/channelmanager.h ('k') | talk/session/media/channelmanager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698