Index: webrtc/video/receive_statistics_proxy.cc |
diff --git a/webrtc/video/receive_statistics_proxy.cc b/webrtc/video/receive_statistics_proxy.cc |
index 61b2ad13987aae3afb41f7aed304480b07e9b81f..d58ca9092a62018fac1760a821db1dcf01ef1b63 100644 |
--- a/webrtc/video/receive_statistics_proxy.cc |
+++ b/webrtc/video/receive_statistics_proxy.cc |
@@ -80,7 +80,8 @@ ReceiveStatisticsProxy::ReceiveStatisticsProxy( |
freq_offset_counter_(clock, nullptr, kFreqOffsetProcessIntervalMs), |
first_report_block_time_ms_(-1), |
avg_rtt_ms_(0), |
- last_content_type_(VideoContentType::UNSPECIFIED) { |
+ last_content_type_(VideoContentType::UNSPECIFIED), |
+ timing_frame_info_() { |
stats_.ssrc = config_.rtp.remote_ssrc; |
// TODO(brandtr): Replace |rtx_stats_| with a single instance of |
// StreamDataCounters. |
@@ -371,6 +372,9 @@ VideoReceiveStream::Stats ReceiveStatisticsProxy::GetStats() const { |
stats_.decode_frame_rate = decode_fps_estimator_.Rate(now_ms).value_or(0); |
stats_.total_bitrate_bps = |
static_cast<int>(total_byte_tracker_.ComputeRate() * 8); |
+ stats_.timing_frame_info = timing_frame_info_; |
+ // Reset reported value to be overwritten by new values. |
Taylor Brandstetter
2017/06/25 20:48:04
nit: This comment says what the code does, but not
ilnik
2017/06/26 08:46:38
revised.
|
+ timing_frame_info_ = TimingFrameInfo(); |
return stats_; |
} |
@@ -432,6 +436,16 @@ void ReceiveStatisticsProxy::OnFrameBufferTimingsUpdated( |
"ssrc", stats_.ssrc); |
} |
+void ReceiveStatisticsProxy::OnTimingFrameInfoUpdated( |
+ const TimingFrameInfo& info) { |
+ rtc::CritScope lock(&crit_); |
+ // Only the frame which was processed the longest is reported since last |
Taylor Brandstetter
2017/06/25 20:48:03
nit: "since the last..."
ilnik
2017/06/26 08:46:38
Done.
|
+ // GetStats() call. Therefore, only it's stored here. |
Taylor Brandstetter
2017/06/25 20:48:04
I don't understand the "Therefore, only it's store
ilnik
2017/06/26 08:46:38
Revised.
|
+ if (info.IsLongerThan(timing_frame_info_)) { |
+ timing_frame_info_ = info; |
+ } |
+} |
+ |
void ReceiveStatisticsProxy::RtcpPacketTypesCounterUpdated( |
uint32_t ssrc, |
const RtcpPacketTypeCounter& packet_counter) { |