Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: w3c/webrtc-encoded-transform
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 71a237268e8a60658314d3470332300179a50240
Choose a base ref
..
head repository: w3c/webrtc-encoded-transform
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 740b9cf9d96776f76a868ce63d6d3f7829fc3af9
Choose a head ref
Showing with 37 additions and 61 deletions.
  1. +37 −61 index.bs
98 changes: 37 additions & 61 deletions index.bs
Original file line number Diff line number Diff line change
@@ -139,6 +139,20 @@ The <dfn abstract-op>readEncodedData</dfn> algorithm is given a |rtcObject| as p
1. Let |frame| be the newly produced frame.
1. Set |frame|.`[[owner]]` to |rtcObject|.
1. Set |frame|.`[[counter]]` to |rtcObject|.`[[lastEnqueuedFrameCounter]]`.
1. If the frame has been produced by a {{RTCRtpReceiver}}:
1. If the relevant RTP packet contains the
[[RTP-EXT-CAPTURE-TIME|RTP Header Extension for Absolute Capture Time]], set |frame|.`[[captureTimestamp]]` to the
[[RTP-EXT-CAPTURE-TIME#absolute-capture-timestamp|absolute capture timestamp]] field and set |frame|.`[[senderCaptureTimeOffset]]`
to the [[RTP-EXT-CAPTURE-TIME#estimated-capture-clock-offset|capture clock offset field]] if it is present.
1. Otherwise, if the relevant RTP packet does not contain the
[[RTP-EXT-CAPTURE-TIME|RTP Header Extension for Absolute Capture Time]] but a previous RTP packet did,
set |frame|.`[[captureTimestamp]]` to the result of calculating the absolute capture timestamp according to
[[RTP-EXT-CAPTURE-TIME#timestamp-interpolation|timestamp interpolation]] and set |frame|.`[[senderCaptureTimeOffset]]`
to the most recent value that was present.
1. Otherwise, set set |frame|.`[[captureTimestamp]]` to undefined and set |frame|.`[[senderCaptureTimeOffset]]` to undefined.
1. If the frame has been produced by a {{RTCRtpSender}}, set |frame|.`[[captureTimestamp]]` to the capture timestamp
using the methodology described in [[RTP-EXT-CAPTURE-TIME#absolute-capture-timestamp]] and set frame.`[[senderCaptureTimeOffset]]`
to undefined.
1. [=ReadableStream/Enqueue=] |frame| in |rtcObject|.`[[readable]]`.

The <dfn abstract-op>writeEncodedData</dfn> algorithm is given a |rtcObject| as parameter and a |frame| as input. It is defined by running the following steps:
@@ -442,49 +456,30 @@ dictionary RTCEncodedVideoFrameMetadata {
that reflects the sampling instant of the first octet in the RTP data packet.
</p>
</dd>
<dt>
<dt>
<dfn dict-member>captureTimestamp</dfn> <span class="idlMemberType">DOMHighResTimeStamp</span>
</dt>
<dd>
<p>
The {{captureTimestamp}} is the timestamp that, the most recent frame (from an RTP packet
originating from this source) delivered to the {{RTCRtpReceiver}}'s {{MediaStreamTrack}}, was
originally captured. Its reference clock is the capture system's NTP clock (same clock used
to generate NTP timestamps for RTCP sender reports on that system).

On populating this member, the user agent MUST run the following steps:
1. If the relevant RTP packet contains the [[RTP-EXT-CAPTURE-TIME|RTP Header Extension for
Absolute Capture Time]], return the value of the
[[RTP-EXT-CAPTURE-TIME#absolute-capture-timestamp|absolute capture timestamp]] field and
abort these steps.
1. Otherwise, if the relevant RTP packet does not contain the RTP Header Extension for
Absolute Capture Time but a previous RTP packet did, return the result of calculating the
absolute capture timestamp according to [[RTP-EXT-CAPTURE-TIME#timestamp-interpolation|
timestamp interpolation]] and abort these steps.
1. Otherwise, return undefined.
The {{RTCEncodedVideoFrameMetadata/captureTimestamp}} is set by the frame source, and for frames that come
from the {{RTCRtpReceiver}}, it is extracted by the [[#stream-processing]] algorithm. Its reference clock
is the capture system's NTP clock (same clock used to generate NTP timestamps for RTCP sender reports on
that system).

On populating this member, the user agent MUST return the value of the frame's `[[captureTimestamp]]` slot.
</p>
</dd>
<dt>
<dt>
<dfn dict-member>senderCaptureTimeOffset</dfn> <span class="idlMemberType">DOMHighResTimeStamp</span>
</dt>
<dd>
<p>
The {{senderCaptureTimeOffset}} is the sender system's estimate of the offset between its own
NTP clock and the capture system's NTP clock, for the same frame that the {{captureTimestamp}} was
originated from.

On populating this member, the user agent MUST run the following steps:
1. If the relevant RTP packet contains the [[RTP-EXT-CAPTURE-TIME|RTP Header Extension for Absolute
Capture Time]] and the estimated [[RTP-EXT-CAPTURE-TIME#estimated-capture-clock-offset|capture
clock offset field]] is present, return the value of the estimated capture clock offset field
and abort these steps.
1. Otherwise, if the relevant RTP packet does not contain the [[RTP-EXT-CAPTURE-TIME|RTP Header
Extension for Absolute Capture Time]]'s [[RTP-EXT-CAPTURE-TIME#estimated-capture-clock-offset|
estimated capture clock offset]] field, but a previous RTP packet did, return the most recent
value that was present and abort these steps.
1. Otherwise, return undefined.
The {{RTCEncodedVideoFrameMetadata/senderCaptureTimeOffset}} is the sender system's estimate of the offset
between its own NTP clock and the capture system's NTP clock, for the same frame that the
{{RTCEncodedVideoFrameMetadata/captureTimestamp}} was originated from. It is extracted by the
[[#stream-processing]] algorithm.

On populating this member, the user agent MUST return the value of the frame's `[[senderCaptureTimeOffset]]` slot.
</p>
</dd>
<dt>
@@ -727,44 +722,25 @@ dictionary RTCEncodedAudioFrameMetadata {
</dt>
<dd>
<p>
The {{captureTimestamp}} is the timestamp that, the most recent frame (from an RTP packet
originating from this source) delivered to the {{RTCRtpReceiver}}'s {{MediaStreamTrack}}, was
originally captured. Its reference clock is the capture system's NTP clock (same clock used
to generate NTP timestamps for RTCP sender reports on that system).

On populating this member, the user agent MUST run the following steps:
1. If the relevant RTP packet contains the [[RTP-EXT-CAPTURE-TIME|RTP Header Extension for
Absolute Capture Time]], return the value of the
[[RTP-EXT-CAPTURE-TIME#absolute-capture-timestamp|absolute capture timestamp]] field and
abort these steps.
1. Otherwise, if the relevant RTP packet does not contain the RTP Header Extension for
Absolute Capture Time but a previous RTP packet did, return the result of calculating the
absolute capture timestamp according to [[RTP-EXT-CAPTURE-TIME#timestamp-interpolation|
timestamp interpolation]] and abort these steps.
1. Otherwise, return undefined.
The {{RTCEncodedAudioFrameMetadata/captureTimestamp}} is set by the frame source, and for frames that come
from the {{RTCRtpReceiver}}, it is extracted by the [[#stream-processing]] algorithm. Its reference clock
is the capture system's NTP clock (same clock used to generate NTP timestamps for RTCP sender reports on
that system).

On populating this member, the user agent MUST return the value of the frame's `[[captureTimestamp]]` slot.
</p>
</dd>
<dt>
<dt>
<dfn dict-member>senderCaptureTimeOffset</dfn> <span class="idlMemberType">DOMHighResTimeStamp</span>
</dt>
<dd>
<p>
The {{senderCaptureTimeOffset}} is the sender system's estimate of the offset between its own
NTP clock and the capture system's NTP clock, for the same frame that the {{captureTimestamp}} was
originated from.

On populating this member, the user agent MUST run the following steps:
1. If the relevant RTP packet contains the [[RTP-EXT-CAPTURE-TIME|RTP Header Extension for Absolute
Capture Time]] and the estimated [[RTP-EXT-CAPTURE-TIME#estimated-capture-clock-offset|capture
clock offset field]] is present, return the value of the estimated capture clock offset field
and abort these steps.
1. Otherwise, if the relevant RTP packet does not contain the [[RTP-EXT-CAPTURE-TIME|RTP Header
Extension for Absolute Capture Time]]'s [[RTP-EXT-CAPTURE-TIME#estimated-capture-clock-offset|
estimated capture clock offset]] field, but a previous RTP packet did, return the most recent
value that was present and abort these steps.
1. Otherwise, return undefined.
The {{RTCEncodedAudioFrameMetadata/senderCaptureTimeOffset}} is the sender system's estimate of the offset
between its own NTP clock and the capture system's NTP clock, for the same frame that the
{{RTCEncodedAudioFrameMetadata/captureTimestamp}} was originated from. It is extracted by the
[[#stream-processing]] algorithm.

On populating this member, the user agent MUST return the value of the frame's `[[senderCaptureTimeOffset]]` slot.
</p>
</dd>
<dt>