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

Side by Side Diff: remoting/client/chromoting_client.cc

Issue 8310001: Show framerate in chromoting debug log (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/client/chromoting_stats.h » ('j') | remoting/client/chromoting_stats.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/client/chromoting_client.h" 5 #include "remoting/client/chromoting_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "remoting/client/chromoting_view.h" 8 #include "remoting/client/chromoting_view.h"
9 #include "remoting/client/client_context.h" 9 #include "remoting/client/client_context.h"
10 #include "remoting/client/input_handler.h" 10 #include "remoting/client/input_handler.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // If the video packet is empty then drop it. Empty packets are used to 96 // If the video packet is empty then drop it. Empty packets are used to
97 // maintain activity on the network. 97 // maintain activity on the network.
98 if (!packet->has_data() || packet->data().size() == 0) { 98 if (!packet->has_data() || packet->data().size() == 0) {
99 done.Run(); 99 done.Run();
100 return; 100 return;
101 } 101 }
102 102
103 // Record size of the packet for statistics. 103 // Record size of the packet for statistics.
104 stats_.video_bandwidth()->Record(packet->data().size()); 104 stats_.video_bandwidth()->Record(packet->data().size());
105 105
106 // Add one frame to the counter.
107 stats_.video_frame_rate()->Record(1);
108
106 // Record statistics received from host. 109 // Record statistics received from host.
107 if (packet->has_capture_time_ms()) 110 if (packet->has_capture_time_ms())
108 stats_.video_capture_ms()->Record(packet->capture_time_ms()); 111 stats_.video_capture_ms()->Record(packet->capture_time_ms());
109 if (packet->has_encode_time_ms()) 112 if (packet->has_encode_time_ms())
110 stats_.video_encode_ms()->Record(packet->encode_time_ms()); 113 stats_.video_encode_ms()->Record(packet->encode_time_ms());
111 if (packet->has_client_sequence_number() && 114 if (packet->has_client_sequence_number() &&
112 packet->client_sequence_number() > last_sequence_number_) { 115 packet->client_sequence_number() > last_sequence_number_) {
113 last_sequence_number_ = packet->client_sequence_number(); 116 last_sequence_number_ = packet->client_sequence_number();
114 base::TimeDelta round_trip_latency = 117 base::TimeDelta round_trip_latency =
115 base::Time::Now() - 118 base::Time::Now() -
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // enable the communication channels. 222 // enable the communication channels.
220 if (msg->success()) { 223 if (msg->success()) {
221 connection_->OnClientAuthenticated(); 224 connection_->OnClientAuthenticated();
222 } 225 }
223 226
224 view_->UpdateLoginStatus(msg->success(), msg->error_info()); 227 view_->UpdateLoginStatus(msg->success(), msg->error_info());
225 done.Run(); 228 done.Run();
226 } 229 }
227 230
228 } // namespace remoting 231 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/client/chromoting_stats.h » ('j') | remoting/client/chromoting_stats.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698