Commit d5d08054 authored by dmaclach@chromium.org's avatar dmaclach@chromium.org

Get remoting units working correctly.

And make them easier to read.

BUG=NONE
TEST=Run remoting.

Review URL: http://codereview.chromium.org/6992069

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86646 0039d316-1c4b-4281-b951-d872f2087c98
parent 06a82880
...@@ -307,8 +307,22 @@ function updateStatusBarStats() { ...@@ -307,8 +307,22 @@ function updateStatusBarStats() {
var videoDecodeLatency = remoting.plugin.videoDecodeLatency; var videoDecodeLatency = remoting.plugin.videoDecodeLatency;
var videoRenderLatency = remoting.plugin.videoRenderLatency; 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( setClientStateMessage(
'Video stats: bandwidth: ' + videoBandwidth.toFixed(2) + 'Kbps' + 'Video stats: bandwidth: ' + videoBandwidth.toFixed(2) + units +
', Latency: capture: ' + videoCaptureLatency.toFixed(2) + 'ms' + ', Latency: capture: ' + videoCaptureLatency.toFixed(2) + 'ms' +
', encode: ' + videoEncodeLatency.toFixed(2) + 'ms' + ', encode: ' + videoEncodeLatency.toFixed(2) + 'ms' +
', decode: ' + videoDecodeLatency.toFixed(2) + 'ms' + ', decode: ' + videoDecodeLatency.toFixed(2) + 'ms' +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment