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

Side by Side Diff: remoting/host/screen_recorder.h

Issue 6792038: Chromoting to report roundtrip latency (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: done Created 9 years, 8 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 | « remoting/host/chromoting_host.cc ('k') | remoting/host/screen_recorder.cc » ('j') | no next file with comments »
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 #ifndef REMOTING_HOST_SCREEN_RECORDER_H_ 5 #ifndef REMOTING_HOST_SCREEN_RECORDER_H_
6 #define REMOTING_HOST_SCREEN_RECORDER_H_ 6 #define REMOTING_HOST_SCREEN_RECORDER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "base/scoped_ptr.h"
15 #include "base/time.h" 14 #include "base/time.h"
16 #include "base/timer.h" 15 #include "base/timer.h"
17 #include "remoting/base/encoder.h" 16 #include "remoting/base/encoder.h"
18 #include "remoting/host/capturer.h" 17 #include "remoting/host/capturer.h"
19 #include "remoting/proto/video.pb.h" 18 #include "remoting/proto/video.pb.h"
20 19
21 namespace remoting { 20 namespace remoting {
22 21
23 namespace protocol { 22 namespace protocol {
24 class ConnectionToClient; 23 class ConnectionToClient;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 96
98 // Add a connection to this recording session. 97 // Add a connection to this recording session.
99 void AddConnection(scoped_refptr<protocol::ConnectionToClient> connection); 98 void AddConnection(scoped_refptr<protocol::ConnectionToClient> connection);
100 99
101 // Remove a connection from receiving screen updates. 100 // Remove a connection from receiving screen updates.
102 void RemoveConnection(scoped_refptr<protocol::ConnectionToClient> connection); 101 void RemoveConnection(scoped_refptr<protocol::ConnectionToClient> connection);
103 102
104 // Remove all connections. 103 // Remove all connections.
105 void RemoveAllConnections(); 104 void RemoveAllConnections();
106 105
106 // Update the sequence number for tracing performance.
107 void UpdateSequenceNumber(int64 sequence_number);
108
107 private: 109 private:
108 // Getters for capturer and encoder. 110 // Getters for capturer and encoder.
109 Capturer* capturer(); 111 Capturer* capturer();
110 Encoder* encoder(); 112 Encoder* encoder();
111 113
112 // Capturer thread ---------------------------------------------------------- 114 // Capturer thread ----------------------------------------------------------
113 115
114 void DoStart(); 116 void DoStart();
115 void DoStop(Task* done_task); 117 void DoStop(Task* done_task);
116 void DoCompleteStop(Task* done_task); 118 void DoCompleteStop(Task* done_task);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 197
196 // Number of captures to perform every second. Written on the capture thread. 198 // Number of captures to perform every second. Written on the capture thread.
197 double max_rate_; 199 double max_rate_;
198 200
199 // Time when capture is started. 201 // Time when capture is started.
200 base::Time capture_start_time_; 202 base::Time capture_start_time_;
201 203
202 // Time when encode is started. 204 // Time when encode is started.
203 base::Time encode_start_time_; 205 base::Time encode_start_time_;
204 206
207 // This is a number updated by client to trace performance.
208 int64 sequence_number_;
209
205 DISALLOW_COPY_AND_ASSIGN(ScreenRecorder); 210 DISALLOW_COPY_AND_ASSIGN(ScreenRecorder);
206 }; 211 };
207 212
208 } // namespace remoting 213 } // namespace remoting
209 214
210 #endif // REMOTING_HOST_SCREEN_RECORDER_H_ 215 #endif // REMOTING_HOST_SCREEN_RECORDER_H_
OLDNEW
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/screen_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698