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

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

Issue 1946173002: Bitrate prober now keep track of probing cluster id. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 4 years, 7 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 0749ce48918fd5deced4dd355439e01b568ad47f..b0c0986a199a3c9bcd5477247e7d46b1d448c514 100644
--- a/webrtc/modules/pacing/bitrate_prober.h
+++ b/webrtc/modules/pacing/bitrate_prober.h
@@ -13,6 +13,7 @@
#include <cstddef>
#include <list>
+#include <queue>
#include "webrtc/typedefs.h"
@@ -42,6 +43,9 @@ class BitrateProber {
// get accurate probing.
int TimeUntilNextProbe(int64_t now_ms);
+ // Which cluster that is currently being used for probing.
+ int CurrentClusterId() const;
+
// Returns the number of bytes that the prober recommends for the next probe
// packet.
size_t RecommendedPacketSize() const;
@@ -53,13 +57,21 @@ class BitrateProber {
private:
enum ProbingState { kDisabled, kAllowedToProbe, kProbing, kWait };
+ struct ProbeCluster {
+ int max_probe_packets = 0;
+ int sent_probe_packets = 0;
+ int probe_bitrate_bps = 0;
+ int id = -1;
+ };
+
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::list<uint32_t> probe_bitrates_;
+ std::queue<ProbeCluster> clusters_;
size_t packet_size_last_send_;
int64_t time_last_send_ms_;
+ int cluster_id_;
};
} // namespace webrtc
#endif // WEBRTC_MODULES_PACING_BITRATE_PROBER_H_
« 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