Chromium Code Reviews| OLD | NEW |
|---|---|
| 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" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 173 // A list of clients connected to this hosts. | 173 // A list of clients connected to this hosts. |
| 174 // This member is always accessed on the network thread. | 174 // This member is always accessed on the network thread. |
| 175 typedef std::vector<scoped_refptr<protocol::ConnectionToClient> > | 175 typedef std::vector<scoped_refptr<protocol::ConnectionToClient> > |
| 176 ConnectionToClientList; | 176 ConnectionToClientList; |
| 177 ConnectionToClientList connections_; | 177 ConnectionToClientList connections_; |
| 178 | 178 |
| 179 // Flag that indicates recording has been started. This variable should only | 179 // Flag that indicates recording has been started. This variable should only |
| 180 // be used on the capture thread. | 180 // be used on the capture thread. |
| 181 bool is_recording_; | 181 bool is_recording_; |
| 182 | 182 |
| 183 // Flag that indicates network is being stopped. This variable should only | 183 // Flags that indicate network and encoder are stopped. This |
|
dmac
2011/08/04 01:27:28
s/This/These/
and what do you mean by correspondi
Sergey Ulanov
2011/08/04 17:44:05
Done.
| |
| 184 // be used on the network thread. | 184 // variables should only be used on the corresponding threads only. |
| 185 bool network_stopped_; | 185 bool network_stopped_; |
| 186 bool encoder_stopped_; | |
| 186 | 187 |
| 187 // Timer that calls DoCapture. | 188 // Timer that calls DoCapture. |
| 188 base::RepeatingTimer<ScreenRecorder> capture_timer_; | 189 base::RepeatingTimer<ScreenRecorder> capture_timer_; |
| 189 | 190 |
| 190 // Count the number of recordings (i.e. capture or encode) happening. | 191 // Count the number of recordings (i.e. capture or encode) happening. |
| 191 int recordings_; | 192 int recordings_; |
| 192 | 193 |
| 193 // Set to true if we've skipped last capture because there are too | 194 // Set to true if we've skipped last capture because there are too |
| 194 // many pending frames. | 195 // many pending frames. |
| 195 int frame_skipped_; | 196 int frame_skipped_; |
| 196 | 197 |
| 197 // 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. |
| 198 double max_rate_; | 199 double max_rate_; |
| 199 | 200 |
| 200 // Time when capture is started. | 201 // Time when capture is started. |
| 201 base::Time capture_start_time_; | 202 base::Time capture_start_time_; |
| 202 | 203 |
| 203 // Time when encode is started. | 204 // Time when encode is started. |
| 204 base::Time encode_start_time_; | 205 base::Time encode_start_time_; |
| 205 | 206 |
| 206 // This is a number updated by client to trace performance. | 207 // This is a number updated by client to trace performance. |
| 207 int64 sequence_number_; | 208 int64 sequence_number_; |
| 208 | 209 |
| 209 DISALLOW_COPY_AND_ASSIGN(ScreenRecorder); | 210 DISALLOW_COPY_AND_ASSIGN(ScreenRecorder); |
| 210 }; | 211 }; |
| 211 | 212 |
| 212 } // namespace remoting | 213 } // namespace remoting |
| 213 | 214 |
| 214 #endif // REMOTING_HOST_SCREEN_RECORDER_H_ | 215 #endif // REMOTING_HOST_SCREEN_RECORDER_H_ |
| OLD | NEW |