| Index: webrtc/video/overuse_frame_detector.h
|
| diff --git a/webrtc/video/overuse_frame_detector.h b/webrtc/video/overuse_frame_detector.h
|
| index 9fb489742c6d9f4fe6faaf27433a14f864d99c19..551e0e175dbffb0158bf424efb31b968aff024bd 100644
|
| --- a/webrtc/video/overuse_frame_detector.h
|
| +++ b/webrtc/video/overuse_frame_detector.h
|
| @@ -24,7 +24,6 @@
|
|
|
| namespace webrtc {
|
|
|
| -class Clock;
|
| class EncodedFrameObserver;
|
| class VideoFrame;
|
|
|
| @@ -65,8 +64,7 @@ class CpuOveruseMetricsObserver {
|
| // check for overuse.
|
| class OveruseFrameDetector {
|
| public:
|
| - OveruseFrameDetector(Clock* clock,
|
| - const CpuOveruseOptions& options,
|
| + OveruseFrameDetector(const CpuOveruseOptions& options,
|
| ScalingObserverInterface* overuse_observer,
|
| EncodedFrameObserver* encoder_timing_,
|
| CpuOveruseMetricsObserver* metrics_observer);
|
| @@ -80,10 +78,10 @@ class OveruseFrameDetector {
|
| void StopCheckForOveruse();
|
|
|
| // Called for each captured frame.
|
| - void FrameCaptured(const VideoFrame& frame, int64_t time_when_first_seen_ms);
|
| + void FrameCaptured(const VideoFrame& frame, int64_t time_when_first_seen_us);
|
|
|
| // Called for each sent frame.
|
| - void FrameSent(uint32_t timestamp, int64_t time_sent_in_ms);
|
| + void FrameSent(uint32_t timestamp, int64_t time_sent_in_us);
|
|
|
| protected:
|
| void CheckForOveruse(); // Protected for test purposes.
|
| @@ -92,15 +90,15 @@ class OveruseFrameDetector {
|
| class SendProcessingUsage;
|
| class CheckOveruseTask;
|
| struct FrameTiming {
|
| - FrameTiming(int64_t capture_ntp_ms, uint32_t timestamp, int64_t now)
|
| - : capture_ntp_ms(capture_ntp_ms),
|
| + FrameTiming(int64_t capture_time_us, uint32_t timestamp, int64_t now)
|
| + : capture_time_us(capture_time_us),
|
| timestamp(timestamp),
|
| - capture_ms(now),
|
| - last_send_ms(-1) {}
|
| - int64_t capture_ntp_ms;
|
| + capture_us(now),
|
| + last_send_us(-1) {}
|
| + int64_t capture_time_us;
|
| uint32_t timestamp;
|
| - int64_t capture_ms;
|
| - int64_t last_send_ms;
|
| + int64_t capture_us;
|
| + int64_t last_send_us;
|
| };
|
|
|
| void EncodedFrameTimeMeasured(int encode_duration_ms);
|
| @@ -125,12 +123,11 @@ class OveruseFrameDetector {
|
| // Stats metrics.
|
| CpuOveruseMetricsObserver* const metrics_observer_;
|
| rtc::Optional<CpuOveruseMetrics> metrics_ GUARDED_BY(task_checker_);
|
| - Clock* const clock_;
|
|
|
| int64_t num_process_times_ GUARDED_BY(task_checker_);
|
|
|
| - int64_t last_capture_time_ms_ GUARDED_BY(task_checker_);
|
| - int64_t last_processed_capture_time_ms_ GUARDED_BY(task_checker_);
|
| + int64_t last_capture_time_us_ GUARDED_BY(task_checker_);
|
| + int64_t last_processed_capture_time_us_ GUARDED_BY(task_checker_);
|
|
|
| // Number of pixels of last captured frame.
|
| int num_pixels_ GUARDED_BY(task_checker_);
|
|
|