Revert of Remove SendPacer from ViEEncoder (patchset #13 id:240001 of https://codereview.webrtc.org/1917793002/ )
Reason for revert:
Fails in the waterfall here:
https://build.chromium.org/p/client.webrtc/builders/Win32%20Debug/builds/7832/steps/rtc_media_unittests/logs/stdio
Original issue's 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=webrtc:5687
>
> Committed: https://crrev.com/857c5ccdb56e4c94196f7c6227abd5993c95abe2
> Cr-Commit-Position: refs/heads/master@{#12620}
TBR=stefan@webrtc.org,mflodman@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5687
Review-Url: https://codereview.webrtc.org/1947853002
Cr-Commit-Position: refs/heads/master@{#12621}
diff --git a/webrtc/modules/bitrate_controller/bitrate_controller_impl.h b/webrtc/modules/bitrate_controller/bitrate_controller_impl.h
index 5a61379..a966121 100644
--- a/webrtc/modules/bitrate_controller/bitrate_controller_impl.h
+++ b/webrtc/modules/bitrate_controller/bitrate_controller_impl.h
@@ -28,8 +28,6 @@
class BitrateControllerImpl : public BitrateController {
public:
- // TODO(perkj): BitrateObserver has been deprecated and is not used in WebRTC.
- // |observer| is left for project that is not yet updated.
BitrateControllerImpl(Clock* clock, BitrateObserver* observer);
virtual ~BitrateControllerImpl() {}
@@ -52,11 +50,6 @@
void SetEventLog(RtcEventLog* event_log) override;
- // Returns true if the parameters have changed since the last call.
- bool GetNetworkParameters(uint32_t* bitrate,
- uint8_t* fraction_loss,
- int64_t* rtt) override;
-
int64_t TimeUntilNextProcess() override;
void Process() override;
@@ -71,16 +64,20 @@
int number_of_packets,
int64_t now_ms);
- // Deprecated
void MaybeTriggerOnNetworkChanged();
+ // Returns true if the parameters have changed since the last call.
+ bool GetNetworkParameters(uint32_t* bitrate,
+ uint8_t* fraction_loss,
+ int64_t* rtt);
+
void OnNetworkChanged(uint32_t bitrate,
uint8_t fraction_loss, // 0 - 255.
int64_t rtt) EXCLUSIVE_LOCKS_REQUIRED(critsect_);
// Used by process thread.
- Clock* const clock_;
- BitrateObserver* const observer_;
+ Clock* clock_;
+ BitrateObserver* observer_;
int64_t last_bitrate_update_ms_;
rtc::CriticalSection critsect_;