Skip to content

Commit

Permalink
add WebRTC-specific interactions with capture/receive/RTP timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
handellm committed Sep 20, 2024
1 parent d4a00f1 commit 93467d7
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// Add additional editors here.
// https://github.com/w3c/respec/wiki/editors
],
"xref": ["webrtc", "hr-time", "mediacapture-streams", "webrtc-stats"],
"xref": ["webrtc", "hr-time", "mediacapture-streams", "webrtc-stats", "mediacapture-extensions"],
"shortName": "webrtc-extensions",
"specStatus": "ED",
"subjectPrefix": "[webrtc-extensions]"
Expand Down Expand Up @@ -920,6 +920,42 @@ <h3>
</div>
</dd>
</dl>
</section>
</section>
<section class="informative">
<h2>Timestamp behavior</h2>
<h2>RTCRtpSender timestamp effects on packet NTP and RTP timestamps</h2>
<p>
The user agent defines a <dfn class="export">frame timestamp</dfn> being the same as the [= capture timestamp =] of the frame being sent on the {{RTCRtpSender}} {{MediaStreamTrack}} if it is set.
If it is unset the user agent estimates a timestamp from the sent frame's [= presentation timestamp =] together with the
time it was received by the {{RTCRtpSender}}.
</p>
<p>
The NTP and RTP timestamps of the encoded frame corresponding to the frame being sent on the {{RTCRtpSender}} {{MediaStreamTrack}} are sourced from the [= frame timestamp =].
</p>

<h2>RTCRtpReceiver timestamps</h2>
<h3>Remote capture timestamp</h3>
<p>
<!-- TODO: How this is estimated is under specified and should be fixed, but the section holds the requestVideoFrameCallback text for now -->
For a frame produced in a {{RTCRtpReceiver}} track, the user agent computes a
<dfn class="export">remote capture timestamp</dfn>. It is a best-effort estimate of the local capture
time on the sender translated to the receiver clock, and can use methods like using RTCP SR
as specified in [[?RFC3550]] Section 6.4.1, or by other alternative means if use by RTCP SR
isn't feasible.
</p><p>
Each frame's [= capture timestamp =] is set to the [= remote capture timestamp =], if available.
</p>
<h3>Received RTP timestamp</h3>
<p>
For a frame produced in a {{RTCRtpReceiver}} track, the frame's [=RTP timestamp=] is set
from the RTP timestamp of constituent packets of the corresponding received encoded frame.
</p>
<h3>Receive timestamp</h3>
<p>
For a frame produced in a {{RTCRtpReceiver}} track, the [=receive timestamp=] is set
as the time the corresponding encoded frame was received by the platform, i.e. the time at which the
last packet belonging to this frame was received over the network.
</p>
</section>
</body>
</html>

0 comments on commit 93467d7

Please sign in to comment.