diff options
Diffstat (limited to 'modules/pacing/bitrate_prober.h')
-rw-r--r-- | modules/pacing/bitrate_prober.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/modules/pacing/bitrate_prober.h b/modules/pacing/bitrate_prober.h index 3ebe26ac1f..5a89aac435 100644 --- a/modules/pacing/bitrate_prober.h +++ b/modules/pacing/bitrate_prober.h @@ -35,9 +35,11 @@ struct BitrateProberConfig { FieldTrialParameter<TimeDelta> min_probe_delta; // The minimum probing duration. FieldTrialParameter<TimeDelta> min_probe_duration; - // Maximum amount of time each probe can be delayed. Probe cluster is reset - // and retried from the start when this limit is reached. + // Maximum amount of time each probe can be delayed. FieldTrialParameter<TimeDelta> max_probe_delay; + // If NextProbeTime() is called with a delay higher than specified by + // |max_probe_delay|, abort it. + FieldTrialParameter<bool> abort_delayed_probes; }; // Note that this class isn't thread-safe by itself and therefore relies @@ -57,29 +59,29 @@ class BitrateProber { // Initializes a new probing session if the prober is allowed to probe. Does // not initialize the prober unless the packet size is large enough to probe // with. - void OnIncomingPacket(size_t packet_size); + void OnIncomingPacket(DataSize packet_size); // Create a cluster used to probe for |bitrate_bps| with |num_probes| number // of probes. void CreateProbeCluster(DataRate bitrate, Timestamp now, int cluster_id); - // Returns the at which the next probe should be sent to get accurate probing. - // If probing is not desired at this time, Timestamp::PlusInfinity() will be - // returned. + // Returns the time at which the next probe should be sent to get accurate + // probing. If probing is not desired at this time, Timestamp::PlusInfinity() + // will be returned. + // TODO(bugs.webrtc.org/11780): Remove |now| argument when old mode is gone. Timestamp NextProbeTime(Timestamp now) const; // Information about the current probing cluster. - PacedPacketInfo CurrentCluster() const; + absl::optional<PacedPacketInfo> CurrentCluster(Timestamp now); // Returns the minimum number of bytes that the prober recommends for - // the next probe. - size_t RecommendedMinProbeSize() const; + // the next probe, or zero if not probing. + DataSize RecommendedMinProbeSize() const; // Called to report to the prober that a probe has been sent. In case of // multiple packets per probe, this call would be made at the end of sending - // the last packet in probe. |probe_size| is the total size of all packets - // in probe. - void ProbeSent(Timestamp now, size_t probe_size); + // the last packet in probe. |size| is the total size of all packets in probe. + void ProbeSent(Timestamp now, DataSize size); private: enum class ProbingState { |