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

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: Rebased Created 4 years, 5 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..f5e1a2b6cb5a23cab568d7886a83c3fed6707fc0 100644
--- a/webrtc/modules/pacing/bitrate_prober.h
+++ b/webrtc/modules/pacing/bitrate_prober.h
@@ -55,7 +55,20 @@ class BitrateProber {
void PacketSent(int64_t now_ms, size_t packet_size);
private:
- enum ProbingState { kDisabled, kAllowedToProbe, kProbing, kWait };
+ // Resets the state of the prober and clears any cluster/timing data tracked.
+ void ResetState();
stefan-webrtc 2016/08/02 11:59:27 Put methods after enums/classes
Irfan 2016/08/02 16:44:30 Done.
+ 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;
@@ -69,8 +82,9 @@ class BitrateProber {
// 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