| Index: webrtc/video/receive_statistics_proxy.cc
|
| diff --git a/webrtc/video/receive_statistics_proxy.cc b/webrtc/video/receive_statistics_proxy.cc
|
| index 2af19125c24ea62e8a5e5df136d5943744b4fc07..62d0b1c29246f485369f2d9742a292937ef14674 100644
|
| --- a/webrtc/video/receive_statistics_proxy.cc
|
| +++ b/webrtc/video/receive_statistics_proxy.cc
|
| @@ -406,6 +406,17 @@ VideoReceiveStream::Stats ReceiveStatisticsProxy::GetStats() const {
|
| return stats_;
|
| }
|
|
|
| +rtc::Optional<TimingFrameInfo>
|
| +ReceiveStatisticsProxy::GetAndResetTimingFrameInfo() {
|
| + rtc::CritScope lock(&crit_);
|
| + rtc::Optional<TimingFrameInfo> info = timing_frame_info_;
|
| + // Reset reported value to empty, so it will be always
|
| + // overwritten in |OnTimingFrameInfoUpdated|, thus allowing to store new
|
| + // value instead of reported one.
|
| + timing_frame_info_.reset();
|
| + return info;
|
| +}
|
| +
|
| void ReceiveStatisticsProxy::OnIncomingPayloadType(int payload_type) {
|
| rtc::CritScope lock(&crit_);
|
| stats_.current_payload_type = payload_type;
|
| @@ -464,6 +475,17 @@ void ReceiveStatisticsProxy::OnFrameBufferTimingsUpdated(
|
| "ssrc", stats_.ssrc);
|
| }
|
|
|
| +void ReceiveStatisticsProxy::OnTimingFrameInfoUpdated(
|
| + const TimingFrameInfo& info) {
|
| + rtc::CritScope lock(&crit_);
|
| + // Only the frame which was processed the longest since the last
|
| + // GetStats() call is reported. Therefore, only single 'longest' frame is
|
| + // stored.
|
| + if (!timing_frame_info_ || info.IsLongerThan(*timing_frame_info_)) {
|
| + timing_frame_info_.emplace(info);
|
| + }
|
| +}
|
| +
|
| void ReceiveStatisticsProxy::RtcpPacketTypesCounterUpdated(
|
| uint32_t ssrc,
|
| const RtcpPacketTypeCounter& packet_counter) {
|
|
|