[webrtc-stats] Clarify the lifetime of remote-* stats objects (#439)

henbos has just created a new issue for https://github.com/w3c/webrtc-stats:

== Clarify the lifetime of remote-* stats objects ==
I noticed this when implementing RTCRemoteInboundRtpStreamStats, but the same should apply for RTCRemoteOutboundRtpStreamStats.

The [spec says](https://w3c.github.io/webrtc-stats/#the-rtp-statistics-hierarchy):

> The lifetime of all RTP monitored objects starts when the RTP stream is first used: When the first RTP packet is sent or received on the SSRC it represents, or when the first RTCP packet is sent or received that refers to the SSRC of the RTP stream.
> 
> RTP monitored objects are not deleted.

With regards to remote-inbound-rtp: Report Blocks are sent on one SSRC but they contain information about an outbound-rtp that may be a different SSRC. I interpreted the spec to mean this:
```
remote-inbound-rtp
  ssrc = report block's ssrc
  localId = outbound-rtp which has its own ssrc
```

And that if the report block's SSRC changes then this results in a new remote-inbound-rtp object.

This means that if report blocks jump around on different streams, then we end up with multiple remote-inbound-rtp objects with the same localId, even though only the latest one has up-to-date information.

- Is this correct?
- Do we want to allow the ssrc for remote-* to change?
- Do we want to delete remote-* if a new remote-inbound-rtp object makes it obsolete?

Please view or discuss this issue at https://github.com/w3c/webrtc-stats/issues/439 using your GitHub account

Received on Monday, 27 May 2019 09:57:51 UTC