Remove ViESender.
Registers transport on construction removing the need for ViESender as a
hop and removing a potential deadlock by removing RegisterSendTransport.
BUG=1695, 2999
R=stefan@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/57449004
Cr-Original-Commit-Position: refs/heads/master@{#9309}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 2251d6e17438e1a085ff4f88ad19de513214bec1
diff --git a/video/call.cc b/video/call.cc
index 37f9f2d..bd96734 100644
--- a/video/call.cc
+++ b/video/call.cc
@@ -117,6 +117,7 @@
// and receivers.
rtc::CriticalSection network_enabled_crit_;
bool network_enabled_ GUARDED_BY(network_enabled_crit_);
+ TransportAdapter transport_adapter_;
rtc::scoped_ptr<RWLockWrapper> receive_crit_;
std::map<uint32_t, AudioReceiveStream*> audio_receive_ssrcs_
@@ -147,11 +148,12 @@
Call::Call(const Call::Config& config)
: num_cpu_cores_(CpuInfo::DetectNumberOfCores()),
module_process_thread_(ProcessThread::Create()),
- channel_group_(new ChannelGroup(module_process_thread_.get(), nullptr)),
+ channel_group_(new ChannelGroup(module_process_thread_.get())),
base_channel_id_(0),
next_channel_id_(base_channel_id_ + 1),
config_(config),
network_enabled_(true),
+ transport_adapter_(nullptr),
receive_crit_(RWLockWrapper::CreateRWLock()),
send_crit_(RWLockWrapper::CreateRWLock()) {
DCHECK(config.send_transport != nullptr);
@@ -169,8 +171,8 @@
// TODO(pbos): Remove base channel when CreateReceiveChannel no longer
// requires one.
- CHECK(channel_group_->CreateSendChannel(base_channel_id_, 0, num_cpu_cores_,
- true));
+ CHECK(channel_group_->CreateSendChannel(
+ base_channel_id_, 0, &transport_adapter_, num_cpu_cores_, true));
if (config.overuse_callback) {
overuse_observer_proxy_.reset(