webrtc-stats icon indicating copy to clipboard operation
webrtc-stats copied to clipboard

Lifetime of "outbound-rtp"

Open henbos opened this issue 4 years ago • 6 comments

The type definition for "outbound-rtp" says:

Statistics for an outbound <a>RTP stream</a> that is currently sent with this
{{RTCPeerConnection}} object.

But The RTP statistics hierarchy says:

RTP monitored objects are not deleted.

The intent being not to delete "outbound-rtp" stats objects, the first paragraph should say "that is currently sent or has ever been sent by this RTCPeerConnection". This is a simple PR.

But note that the modern getStats() implementation in chromium does not implement this. And if it did...

  • How can you tell which RTP streams are active and which are old? Do we need a new stat?
  • What happens to trackId, senderId, mediaSourceId and transportId of an inactive rtp stream?

Alternatively, we could make the spec align with current implementations and say that they are deleted when the sender is reconfiured to send a different ssrc or if the sender stops sending.

henbos avatar Apr 21 '20 07:04 henbos

Have we discussed this before @alvestrand ?

henbos avatar Apr 21 '20 07:04 henbos

Add a clarification that they are not deleted but if not sending the timestamp is stale

henbos avatar May 06 '20 13:05 henbos

We should:

  1. Stop deleting stats
  2. lastPacketSentTimestamp tells you if the track is on or off
  3. we ought to have a boolean saying "BYE sent" (in which case sending more packets is illegal)

alvestrand avatar May 06 '20 13:05 alvestrand

Suggestion: boolean for RTCP_BYE?

henbos avatar May 06 '20 13:05 henbos

need a "received BYE" on inbound-rtp too.

alvestrand avatar May 06 '20 13:05 alvestrand

both at the sender and receiver. Sent bye vs received bye

vr000m avatar May 06 '20 13:05 vr000m

Resolved in #667 and #668

henbos avatar Oct 18 '22 13:10 henbos