Commit graph

10 commits

Author SHA1 Message Date
Jakob Ivarsson
1a5a81340d Rename discarded_primary_packets to packets_discarded.
This it what it is called in the spec:
https://w3c.github.io/webrtc-stats/#dom-rtcreceivedrtpstreamstats-packetsdiscarded

Also log the metric in neteq_rtpplay.

Bug: webrtc:8199
Change-Id: Ie0262d17b913eb6949daa703844d90327eee0aa4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263725
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37063}
2022-05-31 13:24:24 +00:00
Minyue Li
1039392209 Add a unittest to NetEq StatisticsCalculator for discarded packets counter.
Bug: webrtc:8199
Change-Id: I32127af1ae6692717f28dbf2d820cd67c0b6a66a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229300
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34808}
2021-08-19 17:17:37 +00:00
Niels Möller
6b4d962947 Fix standard GetStats to not modify NetEq state.
Add a get_and_clear_legacy_stats flag to AudioReceiveStream::GetStats,
to distinguish calls from standard GetStats and legacy GetStats.

Add const method NetEq::CurrentNetworkStatistics to get current
values of stateless NetEq stats. Standard GetStats will then call this
method instead of NetEq::NetworkStatistics.

Bug: webrtc:11622
Change-Id: I3833a246a9e39b18c99657a738da22c6e2bd5f5e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183600
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32092}
2020-09-14 09:51:21 +00:00
Henrik Lundin
44125faba5 Reland "Piping audio interruption metrics to API layer"
The metrics are now added as RTCNonStandardStatsMember objects in
RTCMediaStreamTrackStats. Unit tests are updated.

This is a reland of https://webrtc-review.googlesource.com/c/src/+/134303,
with fixes.

TBR=kwiberg@webrtc.org

Bug: webrtc:10549
Change-Id: I29dcc6fbfc69156715664e71acfa054c1b2d9038
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134500
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27806}
2019-04-29 15:39:50 +00:00
Henrik Andreassson
fc02a793c2 Revert "Piping audio interruption metrics to API layer"
This reverts commit 299c4e6846.

Reason for revert: https://ci.chromium.org/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20Win10%20Tester/2753

../../chrome/browser/media/webrtc/webrtc_browsertest_base.cc(539): error: Expected equality of these values:
  "ok-got-stats"
  ExecuteJavascript("verifyLegacyStatsGenerated()", tab)
    Which is: "Test failed: Error: \"googInterruptionCount\" is not a whitelisted stat. Exposing new metrics in the legacy getStats() API is not allowed. Please follow the standardization process: https://docs.google.com/document/d/1q1CJVUqJ6YW9NNRc0tENkLNny8AHrKZfqjy3SL89zjc/edit?usp=sharing\n    at failTest (http://127.0.0.1:50650/webrtc/test_functions.js:46:15)\n    at http://127.0.0.1:50650/webrtc/peerconnection.js:481:19"
With diff:
@@ -1,1 +1,3 @@
-ok-got-stats
+Test failed: Error: \"googInterruptionCount\" is not a whitelisted stat. Exposing new metrics in the legacy getStats() API is not allowed. Please follow the standardization process: https://docs.google.com/document/d/1q1CJVUqJ6YW9NNRc0tENkLNny8AHrKZfqjy3SL89zjc/edit?usp=sharing
+    at failTest (http://127.0.0.1:50650/webrtc/test_functions.js:46:15)
+    at http://127.0.0.1:50650/webrtc/peerconnection.js:481:19

Original change's description:
> Piping audio interruption metrics to API layer
>
> Bug: webrtc:10549
> Change-Id: Ie6abe5819c5b73dc5f5f89bdc375bad77f44ce97
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134303
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27788}

TBR=henrik.lundin@webrtc.org,kwiberg@webrtc.org,ivoc@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:10549
Change-Id: I345306ba9758c0a3b1597724fa860d3e3fdb8995
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134464
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27802}
2019-04-29 11:23:16 +00:00
Henrik Lundin
299c4e6846 Piping audio interruption metrics to API layer
Bug: webrtc:10549
Change-Id: Ie6abe5819c5b73dc5f5f89bdc375bad77f44ce97
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134303
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27788}
2019-04-26 13:32:34 +00:00
Henrik Lundin
2a8bd090a3 NetEq: Create an audio interruption metric
This CL adds a new metric to NetEq, which logs whenever a loss
concealment event has lasted longer than 150 ms (an "interruption").
The number of such events, as well as the sum length of them, is kept
in a SampleCounter, which can be queried at any time.

Any initial PLC at the beginning of a call, before the first packet is
decoded, is ignored.

Unit tests and piping to neteq_rtpplay are included.

Bug: webrtc:10549
Change-Id: I8a224a34254c47c74317617f420f6de997232d88
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132796
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27781}
2019-04-26 09:48:05 +00:00
Jakob Ivarsson
445070818c Add relative_packet_arrival_delay and jitter_buffer_packets_received statistics.
Bug: webrtc:10333
Change-Id: I415e2286b426cbca940fe3a187957531847272ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/124780
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26976}
2019-03-05 18:50:34 +00:00
Henrik Lundin
dccfc405a6 NetEq: Simplify the dependencies of GetNetworkStatistics
Adds a new method PopulateDelayManagerStats which takes care of the
fields that needed information from the DelayManager.

Also adds a new test for StatisticsCalculator made practically
feasible by the refactoring.

Bug: webrtc:7554
Change-Id: Iff5cb5e209c276bd2784f2ccf73be8f619b1d955
Reviewed-on: https://webrtc-review.googlesource.com/3181
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19957}
2017-09-25 20:32:12 +00:00
Henrik Lundin
ac0a503828 NetEq/Stats: Don't let concealed_samples decrease
When NetEq performs a merge operation, it will usually have to correct
the stats for number of concealment samples produced, sometimes with
decreasing it.

This does not make sense in the context of the stats spec, and
stats-consuming applications may not be prepared for it. With this
change, only positive corrections are allowed for the
concealed_samples value. This will sometimes lead to a small positive
bias, but it will be negligible over time.

Bug: webrtc:8253
Change-Id: Ie9de311ab16401f1a4b435f6269725901b8cf561
Reviewed-on: https://webrtc-review.googlesource.com/1583
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19941}
2017-09-25 10:53:50 +00:00