diff --git a/talk/media/webrtc/fakewebrtcvideoengine.h b/talk/media/webrtc/fakewebrtcvideoengine.h index ca3ed86fd..cc217bb4d 100644 --- a/talk/media/webrtc/fakewebrtcvideoengine.h +++ b/talk/media/webrtc/fakewebrtcvideoengine.h @@ -914,9 +914,6 @@ class FakeWebRtcVideoEngine WEBRTC_STUB(SetMTU, (int, unsigned int)); WEBRTC_STUB(ReceivedBWEPacket, (const int, int64_t, size_t, const webrtc::RTPHeader&)); - virtual bool SetBandwidthEstimationConfig(int, const webrtc::Config&) { - return true; - } // webrtc::ViERender WEBRTC_STUB(RegisterVideoRenderModule, (webrtc::VideoRender&)); diff --git a/talk/media/webrtc/webrtcvideoengine.cc b/talk/media/webrtc/webrtcvideoengine.cc index fa6a550e9..ed5a6267c 100644 --- a/talk/media/webrtc/webrtcvideoengine.cc +++ b/talk/media/webrtc/webrtcvideoengine.cc @@ -3660,16 +3660,6 @@ bool WebRtcVideoMediaChannel::ConfigureSending(int channel_id, return false; } - // Enable improved WiFi Bandwidth Estimation - { - webrtc::Config config; - config.Set(new webrtc::AimdRemoteRateControl(true)); - if (!engine()->vie()->network()->SetBandwidthEstimationConfig(channel_id, - config)) { - return false; - } - } - send_channels_[local_ssrc_key] = send_channel.release(); return true; diff --git a/webrtc/video_engine/include/vie_network.h b/webrtc/video_engine/include/vie_network.h index a1f75ba72..fe7a41f85 100644 --- a/webrtc/video_engine/include/vie_network.h +++ b/webrtc/video_engine/include/vie_network.h @@ -86,13 +86,6 @@ class WEBRTC_DLLEXPORT ViENetwork { return 0; } - // TODO(holmer): Remove the default implementation when this has been fixed - // in fakewebrtcvideoengine.cc. - virtual bool SetBandwidthEstimationConfig(int video_channel, - const webrtc::Config& config) { - return false; - } - protected: ViENetwork() {} virtual ~ViENetwork() {} diff --git a/webrtc/video_engine/vie_channel_group.cc b/webrtc/video_engine/vie_channel_group.cc index 9e79b29d3..4c80f65fe 100644 --- a/webrtc/video_engine/vie_channel_group.cc +++ b/webrtc/video_engine/vie_channel_group.cc @@ -39,10 +39,9 @@ class WrappingBitrateEstimator : public RemoteBitrateEstimator { clock_(clock), crit_sect_(CriticalSectionWrapper::CreateCriticalSection()), min_bitrate_bps_(config.Get().min_rate), - rate_control_type_(kAimdControl), rbe_(RemoteBitrateEstimatorFactory().Create(observer_, clock_, - rate_control_type_, + kAimdControl, min_bitrate_bps_)), using_absolute_send_time_(false), packets_since_absolute_send_time_(0) { @@ -89,17 +88,6 @@ class WrappingBitrateEstimator : public RemoteBitrateEstimator { return rbe_->GetStats(output); } - void SetConfig(const webrtc::Config& config) { - CriticalSectionScoped cs(crit_sect_.get()); - RateControlType new_control_type = - config.Get().enabled ? kAimdControl : - kMimdControl; - if (new_control_type != rate_control_type_) { - rate_control_type_ = new_control_type; - PickEstimator(); - } - } - private: void PickEstimatorFromHeader(const RTPHeader& header) EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get()) { @@ -130,10 +118,10 @@ class WrappingBitrateEstimator : public RemoteBitrateEstimator { void PickEstimator() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get()) { if (using_absolute_send_time_) { rbe_.reset(AbsoluteSendTimeRemoteBitrateEstimatorFactory().Create( - observer_, clock_, rate_control_type_, min_bitrate_bps_)); + observer_, clock_, kAimdControl, min_bitrate_bps_)); } else { rbe_.reset(RemoteBitrateEstimatorFactory().Create( - observer_, clock_, rate_control_type_, min_bitrate_bps_)); + observer_, clock_, kAimdControl, min_bitrate_bps_)); } } @@ -141,7 +129,6 @@ class WrappingBitrateEstimator : public RemoteBitrateEstimator { Clock* clock_; scoped_ptr crit_sect_; const uint32_t min_bitrate_bps_; - RateControlType rate_control_type_; scoped_ptr rbe_; bool using_absolute_send_time_; uint32_t packets_since_absolute_send_time_; @@ -240,10 +227,4 @@ void ChannelGroup::SetChannelRembStatus(int channel_id, remb_->RemoveReceiveChannel(rtp_module); } } - -void ChannelGroup::SetBandwidthEstimationConfig(const webrtc::Config& config) { - WrappingBitrateEstimator* estimator = - static_cast(remote_bitrate_estimator_.get()); - estimator->SetConfig(config); -} } // namespace webrtc diff --git a/webrtc/video_engine/vie_channel_group.h b/webrtc/video_engine/vie_channel_group.h index 9593ec52c..13d80f7c5 100644 --- a/webrtc/video_engine/vie_channel_group.h +++ b/webrtc/video_engine/vie_channel_group.h @@ -43,7 +43,6 @@ class ChannelGroup { bool sender, bool receiver, ViEChannel* channel); - void SetBandwidthEstimationConfig(const webrtc::Config& config); BitrateController* GetBitrateController(); CallStats* GetCallStats(); diff --git a/webrtc/video_engine/vie_channel_manager.cc b/webrtc/video_engine/vie_channel_manager.cc index dccd324e6..0ea23add0 100644 --- a/webrtc/video_engine/vie_channel_manager.cc +++ b/webrtc/video_engine/vie_channel_manager.cc @@ -388,17 +388,6 @@ void ViEChannelManager::UpdateSsrcs(int channel_id, } } -bool ViEChannelManager::SetBandwidthEstimationConfig( - int channel_id, const webrtc::Config& config) { - CriticalSectionScoped cs(channel_id_critsect_); - ChannelGroup* group = FindGroup(channel_id); - if (!group) { - return false; - } - group->SetBandwidthEstimationConfig(config); - return true; -} - bool ViEChannelManager::GetEstimatedSendBandwidth( int channel_id, uint32_t* estimated_bandwidth) const { CriticalSectionScoped cs(channel_id_critsect_); diff --git a/webrtc/video_engine/vie_channel_manager.h b/webrtc/video_engine/vie_channel_manager.h index ece8a5ac5..e0e358855 100644 --- a/webrtc/video_engine/vie_channel_manager.h +++ b/webrtc/video_engine/vie_channel_manager.h @@ -80,10 +80,6 @@ class ViEChannelManager: private ViEManagerBase { // it will simply be ignored and no error is returned. void UpdateSsrcs(int channel_id, const std::list& ssrcs); - // Sets bandwidth estimation related configurations. - bool SetBandwidthEstimationConfig(int channel_id, - const webrtc::Config& config); - bool GetEstimatedSendBandwidth(int channel_id, uint32_t* estimated_bandwidth) const; bool GetEstimatedReceiveBandwidth(int channel_id, diff --git a/webrtc/video_engine/vie_network_impl.cc b/webrtc/video_engine/vie_network_impl.cc index aafcd2dce..e9089f099 100644 --- a/webrtc/video_engine/vie_network_impl.cc +++ b/webrtc/video_engine/vie_network_impl.cc @@ -162,11 +162,4 @@ int ViENetworkImpl::ReceivedBWEPacket(const int video_channel, vie_channel->ReceivedBWEPacket(arrival_time_ms, payload_size, header); return 0; } - -bool ViENetworkImpl::SetBandwidthEstimationConfig( - int video_channel, const webrtc::Config& config) { - LOG_F(LS_INFO) << "channel: " << video_channel; - return shared_data_->channel_manager()->SetBandwidthEstimationConfig( - video_channel, config); -} } // namespace webrtc diff --git a/webrtc/video_engine/vie_network_impl.h b/webrtc/video_engine/vie_network_impl.h index cf2c72efe..f2d5772c1 100644 --- a/webrtc/video_engine/vie_network_impl.h +++ b/webrtc/video_engine/vie_network_impl.h @@ -44,10 +44,6 @@ class ViENetworkImpl size_t payload_size, const RTPHeader& header) OVERRIDE; - virtual bool SetBandwidthEstimationConfig( - int video_channel, - const webrtc::Config& config) OVERRIDE; - protected: explicit ViENetworkImpl(ViESharedData* shared_data); virtual ~ViENetworkImpl();