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

Unified Diff: webrtc/modules/pacing/bitrate_prober.h

Issue 2182603002: Bitrate prober and paced sender improvements (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix nits Created 4 years, 4 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
« no previous file with comments | « no previous file | webrtc/modules/pacing/bitrate_prober.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/pacing/bitrate_prober.h
diff --git a/webrtc/modules/pacing/bitrate_prober.h b/webrtc/modules/pacing/bitrate_prober.h
index e8967abde45977753ff096acdc9016ba2b3b1e2f..c2f9ad8c4713db52ea8d000b6ca1d554d31d5adf 100644
--- a/webrtc/modules/pacing/bitrate_prober.h
+++ b/webrtc/modules/pacing/bitrate_prober.h
@@ -55,7 +55,18 @@ class BitrateProber {
void PacketSent(int64_t now_ms, size_t packet_size);
private:
- enum ProbingState { kDisabled, kAllowedToProbe, kProbing, kWait };
+ enum class ProbingState {
+ // Probing will not be triggered in this state at all times.
+ kDisabled,
+ // Probing is enabled and ready to trigger on the first packet arrival.
+ kInactive,
+ // Probe cluster is filled with the set of data rates to be probed and
+ // probes are being sent.
+ kActive,
+ // Probing is enabled, but currently suspended until an explicit trigger
+ // to start probing again.
+ kSuspended,
+ };
struct ProbeCluster {
int max_probe_packets = 0;
@@ -64,13 +75,17 @@ class BitrateProber {
int id = -1;
};
+ // Resets the state of the prober and clears any cluster/timing data tracked.
+ void ResetState();
+
ProbingState probing_state_;
// Probe bitrate per packet. These are used to compute the delta relative to
// the previous probe packet based on the size and time when that packet was
// sent.
std::queue<ProbeCluster> clusters_;
- size_t packet_size_last_send_;
- int64_t time_last_send_ms_;
+ size_t packet_size_last_sent_;
+ // The last time a probe was sent.
+ int64_t time_last_probe_sent_ms_;
int next_cluster_id_;
};
} // namespace webrtc
« no previous file with comments | « no previous file | webrtc/modules/pacing/bitrate_prober.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698