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

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

Issue 2779893004: Reland of Log created probe clusters to RtcEventLog. (Closed)
Patch Set: Dependency fix. Created 3 years, 9 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 | « webrtc/modules/pacing/bitrate_prober.h ('k') | webrtc/modules/pacing/mock/mock_paced_sender.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/pacing/bitrate_prober.cc
diff --git a/webrtc/modules/pacing/bitrate_prober.cc b/webrtc/modules/pacing/bitrate_prober.cc
index dd9ee3325758d93ee9e930a3ce97deb3ff6dd8b8..e4de4a8dadc120c869b91dd4110ac887e34692e9 100644
--- a/webrtc/modules/pacing/bitrate_prober.cc
+++ b/webrtc/modules/pacing/bitrate_prober.cc
@@ -14,6 +14,7 @@
#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log.h"
#include "webrtc/modules/pacing/paced_sender.h"
namespace webrtc {
@@ -45,10 +46,13 @@ constexpr int64_t kProbeClusterTimeoutMs = 5000;
} // namespace
-BitrateProber::BitrateProber()
+BitrateProber::BitrateProber() : BitrateProber(nullptr) {}
+
+BitrateProber::BitrateProber(RtcEventLog* event_log)
: probing_state_(ProbingState::kDisabled),
next_probe_time_ms_(-1),
- next_cluster_id_(0) {
+ next_cluster_id_(0),
+ event_log_(event_log) {
SetEnabled(true);
}
@@ -95,6 +99,11 @@ void BitrateProber::CreateProbeCluster(int bitrate_bps, int64_t now_ms) {
cluster.pace_info.send_bitrate_bps = bitrate_bps;
cluster.pace_info.probe_cluster_id = next_cluster_id_++;
clusters_.push(cluster);
+ if (event_log_)
+ event_log_->LogProbeClusterCreated(
+ cluster.pace_info.probe_cluster_id, cluster.pace_info.send_bitrate_bps,
+ cluster.pace_info.probe_cluster_min_probes,
+ cluster.pace_info.probe_cluster_min_bytes);
LOG(LS_INFO) << "Probe cluster (bitrate:min bytes:min packets): ("
<< cluster.pace_info.send_bitrate_bps << ":"
« no previous file with comments | « webrtc/modules/pacing/bitrate_prober.h ('k') | webrtc/modules/pacing/mock/mock_paced_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698