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:
parent
503c33666f
commit
aafbec15f9
@ -914,9 +914,6 @@ class FakeWebRtcVideoEngine
|
|||||||
WEBRTC_STUB(SetMTU, (int, unsigned int));
|
WEBRTC_STUB(SetMTU, (int, unsigned int));
|
||||||
WEBRTC_STUB(ReceivedBWEPacket, (const int, int64_t, size_t,
|
WEBRTC_STUB(ReceivedBWEPacket, (const int, int64_t, size_t,
|
||||||
const webrtc::RTPHeader&));
|
const webrtc::RTPHeader&));
|
||||||
virtual bool SetBandwidthEstimationConfig(int, const webrtc::Config&) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// webrtc::ViERender
|
// webrtc::ViERender
|
||||||
WEBRTC_STUB(RegisterVideoRenderModule, (webrtc::VideoRender&));
|
WEBRTC_STUB(RegisterVideoRenderModule, (webrtc::VideoRender&));
|
||||||
|
@ -3660,16 +3660,6 @@ bool WebRtcVideoMediaChannel::ConfigureSending(int channel_id,
|
|||||||
return false;
|
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();
|
send_channels_[local_ssrc_key] = send_channel.release();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -86,13 +86,6 @@ class WEBRTC_DLLEXPORT ViENetwork {
|
|||||||
return 0;
|
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:
|
protected:
|
||||||
ViENetwork() {}
|
ViENetwork() {}
|
||||||
virtual ~ViENetwork() {}
|
virtual ~ViENetwork() {}
|
||||||
|
@ -39,10 +39,9 @@ class WrappingBitrateEstimator : public RemoteBitrateEstimator {
|
|||||||
clock_(clock),
|
clock_(clock),
|
||||||
crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
|
crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
|
||||||
min_bitrate_bps_(config.Get<RemoteBitrateEstimatorMinRate>().min_rate),
|
min_bitrate_bps_(config.Get<RemoteBitrateEstimatorMinRate>().min_rate),
|
||||||
rate_control_type_(kAimdControl),
|
|
||||||
rbe_(RemoteBitrateEstimatorFactory().Create(observer_,
|
rbe_(RemoteBitrateEstimatorFactory().Create(observer_,
|
||||||
clock_,
|
clock_,
|
||||||
rate_control_type_,
|
kAimdControl,
|
||||||
min_bitrate_bps_)),
|
min_bitrate_bps_)),
|
||||||
using_absolute_send_time_(false),
|
using_absolute_send_time_(false),
|
||||||
packets_since_absolute_send_time_(0) {
|
packets_since_absolute_send_time_(0) {
|
||||||
@ -89,17 +88,6 @@ class WrappingBitrateEstimator : public RemoteBitrateEstimator {
|
|||||||
return rbe_->GetStats(output);
|
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:
|
private:
|
||||||
void PickEstimatorFromHeader(const RTPHeader& header)
|
void PickEstimatorFromHeader(const RTPHeader& header)
|
||||||
EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get()) {
|
EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get()) {
|
||||||
@ -130,10 +118,10 @@ class WrappingBitrateEstimator : public RemoteBitrateEstimator {
|
|||||||
void PickEstimator() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get()) {
|
void PickEstimator() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get()) {
|
||||||
if (using_absolute_send_time_) {
|
if (using_absolute_send_time_) {
|
||||||
rbe_.reset(AbsoluteSendTimeRemoteBitrateEstimatorFactory().Create(
|
rbe_.reset(AbsoluteSendTimeRemoteBitrateEstimatorFactory().Create(
|
||||||
observer_, clock_, rate_control_type_, min_bitrate_bps_));
|
observer_, clock_, kAimdControl, min_bitrate_bps_));
|
||||||
} else {
|
} else {
|
||||||
rbe_.reset(RemoteBitrateEstimatorFactory().Create(
|
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_;
|
Clock* clock_;
|
||||||
scoped_ptr<CriticalSectionWrapper> crit_sect_;
|
scoped_ptr<CriticalSectionWrapper> crit_sect_;
|
||||||
const uint32_t min_bitrate_bps_;
|
const uint32_t min_bitrate_bps_;
|
||||||
RateControlType rate_control_type_;
|
|
||||||
scoped_ptr<RemoteBitrateEstimator> rbe_;
|
scoped_ptr<RemoteBitrateEstimator> rbe_;
|
||||||
bool using_absolute_send_time_;
|
bool using_absolute_send_time_;
|
||||||
uint32_t packets_since_absolute_send_time_;
|
uint32_t packets_since_absolute_send_time_;
|
||||||
@ -240,10 +227,4 @@ void ChannelGroup::SetChannelRembStatus(int channel_id,
|
|||||||
remb_->RemoveReceiveChannel(rtp_module);
|
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
|
} // namespace webrtc
|
||||||
|
@ -43,7 +43,6 @@ class ChannelGroup {
|
|||||||
bool sender,
|
bool sender,
|
||||||
bool receiver,
|
bool receiver,
|
||||||
ViEChannel* channel);
|
ViEChannel* channel);
|
||||||
void SetBandwidthEstimationConfig(const webrtc::Config& config);
|
|
||||||
|
|
||||||
BitrateController* GetBitrateController();
|
BitrateController* GetBitrateController();
|
||||||
CallStats* GetCallStats();
|
CallStats* GetCallStats();
|
||||||
|
@ -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(
|
bool ViEChannelManager::GetEstimatedSendBandwidth(
|
||||||
int channel_id, uint32_t* estimated_bandwidth) const {
|
int channel_id, uint32_t* estimated_bandwidth) const {
|
||||||
CriticalSectionScoped cs(channel_id_critsect_);
|
CriticalSectionScoped cs(channel_id_critsect_);
|
||||||
|
@ -80,10 +80,6 @@ class ViEChannelManager: private ViEManagerBase {
|
|||||||
// it will simply be ignored and no error is returned.
|
// it will simply be ignored and no error is returned.
|
||||||
void UpdateSsrcs(int channel_id, const std::list<unsigned int>& ssrcs);
|
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,
|
bool GetEstimatedSendBandwidth(int channel_id,
|
||||||
uint32_t* estimated_bandwidth) const;
|
uint32_t* estimated_bandwidth) const;
|
||||||
bool GetEstimatedReceiveBandwidth(int channel_id,
|
bool GetEstimatedReceiveBandwidth(int channel_id,
|
||||||
|
@ -162,11 +162,4 @@ int ViENetworkImpl::ReceivedBWEPacket(const int video_channel,
|
|||||||
vie_channel->ReceivedBWEPacket(arrival_time_ms, payload_size, header);
|
vie_channel->ReceivedBWEPacket(arrival_time_ms, payload_size, header);
|
||||||
return 0;
|
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
|
} // namespace webrtc
|
||||||
|
@ -44,10 +44,6 @@ class ViENetworkImpl
|
|||||||
size_t payload_size,
|
size_t payload_size,
|
||||||
const RTPHeader& header) OVERRIDE;
|
const RTPHeader& header) OVERRIDE;
|
||||||
|
|
||||||
virtual bool SetBandwidthEstimationConfig(
|
|
||||||
int video_channel,
|
|
||||||
const webrtc::Config& config) OVERRIDE;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit ViENetworkImpl(ViESharedData* shared_data);
|
explicit ViENetworkImpl(ViESharedData* shared_data);
|
||||||
virtual ~ViENetworkImpl();
|
virtual ~ViENetworkImpl();
|
||||||
|
Loading…
Reference in New Issue
Block a user