Add RTT to playout delay behind WebRTC-AddRttToPlayoutDelay field trial.
Bug: webrtc:8010
Change-Id: I78d2b5053521186b9bcc27eba264325b6f934a78
Reviewed-on: https://webrtc-review.googlesource.com/4666
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20079}
diff --git a/modules/video_coding/frame_buffer2.cc b/modules/video_coding/frame_buffer2.cc
index b4bb002..e289a03 100644
--- a/modules/video_coding/frame_buffer2.cc
+++ b/modules/video_coding/frame_buffer2.cc
@@ -21,6 +21,7 @@
#include "rtc_base/logging.h"
#include "rtc_base/trace_event.h"
#include "system_wrappers/include/clock.h"
+#include "system_wrappers/include/field_trial.h"
#include "system_wrappers/include/metrics.h"
namespace webrtc {
@@ -148,7 +149,8 @@
timing_->SetJitterDelay(jitter_estimator_->GetJitterEstimate(rtt_mult));
timing_->UpdateCurrentDelay(frame->RenderTime(), now_ms);
} else {
- jitter_estimator_->FrameNacked();
+ if (webrtc::field_trial::IsEnabled("WebRTC-AddRttToPlayoutDelay"))
+ jitter_estimator_->FrameNacked();
}
// Gracefully handle bad RTP timestamps and render time issues.