Chromium Code Reviews| 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 |