Update encoder settings periodically, not only on new bandwidth estimate
Also moved actual update call to encoder thread, and tweaked frame rate estimate to be less noisy. This is a re-upload of https://review.webrtc.org/47249004 BUG=chromium:476469 R=stefan@webrtc.org Review URL: https://codereview.webrtc.org/1180623005. Cr-Commit-Position: refs/heads/master@{#9417}
This commit is contained in:
@ -631,8 +631,9 @@ void MediaOptimization::ProcessIncomingFrameRate(int64_t now) {
|
||||
}
|
||||
}
|
||||
if (num > 1) {
|
||||
const int64_t diff = now - incoming_frame_times_[num - 1];
|
||||
incoming_frame_rate_ = 1.0;
|
||||
const int64_t diff =
|
||||
incoming_frame_times_[0] - incoming_frame_times_[num - 1];
|
||||
incoming_frame_rate_ = 0.0; // No frame rate estimate available.
|
||||
if (diff > 0) {
|
||||
incoming_frame_rate_ = nr_of_frames * 1000.0f / static_cast<float>(diff);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user