Index: webrtc/modules/pacing/paced_sender.h |
diff --git a/webrtc/modules/pacing/paced_sender.h b/webrtc/modules/pacing/paced_sender.h |
index 16569b04045fc7febe2cde2f84a68db3c9b06ab2..8b3e79c858fe1a74fcfa6a1ce3f383925819565e 100644 |
--- a/webrtc/modules/pacing/paced_sender.h |
+++ b/webrtc/modules/pacing/paced_sender.h |
@@ -33,7 +33,7 @@ class PacketQueue; |
class PacedSender : public Module, public RtpPacketSender { |
public: |
- class Callback { |
+ class SenderDelegate { |
stefan-webrtc
2016/04/29 10:48:38
We have pretty few examples of "Delegate" in this
perkj_webrtc
2016/05/02 11:29:10
Ok- do you this this change is wrong? I don't thin
|
public: |
// Note: packets sent as a result of a callback should not pass by this |
// module again. |
@@ -48,7 +48,7 @@ class PacedSender : public Module, public RtpPacketSender { |
virtual size_t TimeToSendPadding(size_t bytes) = 0; |
protected: |
- virtual ~Callback() {} |
+ virtual ~SenderDelegate() {} |
}; |
// Expected max pacer delay in ms. If ExpectedQueueTimeMs() is higher than |
@@ -67,11 +67,7 @@ class PacedSender : public Module, public RtpPacketSender { |
static const size_t kMinProbePacketSize = 200; |
- PacedSender(Clock* clock, |
- Callback* callback, |
- int bitrate_kbps, |
- int max_bitrate_kbps, |
- int min_bitrate_kbps); |
+ PacedSender(Clock* clock, SenderDelegate* delegate, int target_bitrate_bps); |
virtual ~PacedSender(); |
@@ -86,14 +82,19 @@ class PacedSender : public Module, public RtpPacketSender { |
// effect. |
void SetProbingEnabled(bool enabled); |
- // Set target bitrates for the pacer. |
- // We will pace out bursts of packets at a bitrate of |max_bitrate_kbps|. |
- // |bitrate_kbps| is our estimate of what we are allowed to send on average. |
- // Padding packets will be utilized to reach |min_bitrate| unless enough media |
+ // Sets the estimated max capacity of the network. |
+ // |bitrate_bps| is our estimate of what we are allowed to send on average. |
+ // We will pace out bursts of packets at a bitrate of |
+ // |bitrate_bps| * kDefaultPaceMultiplier. |
+ void SetNetWorkEstimateTargetBitrate(uint32_t bitrate_bps); |
stefan-webrtc
2016/04/29 10:48:38
SetSendBitrate or SetTargetBitrate, or maybe even
|
+ |
+ // Sets the minimum send bitrate. This can be higher than set in |
+ // SetNetWorkEstimateTargetBitrate. |
+ void SetMinimumSendBitrate(int bitrate_bps); |
+ |
+ // Padding packets will be utilized to reach |bitrate_bps| unless enough media |
// packets are available. |
- void UpdateBitrate(int bitrate_kbps, |
- int max_bitrate_kbps, |
- int min_bitrate_kbps); |
+ void SetPaddingBitrate(int bitrate_bps); |
stefan-webrtc
2016/04/29 10:48:38
SetPaddingBitrate is a bad name I think, since the
|
// Returns true if we send the packet now, else it will add the packet |
// information to the queue and call TimeToSendPacket when it's time to send. |
@@ -134,7 +135,7 @@ class PacedSender : public Module, public RtpPacketSender { |
void SendPadding(size_t padding_needed) EXCLUSIVE_LOCKS_REQUIRED(critsect_); |
Clock* const clock_; |
- Callback* const callback_; |
+ SenderDelegate* const delegate_; |
std::unique_ptr<CriticalSectionWrapper> critsect_; |
bool paused_ GUARDED_BY(critsect_); |
@@ -152,8 +153,9 @@ class PacedSender : public Module, public RtpPacketSender { |
std::unique_ptr<BitrateProber> prober_ GUARDED_BY(critsect_); |
// Actual configured bitrates (media_budget_ may temporarily be higher in |
// order to meet pace time constraint). |
- int bitrate_bps_ GUARDED_BY(critsect_); |
- int max_bitrate_kbps_ GUARDED_BY(critsect_); |
+ uint32_t estimated_bitrate_bps_ GUARDED_BY(critsect_); |
+ uint32_t min_send_bitrate_kbps_ GUARDED_BY(critsect_); |
+ uint32_t target_bitrate_kbps_ GUARDED_BY(critsect_); |
int64_t time_last_update_us_ GUARDED_BY(critsect_); |