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

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

Issue 8342040: Gather history of capture and encode time determine next recoring delay (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: tested and removed testing code 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 // This class is used to throttle the recoring rate of ScreenRecorder.
Wez 2011/10/20 00:52:15 typo: "recoring"
Alpha Left Google 2011/10/20 14:18:20 Done.
6 // In general this class gathers history of time spent on encoding and
Wez 2011/10/20 00:52:15 nit: "In general"?
Alpha Left Google 2011/10/20 14:18:20 Done.
7 // capturing to determine the delay for next recoding cycle.
8 // The specific algorithm is based on system configuration and/or system
Wez 2011/10/20 00:52:15 nit: That's not true, though, is it? The algorith
Alpha Left Google 2011/10/20 14:18:20 Done.
9 // load. For example a more capable computer will be able to run with
10 // a shorter recording cycle and vice versa.
11
12 #include "base/time.h"
13 #include "remoting/base/running_average.h"
14
15 namespace remoting {
16
17 class RecordingRateRegulator {
Sergey Ulanov 2011/10/20 00:17:00 maybe call it controller instead of regulator. I t
Wez 2011/10/20 00:52:15 Please rename this CaptureScheduler, FrameSchedule
Alpha Left Google 2011/10/20 14:18:20 Done.
18 public:
19 RecordingRateRegulator();
20 ~RecordingRateRegulator();
21
22 // Determine the time delay to start next recording cycle.
23 base::TimeDelta NextRecordingDelay();
Wez 2011/10/20 00:52:15 What is the start time for this "delay"?
Alpha Left Google 2011/10/20 14:18:20 Done.
24
25 // Recording time spend on capturing and encoding.
26 void RecordCaptureTime(int64 ms);
Sergey Ulanov 2011/10/20 00:17:00 Use TimeDelta here and in the next method.
Alpha Left Google 2011/10/20 14:18:20 Done.
27 void RecordEncodeTime(int64 ms);
28
29 private:
30 int num_of_processors_;
31 RunningAverage capture_time_;
32 RunningAverage encode_time_;
33
34 DISALLOW_COPY_AND_ASSIGN(RecordingRateRegulator);
35 };
36
37 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/host/recording_rate_regulator.cc » ('j') | remoting/host/recording_rate_regulator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698