Avoid repeated semi-expensive field_trials read in frame_buffer2.cc
Bug: webrtc:10202 Change-Id: Ib8bfe7c1d62bc5091a8bfb2ce137ba749f9042e6 Reviewed-on: https://webrtc-review.googlesource.com/c/117361 Reviewed-by: Philip Eliasson <philipel@webrtc.org> Commit-Queue: Elad Alon <eladalon@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26261}
This commit is contained in:
@ -60,7 +60,9 @@ FrameBuffer::FrameBuffer(Clock* clock,
|
||||
stopped_(false),
|
||||
protection_mode_(kProtectionNack),
|
||||
stats_callback_(stats_callback),
|
||||
last_log_non_decoded_ms_(-kLogNonDecodedIntervalMs) {}
|
||||
last_log_non_decoded_ms_(-kLogNonDecodedIntervalMs),
|
||||
add_rtt_to_playout_delay_(
|
||||
webrtc::field_trial::IsEnabled("WebRTC-AddRttToPlayoutDelay")) {}
|
||||
|
||||
FrameBuffer::~FrameBuffer() {}
|
||||
|
||||
@ -214,8 +216,7 @@ FrameBuffer::ReturnReason FrameBuffer::NextFrame(
|
||||
timing_->SetJitterDelay(jitter_estimator_->GetJitterEstimate(rtt_mult));
|
||||
timing_->UpdateCurrentDelay(frame->RenderTime(), now_ms);
|
||||
} else {
|
||||
if (RttMultExperiment::RttMultEnabled() ||
|
||||
webrtc::field_trial::IsEnabled("WebRTC-AddRttToPlayoutDelay"))
|
||||
if (RttMultExperiment::RttMultEnabled() || add_rtt_to_playout_delay_)
|
||||
jitter_estimator_->FrameNacked();
|
||||
}
|
||||
|
||||
|
@ -173,6 +173,8 @@ class FrameBuffer {
|
||||
VCMReceiveStatisticsCallback* const stats_callback_;
|
||||
int64_t last_log_non_decoded_ms_ RTC_GUARDED_BY(crit_);
|
||||
|
||||
const bool add_rtt_to_playout_delay_;
|
||||
|
||||
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FrameBuffer);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user