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

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

Issue 1358413003: Revert of TransportController refactoring. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 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;
« 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