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 |