This should allow standard stats users not to have to rely on the
obsolete "track" stats.
Bug: webrtc:14174
Change-Id: I24e5e1478ee47c73c12fcdecf7314f41fcc76bc7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266020
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37246}
This is a reland of commit 626f87d905
Original change's description:
> [Stats] Cleanup: Remove unimplemented metrics and obsolete TODOs.
>
> In preparation for the spec moving closer to PR, let's not have
> placeholder metrics not implemented.
>
> Bug: webrtc:14167
> Change-Id: If4688ef85b57f88154d490186b306b30414874e4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265383
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37205}
Bug: webrtc:14167
Change-Id: Ib12488fb8510fb3430e92bcd72d88c7879ecb0ab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265861
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37226}
This is a reland of commit 626f87d905
Original change's description:
> [Stats] Cleanup: Remove unimplemented metrics and obsolete TODOs.
>
> In preparation for the spec moving closer to PR, let's not have
> placeholder metrics not implemented.
>
> Bug: webrtc:14167
> Change-Id: If4688ef85b57f88154d490186b306b30414874e4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265383
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37205}
Bug: webrtc:14167
Change-Id: Ifdc37e7a48fea516c727c06d2f510780386cb204
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265805
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37215}
This reverts commit 626f87d905.
Reason for revert: Breaks one downstream project, will re-land after the dependency stops referencing an unimplemented RTT metric
Original change's description:
> [Stats] Cleanup: Remove unimplemented metrics and obsolete TODOs.
>
> In preparation for the spec moving closer to PR, let's not have
> placeholder metrics not implemented.
>
> Bug: webrtc:14167
> Change-Id: If4688ef85b57f88154d490186b306b30414874e4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265383
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37205}
Bug: webrtc:14167
Change-Id: I7e9ac60eb474b44fab678d4c08ddcae846ce456c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265800
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37206}
In preparation for the spec moving closer to PR, let's not have
placeholder metrics not implemented.
Bug: webrtc:14167
Change-Id: If4688ef85b57f88154d490186b306b30414874e4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265383
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37205}
This currently only exists as a goog legacy stat and has no spec
equivalent according to
https://docs.google.com/document/d/1z-D4SngG36WPiMuRvWeTMN7mWQXrf1XKZwVl3Nf1BIE/edit
Yet it is useful to debug issues sometimes. Exposing it as a
nonstandard stat will make it show up in chrome://webrtc-internals,
removing a need to switch to the legacy stats API there.
BUG=webrtc:14118
Change-Id: I506357ad54ff33df3ba46fb81558aa32187ac8e9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264420
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37055}
implements a total frame assembly time statistic that measures the
cumulative time between the arrival of the first packet of a frame
(the lowest reception time) and the time all packets of the frame have
been received (i.e. the highest reception time)
This is similar to totalProcessingDelay
https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-totalprocessingdelay
in particular with respect to only being incremented for frames that are being decoded but does not include the amount of time spent decoding the frame.
This statistic is useful for evaluating mechanisms like NACK and FEC
and gives some insight into the behavior of the pacer sending the
packets.
Note that for frames with just a single packet the assembly time will be zero. In order to calculate an average assembly time an additional frames_assembled_from_multiple_packets counter for frames with more than a single packet is added.
Currently this is a nonstandard stat so will only show up in webrtc-internals and not in getStats. Formally it can be defined as
totalAssemblyTime of type double
Only exists for video. The sum of the time, in seconds, each video frame takes from the time the first RTP packet is received (reception timestamp) and to the time the last RTP packet of a frame is received.
Given the complexities involved, the time of arrival or the reception timestamp is measured as close to the network layer as possible.
This metric is not incremented for frames that are not decoded, i.e., framesDropped, partialFramesLost or frames that fail decoding for other reasons (if any). Only incremented for frames consisting of more than one RTP packet. The average frame assembly time can be calculated by dividing the totalAssemblyTime with framesAssembledFromMultiplePacket.
framesAssembledFromMultiplePacket of type unsigned long
Only exists for video. It represents the total number of frames correctly decoded for this RTP stream that consist of more than one RTP packet.
For such frames the totalAssemblyTime is incremented.
BUG=webrtc:13986
Change-Id: Ie0ae431d72a57a0001c3240daba8eda35955f04e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260920
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36922}
media_kind is the old name (that is kept around since we can't deprecate)
BUG=None
Change-Id: I445441a54bb4ff408502d1aba6834cdac874324b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259766
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#36625}
This cl/ extends the RTCIceCandidateStats object with
network_adapter_type and vpn, so that it maps the underlying
WebRTC objects completly.
Bug: webrtc:13773
Change-Id: I5cf79972c60ca6bf2a127dc96fa90811263ba6fd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253241
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36110}
This reverts commit 2c41cbae37.
Reason for revert: The breaking test in Chromium has been temporarily disabled in https://chromium-review.googlesource.com/c/chromium/src/+/3139794/2.
Original change's description:
> Revert "Wire up non-sender RTT for audio, and implement related standardized stats."
>
> This reverts commit fb0dca6c05.
>
> Reason for revert: Speculative revert due to failing stats test in chromium. Possibly because the chromium test expected the metrics to not be supported, and now they are. Reverting just to unblock the webrtc roll into chromium.
>
> Original change's description:
> > Wire up non-sender RTT for audio, and implement related standardized stats.
> >
> > The implemented stats are:
> > - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptime
> > - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-totalroundtriptime
> > - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptimemeasurements
> >
> > Bug: webrtc:12951, webrtc:12714
> > Change-Id: Ia362d5c4b0456140e32da79d40edc06ab9ce2a2c
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226956
> > Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#34861}
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> TBR=hta,hbos,minyue
>
> Bug: webrtc:12951, webrtc:12714
> Change-Id: If07ad63286eea9cdde88271e61cc28f4b268b290
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231001
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Olga Sharonova <olka@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34897}
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:12951, webrtc:12714
Change-Id: I786b06933d85bdffc5e879bf52436bb3469b7f3a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231181
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34930}
This reverts commit fb0dca6c05.
Reason for revert: Speculative revert due to failing stats test in chromium. Possibly because the chromium test expected the metrics to not be supported, and now they are. Reverting just to unblock the webrtc roll into chromium.
Original change's description:
> Wire up non-sender RTT for audio, and implement related standardized stats.
>
> The implemented stats are:
> - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptime
> - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-totalroundtriptime
> - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptimemeasurements
>
> Bug: webrtc:12951, webrtc:12714
> Change-Id: Ia362d5c4b0456140e32da79d40edc06ab9ce2a2c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226956
> Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34861}
# Not skipping CQ checks because original CL landed > 1 day ago.
TBR=hta,hbos,minyue
Bug: webrtc:12951, webrtc:12714
Change-Id: If07ad63286eea9cdde88271e61cc28f4b268b290
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231001
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Olga Sharonova <olka@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34897}
Relanding after adding to chromium stats whitelist:
https://chromium-review.googlesource.com/c/chromium/src/+/2983329
This solves two problems:
* Echo return loss stats weren't being gathered in Chrome, because they
need to be taken from the audio processor attached to the track
rather than the audio send stream.
* The standardized location is in RTCAudioSourceStats, not
RTCMediaStreamTrackStats. For now, will populate the stats in both
locations.
Bug: webrtc:12770
Change-Id: I3633ee428d07b283b0cc503a84d8fa2e79415dfb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223761
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34367}
This reverts commit a27cfbffdf.
Reason for revert: WebRtcBrowserTest.RunsAudioVideoWebRTCCallInTwoTabsGetStatsPromise failing.
Original change's description:
> Fix echo return loss stats and add to RTCAudioSourceStats.
>
> This solves two problems:
> * Echo return loss stats weren't being gathered in Chrome, because they
> need to be taken from the audio processor attached to the track
> rather than the audio send stream.
> * The standardized location is in RTCAudioSourceStats, not
> RTCMediaStreamTrackStats. For now, will populate the stats in both
> locations.
>
> Bug: webrtc:12770
> Change-Id: I47eaf7f2b50b914a1be84156aa831e27497d07e3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223182
> Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34344}
TBR=deadbeef@webrtc.org,hbos@webrtc.org,hbos@chromium.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
Change-Id: I6b2587d762f005adef67c0d5121f1b58c3b76688
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:12770
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223068
Reviewed-by: Evan Shrubsole <eshr@google.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#34352}
This solves two problems:
* Echo return loss stats weren't being gathered in Chrome, because they
need to be taken from the audio processor attached to the track
rather than the audio send stream.
* The standardized location is in RTCAudioSourceStats, not
RTCMediaStreamTrackStats. For now, will populate the stats in both
locations.
Bug: webrtc:12770
Change-Id: I47eaf7f2b50b914a1be84156aa831e27497d07e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223182
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34344}
Deleting obsolete stats. Spec: https://www.w3.org/TR/webrtc-stats/
1. RTCInbound/OutboundRtpStats.isRemote: No longer useful with remote stream stats
2. RTCIceCandidateStats.deleted: This field was obsoleted because if the ICE candidate is deleted it no longer appears in getStats()
I also marked as many other obsoleted stats possible according to spec. I am not as confident to delete them but feel free to comment to let me know if anything is off / can be deleted.
Bug: webrtc:12583
Change-Id: I688d0076270f85caa86256349753e5f0e0a44931
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211781
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33549}
Changes:
- adding the `RTCRemoteOutboundRtpStreamStats` dictionary (see [1])
- collection of remote outbound stats (only for audio streams)
- adding `remote_id` to the inbound stats and set with the ID of the
corresponding remote outbound stats only if the latter are available
- unit tests
[1] https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats
Tested: verified from chrome://webrtc-internals during an appr.tc call
Bug: webrtc:12529
Change-Id: Ide91dc04a3c387ba439618a9c6b64a95994a1940
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211042
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33545}
Spec: https://www.w3.org/TR/webrtc-stats/#receivedrtpstats-dict*
According to the spec, |RTCReceivedRtpStreamStats| is the base class for |RTCInboundRtpStreamStats| and |RTCRemoteInboundRtpStreamStats|. This structure isn't visible in JavaScript but it's important to bring it up to spec for the C++ part. This CL adds the barebone |RTCReceivedRtpStreamStats| with a bunch of TODOs for later migrations.
This commit makes the minimum |RTCReceivedRtpStreamStats| and rebase |RTCInboundRtpStreamStats| and |RTCRemoteInboundRtpStreamStats| to use the new class as the parent class.
This commit also moves |jitter| and |packets_lost| to |RTCReceivedRtpStreamStats|, from |RTCInboundRtpStreamStats| and |RTCRemoteInboundRtpStreamStats|. Moving these two first because they are the two that exist in both subclasses for now.
Bug: webrtc:12532
Change-Id: I0ec74fd241f16c1e1a6498b6baa621ca0489f279
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/210340
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33435}
Spec: https://www.w3.org/TR/webrtc-stats/#dom-rtcvideosourcestats-frames
Wiring up the "frames" stats with the cumulative fps counter on the video source.
Tests:
./out/Default/peerconnection_unittests
./out/Default/video_engine_tests
Bug: webrtc:12499
Change-Id: I4103f56ed04cb464f5f7e70fbf2d77c25a867a68
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208782
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33404}
Tests:
./out/Default/peerconnection_unittests
Manually tested with Chromium to see the data populated
Spec: https://w3c.github.io/webrtc-stats/#remoteinboundrtpstats-dict*
Bug: webrtc:12506
Change-Id: I60ef8061fb31deab06ca5f115246ceb5a8cdc5ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208960
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33361}
Trying to take my first stab at contributing to WebRTC and I chose to populate jitter stats for video RTP streams. Please yell at me if this isn't something I'm not supposed to pick up. Appreciate a review, thanks!
Bug: webrtc:12487
Change-Id: Ifda985e9e20b1d87e4a7268f34ef2e45b1cbefa3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208360
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33325}
This is a reland of 94fe0d3de5 with a fix.
Original change's description:
> Complete migration from "track" to "inbound-rtp" stats
>
> Bug: webrtc:11683
> Change-Id: I4c4a4fa0a7d6a20976922aca41d57540aa27fd1d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178611
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Eldar Rello <elrello@microsoft.com>
> Cr-Commit-Position: refs/heads/master@{#31683}
Bug: webrtc:11683
Change-Id: I173b91625174051c02ff34127aaf6c086d3c5c66
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179060
Commit-Queue: Eldar Rello <elrello@microsoft.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31696}
This reverts commit 9a925c9ce3.
Reason for revert: The original CL is updated in PS #2 to
fix the googRtt issue which was that when the legacy sender
stats were put in "aggregated_senders" we forgot to update
rtt_ms the same way that we do it for "senders".
Original change's description:
> Revert "Improve outbound-rtp statistics for simulcast"
>
> This reverts commit da6cda839d.
>
> Reason for revert: Breaks googRtt in legacy getStats API
>
> Original change's description:
> > Improve outbound-rtp statistics for simulcast
> >
> > Bug: webrtc:9547
> > Change-Id: Iec4eb976aa11ee743805425bedb77dcea7c2c9be
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168120
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Eldar Rello <elrello@microsoft.com>
> > Cr-Commit-Position: refs/heads/master@{#31097}
>
> TBR=hbos@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,hta@webrtc.org,elrello@microsoft.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: webrtc:9547
> Change-Id: I06673328c2a5293a7eef03b3aaf2ded9d13df1b3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174443
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31165}
TBR=hbos@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,hta@webrtc.org,elrello@microsoft.com
# Not skipping CQ checks because this is a reland.
Bug: webrtc:9547
Change-Id: I723744c496c3c65f95ab6a8940862c8b9f544338
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174480
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31169}
Change RtpCodecCapability::parameters and RtpCodecParameters::parameters
to map from unordered_map to get welldefined FMTP lines.
Bug: webrtc:7061
Change-Id: Ie61f76bbab915d72369e36e3f40ea11838827940
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168190
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30512}
This TODO says this metric is only available for audio and should also
be implemented for video, but ever since M76 this has been implemented
for both audio and video (https://crbug.com/webrtc/10450).
TBR=guido@webrtc.org, hta@webrtc.org
NOTRY=True
Bug: webrtc:10450
Change-Id: Icf2b60fdacae606c66f9d03492f107df9e32ba33
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168343
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30485}
This CL also removes RTCRtpStreamStats::associateStatsId, which is the
legacy name for this stat, which was never implemented (existed in C++
but the member always had the value undefined and was thus never exposed
in JavaScript).
Bug: webrtc:11228
Change-Id: I28c332e4bdf2f55caaedf993482dca58b6b8b9a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/162800
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30171}
Bug: chromium:1018077
Change-Id: I585d4064f39e5f9d268b408ebf6ae13a056c778a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158403
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29628}
This patch adds accounting and reporting needed for
newly added RTCTransportStats.selectedCandidatePairChanges,
https://w3c.github.io/webrtc-stats/#dom-rtctransportstats-selectedcandidatepairchanges
a) P2PTransportChannel counts everytime selected_connection_
is modified and reports this counter in the GetStats()-call.
b) RTCStatsCollector puts the counter into the standardized
stats object.
Bug: webrtc:10900
Change-Id: Ibaeca18706b8edcbcb44b0c6f2754854bcb545ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149830
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28987}
This is a reland of 2b9fa09fa3.
It got reverted because I forgot to whitelist the new metrics in chromium,
which has now been done:
https://chromium-review.googlesource.com/c/chromium/src/+/1760209
Relanding requires no changes to the CL.
Original change's description:
> [GetStats] Expose video codec implementation in standardized metrics.
>
> Spec issue: https://github.com/w3c/webrtc-stats/issues/445
> Spec PR: https://github.com/w3c/webrtc-stats/pull/473
>
> Now that the spec's RTCCodecStats.implementation has moved to
> RTCOutboundRtpStreamStats.encoderImplementation and
> RTCInboundRtpStreamStats.decoderImplementation, this CL implements them
> using the same string that the legacy getStats() API used.
>
> Bug: webrtc:10890
> Change-Id: Ic43ce44735453626791959df3061ee253356015a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149168
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28877}
TBR=ilnik@webrtc.org
Bug: webrtc:10890
Change-Id: Ib874b608856c2795b1ca08f6af43c61dd859ea21
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149800
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28887}
This reverts commit 2b9fa09fa3.
Reason for revert: speculative revert since it seems to break Chrome FYI bots. See https://ci.chromium.org/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20Linux%20Tester/4206
Original change's description:
> [GetStats] Expose video codec implementation in standardized metrics.
>
> Spec issue: https://github.com/w3c/webrtc-stats/issues/445
> Spec PR: https://github.com/w3c/webrtc-stats/pull/473
>
> Now that the spec's RTCCodecStats.implementation has moved to
> RTCOutboundRtpStreamStats.encoderImplementation and
> RTCInboundRtpStreamStats.decoderImplementation, this CL implements them
> using the same string that the legacy getStats() API used.
>
> Bug: webrtc:10890
> Change-Id: Ic43ce44735453626791959df3061ee253356015a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149168
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28877}
TBR=ilnik@webrtc.org,hbos@webrtc.org
Change-Id: Ia0b7f9806564cf28881c50d6371b8141a22e3431
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10890
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149175
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28879}
Spec issue: https://github.com/w3c/webrtc-stats/issues/445
Spec PR: https://github.com/w3c/webrtc-stats/pull/473
Now that the spec's RTCCodecStats.implementation has moved to
RTCOutboundRtpStreamStats.encoderImplementation and
RTCInboundRtpStreamStats.decoderImplementation, this CL implements them
using the same string that the legacy getStats() API used.
Bug: webrtc:10890
Change-Id: Ic43ce44735453626791959df3061ee253356015a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149168
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28877}
Implements RTCAudioSourceStats members:
- audioLevel
- totalAudioEnergy
- totalSamplesDuration
In this CL description these are collectively referred to as the audio
levels.
The audio levels are removed from sending "track" stats (in Chrome,
these are now reported as undefined instead of 0).
Background:
For sending tracks, audio levels were always reported as 0 in Chrome
(https://crbug.com/736403), while audio levels were correctly reported
for receiving tracks. This problem affected the standard getStats() but
not the legacy getStats(), blocking some people from migrating. This
was likely not a problem in native third_party/webrtc code because the
delivery of audio frames from device to send-stream uses a different
code path outside of chromium.
A recent PR (https://github.com/w3c/webrtc-stats/pull/451) moved the
send-side audio levels to the RTCAudioSourceStats, while keeping the
receive-side audio levels on the "track" stats. This allows an
implementation to report the audio levels even if samples are not sent
onto the network (such as if an ICE connection has not been established
yet), reflecting some of the current implementation.
Changes:
1. Audio levels are added to RTCAudioSourceStats. Send-side audio
"track" stats are left undefined. Receive-side audio "track" stats
are not changed in this CL and continue to work.
2. Audio level computation is moved from the AudioState and
AudioTransportImpl to the AudioSendStream. This is because a) the
AudioTransportImpl::RecordedDataIsAvailable() code path is not
exercised in chromium, and b) audio levels should, per-spec, not be
calculated on a per-call basis, for which the AudioState is defined.
3. The audio level computation is now performed in
AudioSendStream::SendAudioData(), a code path used by both native
and chromium code.
4. Comments are added to document behavior of existing code, such as
AudioLevel and AudioSendStream::SendAudioData().
Note:
In this CL, just like before this CL, audio level is only calculated
after an AudioSendStream has been created. This means that before an
O/A negotiation, audio levels are unavailable.
According to spec, if we have an audio source, we should have audio
levels. An immediate solution to this would have been to calculate the
audio level at pc/rtp_sender.cc. The problem is that the
LocalAudioSinkAdapter::OnData() code path, while exercised in chromium,
is not exercised in native code. The issue of calculating audio levels
on a per-source bases rather than on a per-send stream basis is left to
https://crbug.com/webrtc/10771, an existing "media-source" bug.
This CL can be verified manually in Chrome at:
https://codepen.io/anon/pen/vqRGyq
Bug: chromium:736403, webrtc:10771
Change-Id: I8036cd9984f3b187c3177470a8c0d6670a201a5a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143789
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28480}
And delete corresponding plumbing via the internal stats attribute
MediaReceiverInfo::fraction_lost. The latter attribute is not deleted
yet, since downstream projects have to be updated first.
Bug: webrtc:10744
Change-Id: Id5401aeee7e5637a406ddf2fa33fbfe336abec9f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143178
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28385}
This implements the essentials of RTCRemoteInboundRtpStreamStats. This
includes:
- ssrc
- transportId
- codecId
- packetsLost
- jitter
- localId
- roundTripTime
https://w3c.github.io/webrtc-stats/#remoteinboundrtpstats-dict*
The following members are not implemented because they require more
work...
- From RTCReceivedRtpStreamStats: packetsReceived, packetsDiscarded,
packetsRepaired, burstPacketsLost, burstPacketsDiscarded,
burstLossCount, burstDiscardCount, burstLossRate, burstDiscardRate,
gapLossRate and gapDiscardRate.
- From RTCRemoteInboundRtpStreamStats: fractionLost.
Bug: webrtc:10455, webrtc:10456
Change-Id: If2ab0da7105d8c93bba58e14aa93bd22ffe57f1d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138067
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28073}
This implements RTCAudioSourceStats and RTCVideoSourceStats, both
inheriting from abstract dictionary RTCMediaSourceStats:
https://w3c.github.io/webrtc-stats/#dom-rtcmediasourcestats
All members are implemented except for the total "frames" counter:
- trackIdentifier
- kind
- width
- height
- framesPerSecond
This means to make googFrameWidthInput, googFrameHeightInput and
googFrameRateInput obsolete.
Implemented using the same code path as the goog stats, there are
some minor bugs that should be fixed in the future, but not this CL:
1. We create media-source objects on a per-track attachment basis.
If the same track is attached multiple times this results in
multiple media-source objects, but the spec says it should be on a
per-source basis.
2. framesPerSecond is only calculated after connecting (when we have a
sender with SSRC), but if collected on a per-source basis the source
should be able to tell us the FPS whether or not we are sending it.
Bug: webrtc:10453
Change-Id: I23705a79f15075dca2536275934af1904a7f0d39
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137804
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28028}
This is a standardized metric:
https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-totalencodedbytestarget
We estimate the target frame size in bytes from the current encoder
target bitrate and encoder framerate.
We would expect that the average bytes produced by the encoder would
over time match the average target, which is calculated by polling
getStats() twice and dividing the delta totalEncodedBytesTarget with
the delta framesEncoded. This is meant to make googTargetEncBitrate
obsolete.
Bug: webrtc:10446
Change-Id: Ib10ce236476a2f965582d5c536f419952926d4e6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137200
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28022}
This is a standardized metric. Spec:
https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-totalpacketsenddelay
It is meant to replace the legacy googBucketDelay. The average
packet delay over any interval can be calculated as the delta
totalPacketSendDelay divided by the delta packetsSent between two
calls to getStats().
Bug: webrtc:10506
Change-Id: I3d6c6d66e5a06937d0ea8d182a82cd255084ad19
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137044
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27979}
Several new audio stats were recently standardized and implemented in
WebRTC in https://webrtc-review.googlesource.com/c/src/+/133887. This CL
adds these to the GetStats API.
Bug: webrtc:10442, webrtc:10443, webrtc:10444
Change-Id: I0e898ac14777e82b1a9099b5e0a5584eb9cb5934
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134213
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27839}
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}
Spec: https://henbos.github.io/webrtc-provisional-stats/#dom-rtcinboundrtpstreamstats-contenttype
This already exists as a goog-stat. This CL only plumbs the value to the
new stats collector.
Note: There is currently no distinction between the extension being
missing and it being present but the value being "unspecified". Until
https://crbug.com/webrtc/10529 is fixed, this metric is only exposed if
SCREENSHARE was present.
Bug: webrtc:10452
Change-Id: Ic8723f4d0efb43ab72a560e954676facd3b90659
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131946
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27520}
This adds the following non-standardized metrics to video receiver
stats:
- freezeCount
- pauseCount
- totalFreezesDuration
- totalPausesDuration
- totalFramesDuration
- sumOfSquaredFrameDurations
For description of these metrics see
https://henbos.github.io/webrtc-provisional-stats/#RTCVideoReceiverStats-dict*
Bug: webrtc:10145
Change-Id: I4c76d5651102e73b1592ffed561e6224f2badeb6
Reviewed-on: https://webrtc-review.googlesource.com/c/114840
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26523}
NetEq currently only passes `jitterBufferDelay` to `getStats()`. We need its paired `jitterBufferEmittedCount` denominator stat for the calculations to be accurate.
Bug: webrtc:10192
Change-Id: I655aea629026ce9101409c2e0f18c2fa57a1c3ab
Reviewed-on: https://webrtc-review.googlesource.com/c/117320
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Chen Xing <chxg@google.com>
Cr-Commit-Position: refs/heads/master@{#26276}
This is a follow-up to
https://webrtc-review.googlesource.com/c/src/+/106280.
This time the whole code base is covered.
Some files may have not been fixed though, whenever the IWYU tool
was breaking the build.
Bug: webrtc:8311
Change-Id: I2c31f552a87e887d33931d46e87b6208b1e483ef
Reviewed-on: https://webrtc-review.googlesource.com/c/111965
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25830}
The stat will be exposed through origin trial described in:
https://docs.google.com/document/d/1stYIZhEmDZ7NJF9gjjsM66eLFJUdc-14a3QutrFbIwI
Change-Id: Ib191a11c6bd9e617abbe9dd82239b0c5b4e6b4e0
Bug: webrtc:10043
Reviewed-on: https://webrtc-review.googlesource.com/c/111922
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25802}
This CL uses RTC_EXPORT (defined in rtc_base/system/rtc_export.h)
to mark WebRTC symbols as visible from a shared library, this doesn't
mean these symbols are part of the public API (please continue to refer
to [1] for info about what is considered public WebRTC API).
Bug: webrtc:9419
Change-Id: I4d4e2ae52ee01de68147fd0f2cfe4c92d600ad94
Reviewed-on: https://webrtc-review.googlesource.com/c/106343
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25207}
Running clang-format with chromium's style guide.
The goal is n-fold:
* providing consistency and readability (that's what code guidelines are for)
* preventing noise with presubmit checks and git cl format
* building on the previous point: making it easier to automatically fix format issues
* you name it
Please consider using git-hyper-blame to ignore this commit.
Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
This exposes the stats selection algorithm[1] on the PeerConnection.
Per-spec, there are four flavors of getStats():
1. RTCPeerConnection.getStats().
2. RTCPeerConnection.getStats(MediaStreamTrack selector).
3. RTCRtpSender.getStats().
4. RTCRtpReceiver.getStats().
1) is the parameterless getStats() which is already shipped.
2) is the same as 3) and 4) except the track is used to look up the
corresponding sender/receiver to use as the selector.
3) and 4) perform stats collection with a filter, which is implemented
in RTCStatsCollector.GetStatsReport(selector).
For technical reasons, it is easier to place GetStats() on the
PeerConnection where the RTCStatsCollector lives than to place it on the
sender/receiver. Passing the selector as an argument or as a "this"
makes little difference other than style. Wiring Chrome up such that the
JavaScript APIs is like the spec is trivial after GetStats() is added to
PeerConnectionInterface.
This CL also adds comments documenting our intent to deprecate and
remove the legacy GetStats() APIs some time in the future.
[1] https://w3c.github.io/webrtc-pc/#dfn-stats-selection-algorithm
Bug: chromium:680172
Change-Id: I09316ba6f20b25d4f9c11785d0a1a1262d6062a1
Reviewed-on: https://webrtc-review.googlesource.com/62900
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22602}
STUN candidates use STUN binding requests to keep NAT bindings open.
Related stats including packet loss and RTT can be now collected via the
legacy GetStats in PeerConnection.
Bug: None
Change-Id: I7b0eee1ccb07eb670a32ee303c9590047b25f31c
Reviewed-on: https://webrtc-review.googlesource.com/54100
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22113}
Description of this stat can be found here:
https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-jitterbufferdelay
Bug: webrtc:8281
Change-Id: Ib2e8174f3449e68ad419ae2d58d5565fc9854023
Reviewed-on: https://webrtc-review.googlesource.com/3381
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20069}