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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 bool FrameTimeoutDetected(int64_t now) const EXCLUSIVE_LOCKS_REQUIRED(crit_); | 113 bool FrameTimeoutDetected(int64_t now) const EXCLUSIVE_LOCKS_REQUIRED(crit_); |
114 bool FrameSizeChanged(int num_pixels) const EXCLUSIVE_LOCKS_REQUIRED(crit_); | 114 bool FrameSizeChanged(int num_pixels) const EXCLUSIVE_LOCKS_REQUIRED(crit_); |
115 | 115 |
116 void ResetAll(int num_pixels) EXCLUSIVE_LOCKS_REQUIRED(crit_); | 116 void ResetAll(int num_pixels) EXCLUSIVE_LOCKS_REQUIRED(crit_); |
117 | 117 |
118 // Protecting all members except const and those that are only accessed on the | 118 // Protecting all members except const and those that are only accessed on the |
119 // processing thread. | 119 // processing thread. |
120 // TODO(asapersson): See if we can reduce locking. As is, video frame | 120 // TODO(asapersson): See if we can reduce locking. As is, video frame |
121 // processing contends with reading stats and the processing thread. | 121 // processing contends with reading stats and the processing thread. |
122 mutable rtc::CriticalSection crit_; | 122 rtc::CriticalSection crit_; |
123 | 123 |
124 const CpuOveruseOptions options_; | 124 const CpuOveruseOptions options_; |
125 | 125 |
126 // Observer getting overuse reports. | 126 // Observer getting overuse reports. |
127 CpuOveruseObserver* const observer_; | 127 CpuOveruseObserver* const observer_; |
128 | 128 |
129 // Stats metrics. | 129 // Stats metrics. |
130 CpuOveruseMetricsObserver* const metrics_observer_; | 130 CpuOveruseMetricsObserver* const metrics_observer_; |
131 CpuOveruseMetrics metrics_ GUARDED_BY(crit_); | 131 CpuOveruseMetrics metrics_ GUARDED_BY(crit_); |
132 | 132 |
(...skipping 22 matching lines...) Expand all Loading... |
155 const rtc::scoped_ptr<FrameQueue> frame_queue_ GUARDED_BY(crit_); | 155 const rtc::scoped_ptr<FrameQueue> frame_queue_ GUARDED_BY(crit_); |
156 | 156 |
157 rtc::ThreadChecker processing_thread_; | 157 rtc::ThreadChecker processing_thread_; |
158 | 158 |
159 RTC_DISALLOW_COPY_AND_ASSIGN(OveruseFrameDetector); | 159 RTC_DISALLOW_COPY_AND_ASSIGN(OveruseFrameDetector); |
160 }; | 160 }; |
161 | 161 |
162 } // namespace webrtc | 162 } // namespace webrtc |
163 | 163 |
164 #endif // WEBRTC_VIDEO_OVERUSE_FRAME_DETECTOR_H_ | 164 #endif // WEBRTC_VIDEO_OVERUSE_FRAME_DETECTOR_H_ |
OLD | NEW |