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 #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.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 20fps or 50ms per recording cycle. | 19 // The hard limit is 20fps or 50ms per recording cycle. |
20 const int64 kMinimumRecordingDelay = 50; | 20 const int64 kMinimumRecordingDelay = 50; |
21 | 21 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |