OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
43 high_encode_usage_threshold_percent(85), | 43 high_encode_usage_threshold_percent(85), |
44 enable_extended_processing_usage(true), | 44 enable_extended_processing_usage(true), |
45 frame_timeout_interval_ms(1500), | 45 frame_timeout_interval_ms(1500), |
46 min_frame_samples(120), | 46 min_frame_samples(120), |
47 min_process_count(3), | 47 min_process_count(3), |
48 high_threshold_consecutive_count(2) {} | 48 high_threshold_consecutive_count(2) {} |
49 | 49 |
50 // Method based on encode time of frames. | 50 // Method based on encode time of frames. |
51 bool enable_encode_usage_method; | 51 bool enable_encode_usage_method; |
52 int low_encode_usage_threshold_percent; // Threshold for triggering underuse. | 52 int low_encode_usage_threshold_percent; // Threshold for triggering underuse. |
53 int high_encode_usage_threshold_percent; // Threshold for triggering overuse. | 53 int high_encode_usage_threshold_percent; // Threshold for triggering overuse. |
pbos
2015/11/26 13:51:58
run git cl format (that'll align //s)
kjellander_webrtc
2015/11/26 14:04:45
No it didn't do anything to my CL, I guess it's be
| |
54 bool enable_extended_processing_usage; // Include a larger time span (in | 54 bool enable_extended_processing_usage; // Include a larger time span (in |
55 // addition to encode time) for | 55 // addition to encode time) for |
56 // measuring the processing time of a | 56 // measuring the processing time of a |
57 // frame. | 57 // frame. |
58 // General settings. | 58 // General settings. |
59 int frame_timeout_interval_ms; // The maximum allowed interval between two | 59 int frame_timeout_interval_ms; // The maximum allowed interval between two |
60 // frames before resetting estimations. | 60 // frames before resetting estimations. |
61 int min_frame_samples; // The minimum number of frames required. | 61 int min_frame_samples; // The minimum number of frames required. |
62 int min_process_count; // The number of initial process times required before | 62 int min_process_count; // The number of initial process times required before |
63 // triggering an overuse/underuse. | 63 // triggering an overuse/underuse. |
64 int high_threshold_consecutive_count; // The number of consecutive checks | 64 int high_threshold_consecutive_count; // The number of consecutive checks |
65 // above the high threshold before | 65 // above the high threshold before |
66 // triggering an overuse. | 66 // triggering an overuse. |
67 }; | 67 }; |
68 | 68 |
69 struct CpuOveruseMetrics { | 69 struct CpuOveruseMetrics { |
70 CpuOveruseMetrics() | 70 CpuOveruseMetrics() |
71 : avg_encode_time_ms(-1), | 71 : avg_encode_time_ms(-1), |
72 encode_usage_percent(-1) {} | 72 encode_usage_percent(-1) {} |
73 | 73 |
74 int avg_encode_time_ms; // The average encode time in ms. | 74 int avg_encode_time_ms; // Average encode time in ms. |
75 int encode_usage_percent; // The average encode time divided by the average | 75 int encode_usage_percent; // Average encode time divided by the average time |
76 // time difference between incoming captured frames. | 76 // difference between incoming captured frames. |
77 }; | 77 }; |
78 | 78 |
79 class CpuOveruseMetricsObserver { | 79 class CpuOveruseMetricsObserver { |
80 public: | 80 public: |
81 virtual ~CpuOveruseMetricsObserver() {} | 81 virtual ~CpuOveruseMetricsObserver() {} |
82 virtual void CpuOveruseMetricsUpdated(const CpuOveruseMetrics& metrics) = 0; | 82 virtual void CpuOveruseMetricsUpdated(const CpuOveruseMetrics& metrics) = 0; |
83 }; | 83 }; |
84 | 84 |
85 | 85 |
86 // Use to detect system overuse based on the send-side processing time of | 86 // Use to detect system overuse based on the send-side processing time of |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
172 const rtc::scoped_ptr<FrameQueue> frame_queue_ GUARDED_BY(crit_); | 172 const rtc::scoped_ptr<FrameQueue> frame_queue_ GUARDED_BY(crit_); |
173 | 173 |
174 rtc::ThreadChecker processing_thread_; | 174 rtc::ThreadChecker processing_thread_; |
175 | 175 |
176 RTC_DISALLOW_COPY_AND_ASSIGN(OveruseFrameDetector); | 176 RTC_DISALLOW_COPY_AND_ASSIGN(OveruseFrameDetector); |
177 }; | 177 }; |
178 | 178 |
179 } // namespace webrtc | 179 } // namespace webrtc |
180 | 180 |
181 #endif // WEBRTC_VIDEO_ENGINE_OVERUSE_FRAME_DETECTOR_H_ | 181 #endif // WEBRTC_VIDEO_ENGINE_OVERUSE_FRAME_DETECTOR_H_ |
OLD | NEW |