-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make track.getFrameStats() work when cloning or disabling the track.
When cloning a track, the stats counters should have a baseline of zero. This is automatically true for `deliveredFrames` since frame delivery counters are handled by MediaStreamVideoTrack already. But this is not true of the video's source, since the same source can be shared by multiple tracks cloned at multiple times or having been enabled or disabled at different points in time. In order to make track counters work as expected, each track gets its own `baseline_discarded_frames_` and `baseline_dropped_frames_` counters. An alternative would be to move the frame counters to MediaStreamTrackImpl, but that would require wiring up the OnFrameDropped event further and I prefer to keep those counters on the source level in case we want to refactor the threading assumptions of OnFrameDropped (I would argue we do!). Bug: chromium:1472978 Change-Id: I941a31273e34f72e07300cb4504b9efb6c425a6d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4781127 Reviewed-by: Tony Herre <toprice@chromium.org> Reviewed-by: Harald Alvestrand <hta@chromium.org> Commit-Queue: Henrik Boström <hbos@chromium.org> Cr-Commit-Position: refs/heads/main@{#1184608}
- Loading branch information
Showing
4 changed files
with
216 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
...ts/external/wpt/mediacapture-extensions/MediaStreamTrack-getFrameStats.https-expected.txt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters