Set start time for encoded framerate tracker on first incoming frame (instead of

when first key frame is encoded) to avoid a too high initial estimate.

Bug: webrtc:8375
Change-Id: I404e394d8f2ac648170dd3828065435a4d2c6147
Reviewed-on: https://webrtc-review.googlesource.com/14061
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20370}
This commit is contained in:
Åsa Persson
2017-10-19 17:32:17 +02:00
committed by Commit Bot
parent 78609d5b6b
commit d29b54c93a

View File

@ -875,6 +875,11 @@ void SendStatisticsProxy::OnIncomingFrame(int width, int height) {
uma_container_->cpu_limited_frame_counter_.Add(
stats_.cpu_limited_resolution);
}
if (encoded_frame_rate_tracker_.TotalSampleCount() == 0) {
// Set start time now instead of when first key frame is encoded to avoid a
// too high initial estimate.
encoded_frame_rate_tracker_.AddSamples(0);
}
}
void SendStatisticsProxy::OnFrameDroppedBySource() {