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

Unified Diff: webrtc/modules/video_coding/media_optimization.cc

Issue 2883963002: Periodically update codec bit/frame rate settings. (Closed)
Patch Set: Dumb typo 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
« no previous file with comments | « webrtc/media/engine/simulcast.cc ('k') | webrtc/modules/video_coding/video_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/media_optimization.cc
diff --git a/webrtc/modules/video_coding/media_optimization.cc b/webrtc/modules/video_coding/media_optimization.cc
index ccd23f6ae4729214639e45ed786979f36caf5455..f0cbd62c9bf669d35578ea5f5f44284f5ffb8bc8 100644
--- a/webrtc/modules/video_coding/media_optimization.cc
+++ b/webrtc/modules/video_coding/media_optimization.cc
@@ -118,7 +118,13 @@ uint32_t MediaOptimization::SetTargetRates(uint32_t target_bitrate) {
// Update encoding rates following protection settings.
float target_video_bitrate_kbps =
static_cast<float>(video_target_bitrate_) / 1000.0f;
- frame_dropper_->SetRates(target_video_bitrate_kbps, incoming_frame_rate_);
+ float framerate = incoming_frame_rate_;
+ if (framerate == 0.0) {
+ // No framerate estimate available, use configured max framerate instead.
+ framerate = user_frame_rate_;
+ }
+
+ frame_dropper_->SetRates(target_video_bitrate_kbps, framerate);
return video_target_bitrate_;
}
« no previous file with comments | « webrtc/media/engine/simulcast.cc ('k') | webrtc/modules/video_coding/video_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698