Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(651)

Unified Diff: media/cast/net/pacing/paced_sender.h

Issue 567853002: Cast: Make pacing controllable by the extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/cast/net/pacing/paced_sender.h
diff --git a/media/cast/net/pacing/paced_sender.h b/media/cast/net/pacing/paced_sender.h
index 8e5a60366a1c067f90ed5f4092210f17f58ca2ab..9621af466ba9bd28f1fba847316f2e905d184e03 100644
--- a/media/cast/net/pacing/paced_sender.h
+++ b/media/cast/net/pacing/paced_sender.h
@@ -22,6 +22,10 @@
namespace media {
namespace cast {
+// Meant to use as defaults for pacer construction.
+static const size_t kTargetBurstSize = 10;
+static const size_t kMaxBurstSize = 20;
+
class LoggingImpl;
// Use std::pair for free comparison operators.
@@ -78,6 +82,8 @@ class PacedSender : public PacedPacketSender,
// The |external_transport| should only be used by the Cast receiver and for
// testing.
PacedSender(
+ size_t target_burst_size, // Should normally be kTargetBurstSize.
+ size_t max_burst_size, // Should normally be kMaxBurstSize.
base::TickClock* clock,
LoggingImpl* logging,
PacketSender* external_transport,
@@ -185,8 +191,11 @@ class PacedSender : public PacedPacketSender,
// Records the last byte sent for payload with a specific SSRC.
std::map<uint32, int64> last_byte_sent_;
- // Maximum burst size for the next three bursts.
+ size_t target_burst_size_;
size_t max_burst_size_;
+
+ // Maximum burst size for the next three bursts.
+ size_t current_max_burst_size_;
size_t next_max_burst_size_;
size_t next_next_max_burst_size_;
// Number of packets already sent in the current burst.

Powered by Google App Engine
This is Rietveld 408576698