Remove SendPacer from ViEEncoder and make sure SendPacer starts at a valid bitrate This reverts commit e30c27205148b34ba421184efe65f6a0780b436d (https://codereview.webrtc.org/1958053002/) Original reverted cl is in patch set #1. Changes in following patch sets. The cl now also make sure SendPacer starts with the configured bitrate provided in a call to CongestionController::SetBweBitrates)() It turns out that the failing tests in 609816 is due to a bug in the current code that runs the proper at 300kbit regardless of configured start bitrate. Original cl description: Remove SendPacer from ViEEncoder This CL moves the logic where the ViEEncoder pause if the pacer is full to the BitrateController. If the queue is full, the controller reports a bitrate of zero to Call (and BitrateAllocator) BUG=chromium:609816, webrtc:5687 TBR=mflodman@webrtc.org NOTRY=True // Due to bug in android_x86 cq builder.... Review-Url: https://codereview.webrtc.org/1958113003 Cr-Commit-Position: refs/heads/master@{#12688}
diff --git a/webrtc/call/call.cc b/webrtc/call/call.cc index 82ca630..f7c66db 100644 --- a/webrtc/call/call.cc +++ b/webrtc/call/call.cc
@@ -52,8 +52,9 @@ namespace internal { -class Call : public webrtc::Call, public PacketReceiver, - public BitrateObserver { +class Call : public webrtc::Call, + public PacketReceiver, + public CongestionController::Observer { public: explicit Call(const Call::Config& config); virtual ~Call(); @@ -699,10 +700,8 @@ pacer_bitrate_sum_kbits_ += pacer_bitrate_bps / 1000; ++num_bitrate_updates_; } - congestion_controller_->UpdatePacerBitrate( - target_bitrate_bps / 1000, - PacedSender::kDefaultPaceMultiplier * pacer_bitrate_bps / 1000, - pad_up_to_bitrate_bps / 1000); + congestion_controller_->SetAllocatedSendBitrate(allocated_bitrate_bps, + pad_up_to_bitrate_bps); } void Call::ConfigureSync(const std::string& sync_group) {