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

Unified Diff: remoting/webapp/me2mom/remoting_session.js

Issue 6992069: Get remoting units working correctly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/me2mom/remoting_session.js
diff --git a/remoting/webapp/me2mom/remoting_session.js b/remoting/webapp/me2mom/remoting_session.js
index 1a2629e8b3da1a3e6975a104e8147a9fa4966641..934b22974e89b74a14d0c2331a84c610c6d1fd55 100644
--- a/remoting/webapp/me2mom/remoting_session.js
+++ b/remoting/webapp/me2mom/remoting_session.js
@@ -307,8 +307,22 @@ function updateStatusBarStats() {
var videoDecodeLatency = remoting.plugin.videoDecodeLatency;
var videoRenderLatency = remoting.plugin.videoRenderLatency;
+ var units = '';
+ if (videoBandwidth < 1024) {
+ units = 'Bps';
+ } else if (videoBandwidth < 1048576) {
+ units = 'KBps';
+ videoBandwidth = videoBandwidth / 1024;
+ } else if (videoBandwidth < 1073741824) {
+ units = 'MBps';
+ videoBandwidth = videoBandwidth / 1048576;
+ } else {
+ units = 'GBps';
+ videoBandwidth = videoBandwidth / 1073741824;
+ }
+
setClientStateMessage(
- 'Video stats: bandwidth: ' + videoBandwidth.toFixed(2) + 'Kbps' +
+ 'Video stats: bandwidth: ' + videoBandwidth.toFixed(2) + units +
', Latency: capture: ' + videoCaptureLatency.toFixed(2) + 'ms' +
', encode: ' + videoEncodeLatency.toFixed(2) + 'ms' +
', decode: ' + videoDecodeLatency.toFixed(2) + 'ms' +
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698