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

Add receiveTime field to RTCEncodedVideoFrameMetadata and RTCEncodedAudioFrame #237

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 32 additions & 9 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ dictionary RTCEncodedVideoFrameMetadata {
sequence<unsigned long> contributingSources;
long long timestamp; // microseconds
unsigned long rtpTimestamp;
DOMHighResTimeStamp receiveTime;
DOMString mimeType;
};
</pre>
Expand All @@ -371,7 +372,7 @@ dictionary RTCEncodedVideoFrameMetadata {
<dd>
<p>
An identifier for the encoded frame, monotonically increasing in decode order. Its lower
16 bits match the frame_number of the AV1 Dependency Descriptor Header Extension defined in Appendix A of [[?AV1-RTP-SPEC]], if present.
16 bits match the frame_number of the AV1 Dependency Descriptor Header Extension defined in Appendix A of [[AV1-RTP-SPEC]], if present.
Only present for received frames if the Dependency Descriptor Header Extension is present.
</p>
</dd>
Expand All @@ -381,7 +382,7 @@ dictionary RTCEncodedVideoFrameMetadata {
<dd>
<p>
List of frameIds of frames this frame references.
Only present for received frames if the AV1 Dependency Descriptor Header Extension defined in Appendix A of [[?AV1-RTP-SPEC]] is present.
Only present for received frames if the AV1 Dependency Descriptor Header Extension defined in Appendix A of [[AV1-RTP-SPEC]] is present.
</p>
</dd>
<dt>
Expand Down Expand Up @@ -431,6 +432,17 @@ dictionary RTCEncodedVideoFrameMetadata {
that reflects the sampling instant of the first octet in the RTP data packet.
</p>
</dd>
<dt>
<dfn dict-member>receiveTime</dfn> <span class=
"idlMemberType">DOMHighResTimeStamp</span>
</dt>
<dd>
<p>
For frames coming from an RTCRtpReceiver, represents the timestamp
of the last received packet used to produce this video frame. This
timestamp is relative to {{Performance}}.{{Performance/timeOrigin}}.
</p>
</dd>
<dt>
<dfn dict-member>mimeType</dfn> <span class="idlMemberType">DOMString</span>
</dt>
Expand Down Expand Up @@ -460,7 +472,7 @@ interface RTCEncodedVideoFrame {
};
</pre>

### Constructor ### {#RTCEncodedVideoFrame-members}
### Constructor ### {#RTCEncodedVideoFrame-constructor}
<dl dfn-for="RTCEncodedVideoFrame" class="dictionary-members">
<dt>
<dfn for="RTCEncodedVideoFrame" method>constructor()</dfn>
Expand Down Expand Up @@ -506,11 +518,6 @@ interface RTCEncodedVideoFrame {
{{RTCEncodedVideoFrameMetadata/mimeType}}.
For <a href="https://w3c.github.io/webrtc-svc/">SVC</a>, each spatial layer
is transformed separately.
<p class="note">
Since packetizers may drop certain elements, e.g. AV1 temporal delimiter OBUs,
the input to an receive-side transform may be different from the output of
a send-side transform.
</p>
The following table gives a number of examples:
</p>
<table class="simple">
Expand Down Expand Up @@ -565,6 +572,11 @@ interface RTCEncodedVideoFrame {
</tr>
</tbody>
</table>
<p class="note">
Since packetizers may drop certain elements, e.g. AV1 temporal delimiter OBUs,
the input to an receive-side transform may be different from the output of
a send-side transform.
</p>
</dd>
</dl>

Expand Down Expand Up @@ -611,6 +623,7 @@ dictionary RTCEncodedAudioFrameMetadata {
sequence&lt;unsigned long&gt; contributingSources;
short sequenceNumber;
unsigned long rtpTimestamp;
DOMHighResTimeStamp receiveTime;
DOMString mimeType;
};
</pre>
Expand Down Expand Up @@ -664,6 +677,16 @@ dictionary RTCEncodedAudioFrameMetadata {
that reflects the sampling instant of the first octet in the RTP data packet.
</p>
</dd>
<dt>
<dfn dict-member>receiveTime</dfn> <span class=
"idlMemberType">DOMHighResTimeStamp</span>
</dt>
<dd>
<p>
For frames coming from an RTCRtpReceiver, represents the timestamp
of the last received packet used to produce this audio frame. This
timestamp is relative to {{Performance}}.{{Performance/timeOrigin}}.
</p>
<dt>
<dfn dict-member>mimeType</dfn> <span class="idlMemberType">DOMString</span>
</dt>
Expand All @@ -689,7 +712,7 @@ interface RTCEncodedAudioFrame {
};
</pre>

### Constructor ### {#RTCEncodedAudioFrame-members}
### Constructor ### {#RTCEncodedAudioFrame-constructor}
<dl dfn-for="RTCEncodedAudioFrame" class="dictionary-members">
<dt>
<dfn for="RTCEncodedAudioFrame" method>constructor()</dfn>
Expand Down