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

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

Issue 2645343002: Don't update the jitter estimate with frames containing retransmitted packets. (Closed)
Patch Set: times_nacked() --> delayed_by_retransmission() Created 3 years, 11 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 | « no previous file | webrtc/modules/video_coding/frame_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/frame_buffer2.cc
diff --git a/webrtc/modules/video_coding/frame_buffer2.cc b/webrtc/modules/video_coding/frame_buffer2.cc
index 58c41bf1d087e50ecf36a9a3b819072f82ffa7c3..0831c0cd5fe920216c1bfb33771f2aa1d3d1fac0 100644
--- a/webrtc/modules/video_coding/frame_buffer2.cc
+++ b/webrtc/modules/video_coding/frame_buffer2.cc
@@ -118,18 +118,20 @@ FrameBuffer::ReturnReason FrameBuffer::NextFrame(
rtc::CritScope lock(&crit_);
if (next_frame_it != frames_.end()) {
std::unique_ptr<FrameObject> frame = std::move(next_frame_it->second.frame);
- int64_t received_time = frame->ReceivedTime();
- uint32_t timestamp = frame->timestamp;
- int64_t frame_delay;
- if (inter_frame_delay_.CalculateDelay(timestamp, &frame_delay,
- received_time)) {
- jitter_estimator_->UpdateEstimate(frame_delay, frame->size());
+ if (!frame->delayed_by_retransmission()) {
+ int64_t frame_delay;
+
+ if (inter_frame_delay_.CalculateDelay(frame->timestamp, &frame_delay,
+ frame->ReceivedTime())) {
+ jitter_estimator_->UpdateEstimate(frame_delay, frame->size());
+ }
+
+ float rtt_mult = protection_mode_ == kProtectionNackFEC ? 0.0 : 1.0;
+ timing_->SetJitterDelay(jitter_estimator_->GetJitterEstimate(rtt_mult));
+ timing_->UpdateCurrentDelay(frame->RenderTime(),
+ clock_->TimeInMilliseconds());
}
- float rtt_mult = protection_mode_ == kProtectionNackFEC ? 0.0 : 1.0;
- timing_->SetJitterDelay(jitter_estimator_->GetJitterEstimate(rtt_mult));
- timing_->UpdateCurrentDelay(frame->RenderTime(),
- clock_->TimeInMilliseconds());
UpdateJitterDelay();
« no previous file with comments | « no previous file | webrtc/modules/video_coding/frame_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698