Make RTCP report interval configurable

Bug: webrtc:8789
Change-Id: I79c9132123c946b030ed79c647b4329e81d6e6ae
Reviewed-on: https://webrtc-review.googlesource.com/43201
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21837}
This commit is contained in:
Jiawei Ou
2018-01-31 22:08:26 -08:00
committed by Commit Bot
parent addc380168
commit 3587b8302a
13 changed files with 160 additions and 33 deletions

View File

@ -52,6 +52,8 @@ using rtcp::ReportBlock;
// The number of RTCP time intervals needed to trigger a timeout.
const int kRrTimeoutIntervals = 3;
const int64_t kTmmbrTimeoutIntervalMs = 5 * 5000;
const int64_t kMaxWarningLogIntervalMs = 10000;
const int64_t kRtcpMinFrameLengthMs = 17;
@ -567,8 +569,7 @@ bool RTCPReceiver::UpdateTmmbrTimers() {
rtc::CritScope lock(&rtcp_receiver_lock_);
int64_t now_ms = clock_->TimeInMilliseconds();
// Use audio define since we don't know what interval the remote peer use.
int64_t timeout_ms = now_ms - 5 * RTCP_INTERVAL_AUDIO_MS;
int64_t timeout_ms = now_ms - kTmmbrTimeoutIntervalMs;
if (oldest_tmmbr_info_ms_ >= timeout_ms)
return false;
@ -1032,8 +1033,7 @@ std::vector<rtcp::TmmbItem> RTCPReceiver::TmmbrReceived() {
std::vector<rtcp::TmmbItem> candidates;
int64_t now_ms = clock_->TimeInMilliseconds();
// Use audio define since we don't know what interval the remote peer use.
int64_t timeout_ms = now_ms - 5 * RTCP_INTERVAL_AUDIO_MS;
int64_t timeout_ms = now_ms - kTmmbrTimeoutIntervalMs;
for (auto& kv : tmmbr_infos_) {
for (auto it = kv.second.tmmbr.begin(); it != kv.second.tmmbr.end();) {