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

Side by Side Diff: webrtc/video/overuse_frame_detector.h

Issue 2652893015: Rename adaptation api methods, extended vie_encoder unit test. (Closed)
Patch Set: Rebase, again Created 3 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
« no previous file with comments | « webrtc/test/frame_generator.cc ('k') | webrtc/video/overuse_frame_detector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 }; 58 };
59 59
60 // Use to detect system overuse based on the send-side processing time of 60 // Use to detect system overuse based on the send-side processing time of
61 // incoming frames. All methods must be called on a single task queue but it can 61 // incoming frames. All methods must be called on a single task queue but it can
62 // be created and destroyed on an arbitrary thread. 62 // be created and destroyed on an arbitrary thread.
63 // OveruseFrameDetector::StartCheckForOveruse must be called to periodically 63 // OveruseFrameDetector::StartCheckForOveruse must be called to periodically
64 // check for overuse. 64 // check for overuse.
65 class OveruseFrameDetector { 65 class OveruseFrameDetector {
66 public: 66 public:
67 OveruseFrameDetector(const CpuOveruseOptions& options, 67 OveruseFrameDetector(const CpuOveruseOptions& options,
68 ScalingObserverInterface* overuse_observer, 68 AdaptationObserverInterface* overuse_observer,
69 EncodedFrameObserver* encoder_timing_, 69 EncodedFrameObserver* encoder_timing_,
70 CpuOveruseMetricsObserver* metrics_observer); 70 CpuOveruseMetricsObserver* metrics_observer);
71 ~OveruseFrameDetector(); 71 ~OveruseFrameDetector();
72 72
73 // Start to periodically check for overuse. 73 // Start to periodically check for overuse.
74 void StartCheckForOveruse(); 74 void StartCheckForOveruse();
75 75
76 // StopCheckForOveruse must be called before destruction if 76 // StopCheckForOveruse must be called before destruction if
77 // StartCheckForOveruse has been called. 77 // StartCheckForOveruse has been called.
78 void StopCheckForOveruse(); 78 void StopCheckForOveruse();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 void ResetAll(int num_pixels); 111 void ResetAll(int num_pixels);
112 112
113 rtc::SequencedTaskChecker task_checker_; 113 rtc::SequencedTaskChecker task_checker_;
114 // Owned by the task queue from where StartCheckForOveruse is called. 114 // Owned by the task queue from where StartCheckForOveruse is called.
115 CheckOveruseTask* check_overuse_task_; 115 CheckOveruseTask* check_overuse_task_;
116 116
117 const CpuOveruseOptions options_; 117 const CpuOveruseOptions options_;
118 118
119 // Observer getting overuse reports. 119 // Observer getting overuse reports.
120 ScalingObserverInterface* const observer_; 120 AdaptationObserverInterface* const observer_;
121 EncodedFrameObserver* const encoder_timing_; 121 EncodedFrameObserver* const encoder_timing_;
122 122
123 // Stats metrics. 123 // Stats metrics.
124 CpuOveruseMetricsObserver* const metrics_observer_; 124 CpuOveruseMetricsObserver* const metrics_observer_;
125 rtc::Optional<CpuOveruseMetrics> metrics_ GUARDED_BY(task_checker_); 125 rtc::Optional<CpuOveruseMetrics> metrics_ GUARDED_BY(task_checker_);
126 126
127 int64_t num_process_times_ GUARDED_BY(task_checker_); 127 int64_t num_process_times_ GUARDED_BY(task_checker_);
128 128
129 int64_t last_capture_time_us_ GUARDED_BY(task_checker_); 129 int64_t last_capture_time_us_ GUARDED_BY(task_checker_);
130 int64_t last_processed_capture_time_us_ GUARDED_BY(task_checker_); 130 int64_t last_processed_capture_time_us_ GUARDED_BY(task_checker_);
(...skipping 11 matching lines...) Expand all
142 // allocs)? 142 // allocs)?
143 const std::unique_ptr<SendProcessingUsage> usage_ GUARDED_BY(task_checker_); 143 const std::unique_ptr<SendProcessingUsage> usage_ GUARDED_BY(task_checker_);
144 std::list<FrameTiming> frame_timing_ GUARDED_BY(task_checker_); 144 std::list<FrameTiming> frame_timing_ GUARDED_BY(task_checker_);
145 145
146 RTC_DISALLOW_COPY_AND_ASSIGN(OveruseFrameDetector); 146 RTC_DISALLOW_COPY_AND_ASSIGN(OveruseFrameDetector);
147 }; 147 };
148 148
149 } // namespace webrtc 149 } // namespace webrtc
150 150
151 #endif // WEBRTC_VIDEO_OVERUSE_FRAME_DETECTOR_H_ 151 #endif // WEBRTC_VIDEO_OVERUSE_FRAME_DETECTOR_H_
OLDNEW
« no previous file with comments | « webrtc/test/frame_generator.cc ('k') | webrtc/video/overuse_frame_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698