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

Unified Diff: webrtc/video/vie_encoder.h

Issue 2918143003: Set overuse detector max frame interval based on target frame rate. (Closed)
Patch Set: Handle degradation preference change Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/video/vie_encoder.h
diff --git a/webrtc/video/vie_encoder.h b/webrtc/video/vie_encoder.h
index f2d7cfdae2084609589bb26b196a273483a457e0..78ba4a186ef80854ea4fb76a30675bf5e769f3bc 100644
--- a/webrtc/video/vie_encoder.h
+++ b/webrtc/video/vie_encoder.h
@@ -129,6 +129,10 @@ class ViEEncoder : public rtc::VideoSinkInterface<VideoFrame>,
// These methods are protected for easier testing.
void AdaptUp(AdaptReason reason) override;
void AdaptDown(AdaptReason reason) override;
+ static CpuOveruseOptions GetCpuOveruseOptions(bool full_overuse_time);
+
+ void UpdateOveruseDetector(
+ std::unique_ptr<OveruseFrameDetector> overuse_detector);
private:
class ConfigureEncoderTask;
@@ -229,7 +233,8 @@ class ViEEncoder : public rtc::VideoSinkInterface<VideoFrame>,
const VideoCodecType codec_type_;
vcm::VideoSender video_sender_ ACCESS_ON(&encoder_queue_);
- OveruseFrameDetector overuse_detector_ ACCESS_ON(&encoder_queue_);
+ std::unique_ptr<OveruseFrameDetector> overuse_detector_
+ ACCESS_ON(&encoder_queue_);
std::unique_ptr<QualityScaler> quality_scaler_ ACCESS_ON(&encoder_queue_);
SendStatisticsProxy* const stats_proxy_;
@@ -243,6 +248,9 @@ class ViEEncoder : public rtc::VideoSinkInterface<VideoFrame>,
VideoEncoderConfig encoder_config_ ACCESS_ON(&encoder_queue_);
std::unique_ptr<VideoBitrateAllocator> rate_allocator_
ACCESS_ON(&encoder_queue_);
+ // The maximum frame rate of the current codec configuration, as determined
+ // at the last ReconfigureEncoder() call.
+ int max_framerate_ ACCESS_ON(&encoder_queue_);
kthelgason 2017/06/12 11:56:48 we already store the VideoEncoderConfig. Isn't thi
sprang_webrtc 2017/06/14 08:39:17 You'd think so, but it actually doesn't (explicitl
// Set when ConfigureEncoder has been called in order to lazy reconfigure the
// encoder on the next frame.

Powered by Google App Engine
This is Rietveld 408576698