Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTCRemoteInboundRtpStreamStats - plus alignment with outbound #32657

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

hamishwillee
Copy link
Collaborator

This adds docs for RTCRemoteInboundRtpStreamStats , a stats object/dictionary you can get by iterating a RTCStatsReport.

It is not very exciting. Largely following the same patterns as the other docs.

This shares some common properties with RTCRemoteOutoundRtpStreamStats. There have been some changes to align those.

This is part of the ongoing work to finished RTC stats, which was started in #27028

@github-actions github-actions bot added Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed labels Mar 12, 2024
Copy link
Contributor

github-actions bot commented Mar 12, 2024

Preview URLs (25 pages)
Flaws (30)

Note! 1 document with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats
Title: RTCRemoteInboundRtpStreamStats
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters

URL: /en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/type
Title: RTCRemoteInboundRtpStreamStats: type property
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters

URL: /en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/roundTripTime
Title: RTCRemoteInboundRtpStreamStats: roundTripTime property
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters

URL: /en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/jitter
Title: RTCRemoteInboundRtpStreamStats: jitter property
Flaw count: 2

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters
    • /en-US/docs/Web/API/RTCInboundRtpStreamStats/jitter does not exist

URL: /en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/fractionLost
Title: RTCRemoteInboundRtpStreamStats: fractionLost property
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters

URL: /en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/totalRoundTripTime
Title: RTCRemoteInboundRtpStreamStats: totalRoundTripTime property
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters

URL: /en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/ssrc
Title: RTCRemoteInboundRtpStreamStats: ssrc property
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters

URL: /en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/timestamp
Title: RTCRemoteInboundRtpStreamStats: timestamp property
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters

URL: /en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/roundTripTimeMeasurements
Title: RTCRemoteInboundRtpStreamStats: roundTripTimeMeasurements property
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters

URL: /en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/localId
Title: RTCRemoteInboundRtpStreamStats: localId property
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters

URL: /en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/id
Title: RTCRemoteInboundRtpStreamStats: id property
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters

URL: /en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/packetsLost
Title: RTCRemoteInboundRtpStreamStats: packetsLost property
Flaw count: 2

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters
    • /en-US/docs/Web/API/RTCInboundRtpStreamStats/packetsLost does not exist

URL: /en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/kind
Title: RTCRemoteInboundRtpStreamStats: kind property
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters

URL: /en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/codecId
Title: RTCRemoteInboundRtpStreamStats: codecId property
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters

URL: /en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/packetsReceived
Title: RTCRemoteInboundRtpStreamStats: packetsReceived property
Flaw count: 2

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters
    • /en-US/docs/Web/API/RTCInboundRtpStreamStats/packetsReceived does not exist

URL: /en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/transportId
Title: RTCRemoteInboundRtpStreamStats: transportId property
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters

URL: /en-US/docs/Web/API/RTCRemoteOutboundRtpStreamStats
Title: RTCRemoteOutboundRtpStreamStats
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters

URL: /en-US/docs/Web/API/RTCRemoteOutboundRtpStreamStats/totalRoundTripTime
Title: RTCRemoteOutboundRtpStreamStats: totalRoundTripTime property
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters

URL: /en-US/docs/Web/API/RTCRemoteOutboundRtpStreamStats/ssrc
Title: RTCRemoteOutboundRtpStreamStats: ssrc property
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters

URL: /en-US/docs/Web/API/RTCRemoteOutboundRtpStreamStats/roundTripTimeMeasurements
Title: RTCRemoteOutboundRtpStreamStats: roundTripTimeMeasurements property
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters

URL: /en-US/docs/Web/API/RTCRemoteOutboundRtpStreamStats/localId
Title: RTCRemoteOutboundRtpStreamStats: localId property
Flaw count: 3

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters
    • /en-US/docs/Web/API/RTCSentRtpStreamStats/packetsSent does not exist
    • /en-US/docs/Web/API/RTCSentRtpStreamStats/bytesSent does not exist

URL: /en-US/docs/Web/API/RTCRemoteOutboundRtpStreamStats/kind
Title: RTCRemoteOutboundRtpStreamStats: kind property
Flaw count: 2

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters
    • /en-US/docs/Web/API/RTCCodecStats/codec does not exist

URL: /en-US/docs/Web/API/RTCRemoteOutboundRtpStreamStats/codecId
Title: RTCRemoteOutboundRtpStreamStats: codecId property
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters

URL: /en-US/docs/Web/API/RTCRemoteOutboundRtpStreamStats/transportId
Title: RTCRemoteOutboundRtpStreamStats: transportId property
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters
External URLs (2)

URL: /en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/fractionLost
Title: RTCRemoteInboundRtpStreamStats: fractionLost property


URL: /en-US/docs/Glossary/Jitter
Title: Jitter

(comment last updated: 2024-07-09 02:16:38)

@hamishwillee hamishwillee force-pushed the rtcremoteinboundrtpstreamstats branch from ad6442b to 788f114 Compare March 15, 2024 02:52
@github-actions github-actions bot added the Content:Glossary Glossary entries label Mar 15, 2024

## Value

A positive integer value indicating the total number of received RTP packets at the remote endpoint.
Copy link
Collaborator Author

@hamishwillee hamishwillee Mar 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE, I am confused here. For context RTCRemoteInboundRtpStreamStats are statistics from the remote system about inbound stream stats. In other words, the local end sent some information to the remote end. The remote end has reported some information back to say what it received.

So for remote inbound stats my understanding is that you're getting the packetsReceived as measured at the remote end. This will simply be all received packets since the beginning of the session including retransmissions.
This contrasts with RTCInboundRtpStreamStats.packetsRecieved which is the local end calculating stats for the inbound stream.

But the spec states for packetsReceived:

packetsReceived of type unsigned long long

Total number of RTP packets received for this SSRC. This includes retransmissions. At the receiving endpoint, this is calculated as defined in [RFC3550] section 6.4.1. At the sending endpoint the packetsReceived is estimated by subtracting the Cumulative Number of Packets Lost from the Extended Highest Sequence Number Received, both reported in the RTCP Receiver Report, and then subtracting the initial Extended Sequence Number that was sent to this SSRC in a RTCP Sender Report and then adding one, to mirror what is discussed in Appendix A.3 in [RFC3550], but for the sender side. If no RTCP Receiver Report has been received yet, then return 0.

IF we assume that by "receiving endpoint" we mean "whatever is calculating the packets received" then this works because a receiver just counts what packets it got - and that is then way we got back from the remote end in this report.

I THINK the bit about "at the sending endpoint ..." is irrelevant. I.e. you might calculate the packetsRecieved in that way at the sender, but that has nothing to do with this data we are reporting.

@hamishwillee hamishwillee force-pushed the rtcremoteinboundrtpstreamstats branch from d111915 to 137ef8a Compare March 19, 2024 00:16
@github-actions github-actions bot added size/l [PR only] 501-1000 LoC changed and removed size/m [PR only] 51-500 LoC changed labels Mar 19, 2024
Comment on lines +13 to +17
The value provides a quick and convenient measure of the link quality.
It is the packet loss as a fraction, scaled up by 256.
To convert to a percentage, divide by 256 and multiply by 100.
For example, a value of 20 would equal a 7.8% packet loss.
Note that the packet loss can be negative if more packets are received than expected, and in this case the fraction is set to zero.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that all of this is my "guess/evaluation" based on the RFC info and appending linked in the next section. All the spec says is that it is calculated as per those spec links. I have interpreted that to mean that the property contains the 8 bit unsigned integer in the RR/SR "fraction loss" field. That is calculated by 8 bit shifting a number so the fraction is now the number.

It all sounds rational, but I can't prove it. I've tried a bunch of examples out and they all give me a value of zero :-( (which is what you get if there is no loss OR if the loss is negative).

@hamishwillee hamishwillee marked this pull request as ready for review March 19, 2024 05:38
@hamishwillee hamishwillee requested review from a team as code owners March 19, 2024 05:38
@hamishwillee hamishwillee requested review from Elchi3 and pepelsbey and removed request for a team March 19, 2024 05:38
@hamishwillee
Copy link
Collaborator Author

@wbamberg Yet another one to look at. I will probably continue working on it to update RTCRemoteOutoundRtpStreamStats if you don't review it soon, as they have more common behaviour. But if you do start reviewing I'll stop that.

@wbamberg
Copy link
Collaborator

ah right, so the quicker I review it the smaller it'll be? :)

@hamishwillee
Copy link
Collaborator Author

hamishwillee commented Mar 19, 2024

@wbamberg Yes :-). I'll be pausing if you review this earlier so that neither of us have a moving target for the "common" changes that are in this PR. But I'm not back until Friday. No huge urgency.

@wbamberg
Copy link
Collaborator

wbamberg commented Apr 6, 2024

@hamishwillee , I have started on this.

files/en-us/glossary/jitter/index.md Outdated Show resolved Hide resolved

<!-- RTCRemoteInboundRtpStreamStats -->

- {{domxref("RTCRemoteInboundRtpStreamStats.localId", "localId")}} {{optional_inline}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alphabetical order for members?

@pepelsbey
Copy link
Member

@hamishwillee hey! Do you think we can still pull this through?

@hamishwillee
Copy link
Collaborator Author

hamishwillee commented Jul 9, 2024

@pepelsbey I've been putting this off as "not a priority". I've merged most of the suggestions but I want to have another look at it on Friday. Will is on holiday, so it is not urgent unless you want to review it?

@hamishwillee hamishwillee force-pushed the rtcremoteinboundrtpstreamstats branch from a5f1644 to 41bb603 Compare July 9, 2024 00:45
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@pepelsbey
Copy link
Member

Will is on holiday, so it is not urgent unless you want to review it?

Thank you! As you said, it’s not a priority, so I’d leave it to Will since he’s already familiar with it.

@hamishwillee
Copy link
Collaborator Author

Cool. I have a few more review comments to address in any case. This moves to end of the cycle job.

@Elchi3 Elchi3 removed their request for review July 17, 2024 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Glossary Glossary entries Content:WebAPI Web API docs size/l [PR only] 501-1000 LoC changed
3 participants