Add stats totalSamplesReceived and concealedSamples
Adds two new stats to RTCMediaStreamTrackStats:
* totalSamplesReceived is the total number of samples received on
the audio channel and includes real and synthetic samples.
* concealedSamples is the total number of synthetic samples
received on the audio channel used to conceal packet loss.
Bug: webrtc:8076
Change-Id: I36e9828525ec341490cf3310a972b56a8b443667
Reviewed-on: https://chromium-review.googlesource.com/615902
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19506}
This commit is contained in:
@ -58,6 +58,18 @@ struct NetEqNetworkStatistics {
|
||||
int max_waiting_time_ms;
|
||||
};
|
||||
|
||||
// NetEq statistics that persist over the lifetime of the class.
|
||||
// These metrics are never reset.
|
||||
struct NetEqLifetimeStatistics {
|
||||
// Total number of audio samples received, including synthesized samples.
|
||||
// https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-totalsamplesreceived
|
||||
uint64_t total_samples_received = 0;
|
||||
// Total number of inbound audio samples that are based on synthesized data to
|
||||
// conceal packet loss.
|
||||
// https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-concealedsamples
|
||||
uint64_t concealed_samples = 0;
|
||||
};
|
||||
|
||||
enum NetEqPlayoutMode {
|
||||
kPlayoutOn,
|
||||
kPlayoutOff,
|
||||
@ -220,6 +232,10 @@ class NetEq {
|
||||
// after the call.
|
||||
virtual int NetworkStatistics(NetEqNetworkStatistics* stats) = 0;
|
||||
|
||||
// Returns a copy of this class's lifetime statistics. These statistics are
|
||||
// never reset.
|
||||
virtual NetEqLifetimeStatistics GetLifetimeStatistics() const = 0;
|
||||
|
||||
// Writes the current RTCP statistics to |stats|. The statistics are reset
|
||||
// and a new report period is started with the call.
|
||||
virtual void GetRtcpStatistics(RtcpStatistics* stats) = 0;
|
||||
|
||||
Reference in New Issue
Block a user