New issue
Advanced search Search tips

Issue 801205 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 790007



Sign in to add a comment

getStats() in combination with RTP Media API should work as expected

Project Member Reported by hbos@chromium.org, Jan 11 2018

Issue description

getStats() should return "track" and "stream" stats after addTrack() has been called, whether or not setLocalDescription() has been called.
  Bug: These stats don't show up until SLD and we lack test coverage.

After an Offer/Answer cycle has occurred ("we're connected") we should also expect to see "inbound-rtp" and "outbound-rtp" stats.
  Bug: We lack test coverage (but it works).

Finally, getStats() should behave as expected after sender.replaceTrack():
- "track" stats for the previous attachment should continue to show up
  (Keeping old stats alive deserves a separate issue in and of itself but should have
  test coverage)
- "track" stats for the new attachment should show up
- The "outbound-rtp" stats should reference the current attachment's "track" stats.
  Bug: We don't support this properly and we lack test coverage.
 

Comment 1 by hbos@chromium.org, Jan 11 2018

Blocking: 790007

Comment 2 by hbos@chromium.org, Jan 11 2018

CL that addressed test coverage for "track" and "stream" stats:
https://chromium-review.googlesource.com/c/chromium/src/+/859157
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/89276c336d3e18c68453a5e562335d8804a2cbde

commit 89276c336d3e18c68453a5e562335d8804a2cbde
Author: Henrik Boström <hbos@chromium.org>
Date: Thu Jan 11 17:05:55 2018

getStats() WPT tests for inbound and outbound RTP stream stats.

Verifies stats are collected for the corresponding tracks.
Does not verify individual metrics.

Bug:  801205 
Change-Id: I3f0607582f7b05085863075663b4cb6031d4e2a7
Reviewed-on: https://chromium-review.googlesource.com/861466
Commit-Queue: Henrik Boström <hbos@chromium.org>
Reviewed-by: Harald Alvestrand <hta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528647}
[modify] https://crrev.com/89276c336d3e18c68453a5e562335d8804a2cbde/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-track-stats.https-expected.txt
[modify] https://crrev.com/89276c336d3e18c68453a5e562335d8804a2cbde/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-track-stats.https.html

Project Member

Comment 4 by bugdroid1@chromium.org, Jan 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/52f2cf90975c5650431c529eb44497fb7b804234

commit 52f2cf90975c5650431c529eb44497fb7b804234
Author: Henrik Boström <hbos@chromium.org>
Date: Fri Jan 12 12:25:44 2018

WPT tests added for getStats() in combination with replaceTrack().

Added tests making sure the expected stats are returned after
RTCRtpSender.replaceTrack() is called:
- Expecting outbound-rtp stats referencing track stats for the new
  track.
- Expecting track stats for the original attachment, but it should no
  longer be referenced by any outbound-rtp stats.

Bug:  801205 
Change-Id: Ic8d2c1d3fe2668ae14405c592bab823e019fccae
Reviewed-on: https://chromium-review.googlesource.com/860662
Reviewed-by: Harald Alvestrand <hta@chromium.org>
Commit-Queue: Henrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528929}
[modify] https://crrev.com/52f2cf90975c5650431c529eb44497fb7b804234/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-track-stats.https-expected.txt
[modify] https://crrev.com/52f2cf90975c5650431c529eb44497fb7b804234/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-track-stats.https.html

Comment 5 by hbos@chromium.org, Jan 17 2018

Status: Verified (was: Started)
With this CL https://chromium-review.googlesource.com/c/chromium/src/+/866490 addTrack/replaceTrack and getStats() play nicely.

There are still issues such as "objectDeleted = true" stats don't show up (previous attachments) and track stats don't show up before setLocalDescription(), but these are different bugs than the bug title refers to.

Closing this as fixed and verified (by -expected.txt file) for M65.

Comment 6 by hbos@chromium.org, Jan 17 2018

"track stats don't show up before setLocalDescription()" work is continued here:  https://crbug.com/webrtc/8673 

Sign in to add a comment