Index: webrtc/modules/pacing/paced_sender.h |
diff --git a/webrtc/modules/pacing/paced_sender.h b/webrtc/modules/pacing/paced_sender.h |
index 1d9f2de2614d14567ca1b15d2d8e17e9770d007b..35873be013938a8c007d6a720436fdc33dd99733 100644 |
--- a/webrtc/modules/pacing/paced_sender.h |
+++ b/webrtc/modules/pacing/paced_sender.h |
@@ -15,6 +15,7 @@ |
#include <memory> |
#include <set> |
+#include "webrtc/base/rate_statistics.h" |
#include "webrtc/base/thread_annotations.h" |
#include "webrtc/modules/include/module.h" |
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
@@ -108,6 +109,16 @@ class PacedSender : public Module, public RtpPacketSender { |
size_t bytes, |
bool retransmission) override; |
+ // Try to allocate bitrate for sending a retransmission. This may fail if too |
+ // much retransmission is requested in relation to payload. |
+ bool AllocateRetransmissionBitrate(size_t bytes) override; |
danilchap
2016/06/23 12:46:12
this function doesn't seem to allocate(reserve) bi
sprang_webrtc
2016/06/28 09:12:32
Actually, having this in the pacer didn't work wel
|
+ |
+ // The current retransmission bitrate, in bps. |
+ int CurrentRetransmissionBitrate() override; |
+ |
+ // Set the current RTT. Used to determine maximum retransmission bitrate. |
+ void OnRttUpdate(int64_t rtt); |
+ |
// Returns the time since the oldest queued packet was enqueued. |
virtual int64_t QueueInMs() const; |
@@ -166,6 +177,11 @@ class PacedSender : public Module, public RtpPacketSender { |
std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); |
uint64_t packet_counter_; |
+ |
+ // Average retransmission bitrate, incoming to the pacer. Limits |
+ // retransmission bitrate in relation to payload bitrate. |
+ RateStatistics retransmission_rate_ GUARDED_BY(critsect_); |
+ int64_t rtt_ms_ GUARDED_BY(critsect_); |
}; |
} // namespace webrtc |
#endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ |