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

Unified Diff: webrtc/video_engine/overuse_frame_detector.h

Issue 1278383002: Remove avg encode time from CpuOveruseMetric struct and use value from OnEncodedFrame instead. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/video_engine/overuse_frame_detector.h
diff --git a/webrtc/video_engine/overuse_frame_detector.h b/webrtc/video_engine/overuse_frame_detector.h
index 050b14fd003a669c4a05a5e6a8825fcae075af80..63281d23732fd11149b5ba317621346278b6f85c 100644
--- a/webrtc/video_engine/overuse_frame_detector.h
+++ b/webrtc/video_engine/overuse_frame_detector.h
@@ -67,11 +67,8 @@ struct CpuOveruseOptions {
};
struct CpuOveruseMetrics {
- CpuOveruseMetrics()
- : avg_encode_time_ms(-1),
- encode_usage_percent(-1) {}
+ CpuOveruseMetrics() : encode_usage_percent(-1) {}
- int avg_encode_time_ms; // Average encode time in ms.
int encode_usage_percent; // Average encode time divided by the average time
// difference between incoming captured frames.
};
@@ -111,7 +108,6 @@ class OveruseFrameDetector : public Module {
int32_t Process() override;
private:
- class EncodeTimeAvg;
class SendProcessingUsage;
class FrameQueue;
@@ -162,12 +158,10 @@ class OveruseFrameDetector : public Module {
bool in_quick_rampup_;
int current_rampup_delay_ms_;
- int64_t last_encode_sample_ms_; // Only accessed by one thread.
int64_t last_sample_time_ms_; // Only accessed by one thread.
// TODO(asapersson): Can these be regular members (avoid separate heap
// allocs)?
- const rtc::scoped_ptr<EncodeTimeAvg> encode_time_ GUARDED_BY(crit_);
const rtc::scoped_ptr<SendProcessingUsage> usage_ GUARDED_BY(crit_);
const rtc::scoped_ptr<FrameQueue> frame_queue_ GUARDED_BY(crit_);

Powered by Google App Engine
This is Rietveld 408576698