| Index: webrtc/modules/rtp_rtcp/source/receive_statistics_impl.cc
|
| diff --git a/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.cc b/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.cc
|
| index 6d64304149d662f746c78563e389a1e03deea921..ea2d152153c311fb3ac1e2a9e8d7679c8432cf4e 100644
|
| --- a/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.cc
|
| +++ b/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.cc
|
| @@ -13,10 +13,12 @@
|
| #include <math.h>
|
|
|
| #include <cstdlib>
|
| +#include <vector>
|
|
|
| #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h"
|
| #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h"
|
| #include "webrtc/modules/rtp_rtcp/source/time_util.h"
|
| +#include "webrtc/rtc_base/logging.h"
|
| #include "webrtc/system_wrappers/include/clock.h"
|
|
|
| namespace webrtc {
|
| @@ -492,6 +494,26 @@ void ReceiveStatisticsImpl::DataCountersUpdated(const StreamDataCounters& stats,
|
| }
|
| }
|
|
|
| +std::vector<rtcp::ReportBlock> ReceiveStatistics::GetActiveStatistics() {
|
| + std::vector<rtcp::ReportBlock> result;
|
| + for (auto& statistician : GetActiveStatisticians()) {
|
| + rtcp::ReportBlock block;
|
| + block.SetMediaSsrc(statistician.first);
|
| + RtcpStatistics stats;
|
| + if (!statistician.second->GetStatistics(&stats, true))
|
| + continue;
|
| + block.SetFractionLost(stats.fraction_lost);
|
| + if (!block.SetCumulativeLost(stats.cumulative_lost)) {
|
| + LOG(LS_WARNING) << "Cumulative lost is oversized.";
|
| + continue;
|
| + }
|
| + block.SetExtHighestSeqNum(stats.extended_max_sequence_number);
|
| + block.SetJitter(stats.jitter);
|
| + result.push_back(block);
|
| + }
|
| + return result;
|
| +}
|
| +
|
| void NullReceiveStatistics::IncomingPacket(const RTPHeader& rtp_header,
|
| size_t packet_length,
|
| bool retransmitted) {}
|
|
|