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

Unified Diff: remoting/protocol/frame_stats.cc

Issue 2425873002: Add network parameters fields in FrameStatsMessage (Closed)
Patch Set: . Created 4 years, 2 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 | « remoting/protocol/frame_stats.h ('k') | remoting/protocol/webrtc_frame_scheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/frame_stats.cc
diff --git a/remoting/protocol/frame_stats.cc b/remoting/protocol/frame_stats.cc
index 80bf7c296db4b855b4ece9b92158b64c20302508..ca9ad4b75434c84f9b594446f91893b60bebfd75 100644
--- a/remoting/protocol/frame_stats.cc
+++ b/remoting/protocol/frame_stats.cc
@@ -84,11 +84,17 @@ HostFrameStats HostFrameStats::FromFrameStatsMessage(
result.encode_pending_delay =
base::TimeDelta::FromMilliseconds(message.encode_pending_time_ms());
}
-
if (message.has_send_pending_time_ms()) {
result.send_pending_delay =
base::TimeDelta::FromMilliseconds(message.send_pending_time_ms());
}
+ if (message.has_rtt_estimate_ms()) {
+ result.rtt_estimate =
+ base::TimeDelta::FromMilliseconds(message.rtt_estimate_ms());
+ }
+ if (message.has_bandwidth_estimate_kbps()) {
+ result.bandwidth_estimate_kbps = message.bandwidth_estimate_kbps();
+ }
return result;
}
@@ -121,7 +127,12 @@ void HostFrameStats::ToFrameStatsMessage(FrameStatsMessage* message_out) const {
if (send_pending_delay != base::TimeDelta::Max()) {
message_out->set_send_pending_time_ms(send_pending_delay.InMilliseconds());
}
-
+ if (rtt_estimate != base::TimeDelta::Max()) {
+ message_out->set_rtt_estimate_ms(rtt_estimate.InMilliseconds());
+ }
+ if (bandwidth_estimate_kbps >= 0) {
+ message_out->set_bandwidth_estimate_kbps(bandwidth_estimate_kbps);
+ }
}
FrameStats::FrameStats() = default;
« no previous file with comments | « remoting/protocol/frame_stats.h ('k') | remoting/protocol/webrtc_frame_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698