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

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

Issue 7563026: Fix crash in ScreenRecorder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 4 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/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"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Per-thread flags that are set when the ScreenRecorder
184 // be used on the network thread. 184 // stopped. They must 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_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/screen_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698