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

Side by Side Diff: trunk/src/remoting/host/capture_scheduler.cc

Issue 171963002: Revert 251937 "Increase framerate limit in remoting host to 30fps" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 10 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 | no next file » | 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 #include "remoting/host/capture_scheduler.h" 5 #include "remoting/host/capture_scheduler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/sys_info.h" 10 #include "base/sys_info.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 12
13 namespace { 13 namespace {
14 14
15 // Number of samples to average the most recent capture and encode time 15 // Number of samples to average the most recent capture and encode time
16 // over. 16 // over.
17 const int kStatisticsWindow = 3; 17 const int kStatisticsWindow = 3;
18 18
19 // The hard limit is 30fps or 33ms per recording cycle. 19 // The hard limit is 20fps or 50ms per recording cycle.
20 const int64 kMinimumRecordingDelay = 33; 20 const int64 kMinimumRecordingDelay = 50;
21 21
22 // Controls how much CPU time we can use for encode and capture. 22 // Controls how much CPU time we can use for encode and capture.
23 // Range of this value is between 0 to 1. 0 means using 0% of of all CPUs 23 // Range of this value is between 0 to 1. 0 means using 0% of of all CPUs
24 // available while 1 means using 100% of all CPUs available. 24 // available while 1 means using 100% of all CPUs available.
25 const double kRecordingCpuConsumption = 0.5; 25 const double kRecordingCpuConsumption = 0.5;
26 26
27 } // namespace 27 } // namespace
28 28
29 namespace remoting { 29 namespace remoting {
30 30
(...skipping 27 matching lines...) Expand all
58 58
59 void CaptureScheduler::RecordEncodeTime(base::TimeDelta encode_time) { 59 void CaptureScheduler::RecordEncodeTime(base::TimeDelta encode_time) {
60 encode_time_.Record(encode_time.InMilliseconds()); 60 encode_time_.Record(encode_time.InMilliseconds());
61 } 61 }
62 62
63 void CaptureScheduler::SetNumOfProcessorsForTest(int num_of_processors) { 63 void CaptureScheduler::SetNumOfProcessorsForTest(int num_of_processors) {
64 num_of_processors_ = num_of_processors; 64 num_of_processors_ = num_of_processors;
65 } 65 }
66 66
67 } // namespace remoting 67 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698