• Henrik Boström's avatar
    MediaStreamTrackMetrics simplified to observe tracks, not streams. · af5c23c7
    Henrik Boström authored
    Prior to this CL, MediaStreamTrackMetrics hooked up to streams, tracking
    not only all of the streams' tracks (CONNECTED/DISCONNECTED) but also
    any tracks that might be added or removed from the stream.
    
    This has not been necessary to do for a long time, since the RTP Media
    APIs are track-based, not stream-based, and the legacy
    addStream()-streams are shimmed on top of addTrack(). Adding a track to
    such a stream causes addTrack(), and there is no need for the
    MediaStreamTrackMetrics class to observe the streams.
    
    With this CL, MediaStreamTrackMetrics only care about tracks (direction,
    kind and id). This also covers the Unified Plan use case of tracks not
    necessarily belonging to any stream.
    
    There is room for improvements in this area, such as counting tracks
    added through replaceTrack(), but that should be handled separately.
    This CL removes the dependency on streams which unblocks
    RTCRtpTransceiver/Unified Plan work.
    
    Bug: 810708, 777617
    Change-Id: I347e729560717be83b7b1a3571f25a8497d65e46
    Reviewed-on: https://chromium-review.googlesource.com/1117691Reviewed-by: default avatarHarald Alvestrand <hta@chromium.org>
    Commit-Queue: Henrik Boström <hbos@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#572521}
    af5c23c7
rtc_peer_connection_handler.cc 88.3 KB