Separate last_stats_log_ms_ for send and receive stats.
Currently, send stats update `last_stats_log_ms_` causing receive stats to never be logged. This behavior was introduced in https://webrtc-review.googlesource.com/c/src/+/288750 Bug: b/270519075 Change-Id: Ie781082cfb212c1c903cbada5e393d2e7aa6150f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294743 Commit-Queue: Linus Nilsson <lnilsson@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39381}
This commit is contained in:
parent
b79b74e08b
commit
bea2278353
@ -682,7 +682,8 @@ WebRtcVideoChannel::WebRtcVideoChannel(
|
||||
decoder_factory_(decoder_factory),
|
||||
bitrate_allocator_factory_(bitrate_allocator_factory),
|
||||
default_send_options_(options),
|
||||
last_stats_log_ms_(-1),
|
||||
last_send_stats_log_ms_(-1),
|
||||
last_receive_stats_log_ms_(-1),
|
||||
discard_unknown_ssrc_packets_(
|
||||
IsEnabled(call_->trials(),
|
||||
"WebRTC-Video-DiscardPacketsWithUnknownSsrc")),
|
||||
@ -1645,9 +1646,9 @@ bool WebRtcVideoChannel::GetSendStats(VideoMediaSendInfo* info) {
|
||||
// Log stats periodically.
|
||||
bool log_stats = false;
|
||||
int64_t now_ms = rtc::TimeMillis();
|
||||
if (last_stats_log_ms_ == -1 ||
|
||||
now_ms - last_stats_log_ms_ > kStatsLogIntervalMs) {
|
||||
last_stats_log_ms_ = now_ms;
|
||||
if (last_send_stats_log_ms_ == -1 ||
|
||||
now_ms - last_send_stats_log_ms_ > kStatsLogIntervalMs) {
|
||||
last_send_stats_log_ms_ = now_ms;
|
||||
log_stats = true;
|
||||
}
|
||||
|
||||
@ -1683,9 +1684,9 @@ bool WebRtcVideoChannel::GetReceiveStats(VideoMediaReceiveInfo* info) {
|
||||
// Log stats periodically.
|
||||
bool log_stats = false;
|
||||
int64_t now_ms = rtc::TimeMillis();
|
||||
if (last_stats_log_ms_ == -1 ||
|
||||
now_ms - last_stats_log_ms_ > kStatsLogIntervalMs) {
|
||||
last_stats_log_ms_ = now_ms;
|
||||
if (last_receive_stats_log_ms_ == -1 ||
|
||||
now_ms - last_receive_stats_log_ms_ > kStatsLogIntervalMs) {
|
||||
last_receive_stats_log_ms_ = now_ms;
|
||||
log_stats = true;
|
||||
}
|
||||
|
||||
|
||||
@ -673,7 +673,8 @@ class WebRtcVideoChannel : public VideoMediaChannel,
|
||||
VideoSendParameters send_params_ RTC_GUARDED_BY(thread_checker_);
|
||||
VideoOptions default_send_options_ RTC_GUARDED_BY(thread_checker_);
|
||||
VideoRecvParameters recv_params_ RTC_GUARDED_BY(thread_checker_);
|
||||
int64_t last_stats_log_ms_ RTC_GUARDED_BY(thread_checker_);
|
||||
int64_t last_send_stats_log_ms_ RTC_GUARDED_BY(thread_checker_);
|
||||
int64_t last_receive_stats_log_ms_ RTC_GUARDED_BY(thread_checker_);
|
||||
const bool discard_unknown_ssrc_packets_ RTC_GUARDED_BY(thread_checker_);
|
||||
// This is a stream param that comes from the remote description, but wasn't
|
||||
// signaled with any a=ssrc lines. It holds information that was signaled
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user