New const method StreamStatistician::GetStats

And a corresponding struct RtpReceiveStats. This is intended
to hold the information exposed via GetStats, which is quite
different from the stats reported to the peer via RTCP.

This is a preparation for moving ReceiveStatistics out of the
individual receive stream objects, and instead have a shared instance
owned by RtpStreamReceiverController or maybe Call.

Bug: webrtc:10679,chromium:677543
Change-Id: Ibb52ee769516ddc51da109b7f2319405693be5d5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148982
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28943}
This commit is contained in:
Niels Möller
2019-08-22 09:40:25 +02:00
committed by Commit Bot
parent 74154e65e8
commit d77cc24f67
12 changed files with 166 additions and 102 deletions

View File

@ -444,6 +444,20 @@ class StreamDataCountersCallback {
uint32_t ssrc) = 0;
};
// Information exposed through the GetStats api.
struct RtpReceiveStats {
// |packets_lost| and |jitter| are defined by RFC 3550, and exposed in the
// RTCReceivedRtpStreamStats dictionary, see
// https://w3c.github.io/webrtc-stats/#receivedrtpstats-dict*
int32_t packets_lost = 0;
uint32_t jitter = 0;
// Timestamp and counters exposed in RTCInboundRtpStreamStats, see
// https://w3c.github.io/webrtc-stats/#inboundrtpstats-dict*
absl::optional<int64_t> last_packet_received_timestamp_ms;
RtpPacketCounter packet_counter;
};
class RtcpAckObserver {
public:
// This method is called on received report blocks matching the sender ssrc.