Remove ViENetwork::SetBandwidthEstimationConfig() interface since dynamically changing BWE settings isn't necessary now that AIMD is the default.

BUG=3735
R=mflodman@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/39919005

Cr-Commit-Position: refs/heads/master@{#8351}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8351 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
solenberg@webrtc.org 2015-02-12 13:20:39 +00:00
parent 503c33666f
commit aafbec15f9
9 changed files with 3 additions and 69 deletions

View File

@ -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&));

View File

@ -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;

View File

@ -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() {}

View File

@ -39,10 +39,9 @@ class WrappingBitrateEstimator : public RemoteBitrateEstimator {
clock_(clock),
crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
min_bitrate_bps_(config.Get<RemoteBitrateEstimatorMinRate>().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<AimdRemoteRateControl>().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<CriticalSectionWrapper> crit_sect_;
const uint32_t min_bitrate_bps_;
RateControlType rate_control_type_;
scoped_ptr<RemoteBitrateEstimator> 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<WrappingBitrateEstimator*>(remote_bitrate_estimator_.get());
estimator->SetConfig(config);
}
} // namespace webrtc

View File

@ -43,7 +43,6 @@ class ChannelGroup {
bool sender,
bool receiver,
ViEChannel* channel);
void SetBandwidthEstimationConfig(const webrtc::Config& config);
BitrateController* GetBitrateController();
CallStats* GetCallStats();

View File

@ -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_);

View File

@ -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<unsigned int>& 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,

View File

@ -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

View File

@ -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();