Revert "Reland of Remove SendPacer from ViEEncoder
Revert due to crbug/609816. Investigation is ongoing. This reverts commit 28a44564c93b12839618dc0da2e2541ec6a0db23. (https://codereview.webrtc.org/1947873002/) TBR=stefan@webrtc.org, ivoc@webrtc.org, BUG=609816, webrtc:5687 Review-Url: https://codereview.webrtc.org/1958053002 Cr-Commit-Position: refs/heads/master@{#12663}
This commit is contained in:
@ -83,10 +83,6 @@ BitrateController* BitrateController::CreateBitrateController(
|
||||
return new BitrateControllerImpl(clock, observer);
|
||||
}
|
||||
|
||||
BitrateController* BitrateController::CreateBitrateController(Clock* clock) {
|
||||
return new BitrateControllerImpl(clock, nullptr);
|
||||
}
|
||||
|
||||
BitrateControllerImpl::BitrateControllerImpl(Clock* clock,
|
||||
BitrateObserver* observer)
|
||||
: clock_(clock),
|
||||
@ -98,8 +94,8 @@ BitrateControllerImpl::BitrateControllerImpl(Clock* clock,
|
||||
last_fraction_loss_(0),
|
||||
last_rtt_ms_(0),
|
||||
last_reserved_bitrate_bps_(0) {
|
||||
// This calls the observer_ if set, which means that the observer provided by
|
||||
// the user must be ready to accept a bitrate update when it constructs the
|
||||
// This calls the observer_, which means that the observer provided by the
|
||||
// user must be ready to accept a bitrate update when it constructs the
|
||||
// controller. We do this to avoid having to keep synchronized initial values
|
||||
// in both the controller and the allocator.
|
||||
MaybeTriggerOnNetworkChanged();
|
||||
@ -203,15 +199,11 @@ void BitrateControllerImpl::OnReceivedRtcpReceiverReport(
|
||||
}
|
||||
|
||||
void BitrateControllerImpl::MaybeTriggerOnNetworkChanged() {
|
||||
if (!observer_)
|
||||
return;
|
||||
|
||||
uint32_t bitrate_bps;
|
||||
uint32_t bitrate;
|
||||
uint8_t fraction_loss;
|
||||
int64_t rtt;
|
||||
|
||||
if (GetNetworkParameters(&bitrate_bps, &fraction_loss, &rtt))
|
||||
observer_->OnNetworkChanged(bitrate_bps, fraction_loss, rtt);
|
||||
if (GetNetworkParameters(&bitrate, &fraction_loss, &rtt))
|
||||
observer_->OnNetworkChanged(bitrate, fraction_loss, rtt);
|
||||
}
|
||||
|
||||
bool BitrateControllerImpl::GetNetworkParameters(uint32_t* bitrate,
|
||||
|
||||
Reference in New Issue
Block a user