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:
parent
c259a3b0e9
commit
e4b5023f65
@ -60,7 +60,9 @@ FrameBuffer::FrameBuffer(Clock* clock,
|
|||||||
stopped_(false),
|
stopped_(false),
|
||||||
protection_mode_(kProtectionNack),
|
protection_mode_(kProtectionNack),
|
||||||
stats_callback_(stats_callback),
|
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() {}
|
FrameBuffer::~FrameBuffer() {}
|
||||||
|
|
||||||
@ -214,8 +216,7 @@ FrameBuffer::ReturnReason FrameBuffer::NextFrame(
|
|||||||
timing_->SetJitterDelay(jitter_estimator_->GetJitterEstimate(rtt_mult));
|
timing_->SetJitterDelay(jitter_estimator_->GetJitterEstimate(rtt_mult));
|
||||||
timing_->UpdateCurrentDelay(frame->RenderTime(), now_ms);
|
timing_->UpdateCurrentDelay(frame->RenderTime(), now_ms);
|
||||||
} else {
|
} else {
|
||||||
if (RttMultExperiment::RttMultEnabled() ||
|
if (RttMultExperiment::RttMultEnabled() || add_rtt_to_playout_delay_)
|
||||||
webrtc::field_trial::IsEnabled("WebRTC-AddRttToPlayoutDelay"))
|
|
||||||
jitter_estimator_->FrameNacked();
|
jitter_estimator_->FrameNacked();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -173,6 +173,8 @@ class FrameBuffer {
|
|||||||
VCMReceiveStatisticsCallback* const stats_callback_;
|
VCMReceiveStatisticsCallback* const stats_callback_;
|
||||||
int64_t last_log_non_decoded_ms_ RTC_GUARDED_BY(crit_);
|
int64_t last_log_non_decoded_ms_ RTC_GUARDED_BY(crit_);
|
||||||
|
|
||||||
|
const bool add_rtt_to_playout_delay_;
|
||||||
|
|
||||||
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FrameBuffer);
|
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FrameBuffer);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user