diff --git a/index.bs b/index.bs index c0dacc0..7d7dd73 100644 --- a/index.bs +++ b/index.bs @@ -318,8 +318,104 @@ The setEncryptionKey(|key|, |keyID|) met # RTCRtpScriptTransform # {#scriptTransform} In this section, the capture system refers to the system where media is sourced from and the sender system -refers to the system that is sending RTP and RTCP packets to the receiver system where {{RTCEncodedVideoFrameMetadata}} data -or {{RTCEncodedAudioFrameMetadata}} data is populated. +refers to the system that is sending RTP and RTCP packets to the receiver system where {{RTCEncodedFrameMetadata}} data is populated. + +## RTCEncodedFrameMetadata dictionary ## {#RTCEncodedFrameMetadata} +
+dictionary RTCEncodedFrameMetadata {
+    unsigned long synchronizationSource;
+    octet payloadType;
+    sequence<unsigned long> contributingSources;
+    unsigned long rtpTimestamp;
+    DOMHighResTimeStamp receiveTime;
+    DOMHighResTimeStamp captureTime;
+    DOMHighResTimeStamp senderCaptureTimeOffset;
+    DOMString mimeType;
+};
+
+ +### Members ### {#RTCEncodedFrameMetadata-members} + +
+
+ synchronizationSource unsigned long +
+
+

+ The synchronization source (ssrc) identifier is an unsigned integer value per [[RFC3550]] + used to identify the stream of RTP packets that the encoded frame object is describing. +

+
+
+ payloadType octet +
+
+

+ The payload type is an unsigned integer value in the range from 0 to 127 per [[RFC3550]] + that is used to describe the format of the RTP payload. +

+
+
+ contributingSources sequence<unsigned long> +
+
+

+ The list of contribution sources (csrc list) as defined in [[RFC3550]]. +

+
+
+ rtpTimestamp unsigned long +
+
+

+ The RTP timestamp identifier is an unsigned integer value per [[RFC3550]] + that reflects the sampling instant of the first octet in the RTP data packet. +

+
+
+ receiveTime DOMHighResTimeStamp +
+
+

+ For frames coming from an RTCRtpReceiver, represents the timestamp + of the last received packet used to produce this media frame. This + timestamp is relative to {{Performance}}.{{Performance/timeOrigin}}. +

+
+
+ captureTime DOMHighResTimeStamp +
+
+

+ The capture time of this frame in the capture system's clock. + On populating this member, the user agent MUST return the value of the frame's `[[captureTime]]` slot, + shifted to be relative to {{Performance}}.{{Performance/timeOrigin}}. +

+
+
+ senderCaptureTimeOffset DOMHighResTimeStamp +
+
+

+ The {{RTCEncodedFrameMetadata/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 + {{RTCEncodedFrameMetadata/captureTime}} was originated from. + On populating this member, the user agent MUST return the value of the frame's `[[senderCaptureTimeOffset]]` slot. +

+
+
+ mimeType DOMString +
+
+

+ The codec MIME media type/subtype defined in the IANA media types registry + [[!IANA-MEDIA-TYPES]], e.g. audio/opus or video/VP8. +

+
+
## RTCEncodedVideoFrameType dictionary ## {#RTCEncodedVideoFrameType}
@@ -374,22 +470,14 @@ enum RTCEncodedVideoFrameType {
 
 ## RTCEncodedVideoFrameMetadata dictionary ## {#RTCEncodedVideoFrameMetadata}
 
-dictionary RTCEncodedVideoFrameMetadata {
+dictionary RTCEncodedVideoFrameMetadata : RTCEncodedFrameMetadata {
     unsigned long long frameId;
     sequence<unsigned long long> dependencies;
     unsigned short width;
     unsigned short height;
     unsigned long spatialIndex;
     unsigned long temporalIndex;
-    unsigned long synchronizationSource;
-    octet payloadType;
-    sequence<unsigned long> contributingSources;
     long long timestamp;    // microseconds
-    unsigned long rtpTimestamp;
-    DOMHighResTimeStamp receiveTime;
-    DOMHighResTimeStamp captureTime;
-    DOMHighResTimeStamp senderCaptureTimeOffset;
-    DOMString mimeType;
 };
 
@@ -415,33 +503,6 @@ dictionary RTCEncodedVideoFrameMetadata { Only present for received frames if the AV1 Dependency Descriptor Header Extension defined in Appendix A of [[AV1-RTP-SPEC]] is present.

-
- synchronizationSource unsigned long -
-
-

- The synchronization source (ssrc) identifier is an unsigned integer value per [[RFC3550]] - used to identify the stream of RTP packets that the encoded frame object is describing. -

-
-
- payloadType octet -
-
-

- The payload type is an unsigned integer value in the range from 0 to 127 per [[RFC3550]] - that is used to describe the format of the RTP payload. -

-
-
- contributingSources sequence<unsigned long> -
-
-

- The list of contribution sources (csrc list) as defined in [[RFC3550]]. -

-
timestamp long long @@ -452,58 +513,6 @@ dictionary RTCEncodedVideoFrameMetadata { {{VideoFrame/timestamp}} for raw frames which correspond to this frame.

-
- rtpTimestamp unsigned long -
-
-

- The RTP timestamp identifier is an unsigned integer value per [[RFC3550]] - that reflects the sampling instant of the first octet in the RTP data packet. -

-
-
- receiveTime DOMHighResTimeStamp -
-
-

- 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}}. - Only exists for incoming video frames. -

-
-
- captureTime DOMHighResTimeStamp -
-
-

- The capture time of this frame in the capture system's clock. - On populating this member, the user agent MUST return the value of the frame's `[[captureTime]]` slot, - shifted to be relative to {{Performance}}.{{Performance/timeOrigin}}. -

-
-
- senderCaptureTimeOffset DOMHighResTimeStamp -
-
-

- 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/captureTime}} was originated from. - On populating this member, the user agent MUST return the value of the frame's `[[senderCaptureTimeOffset]]` slot. -

-
-
- mimeType DOMString -
-
-

- The codec MIME media type/subtype defined in the IANA media types registry - [[!IANA-MEDIA-TYPES]], e.g. video/VP8. -

-
@@ -567,7 +576,7 @@ interface RTCEncodedVideoFrame {

The encoded frame data. The format of the data depends on the video codec that is used to encode/decode the frame which can be determined by looking at the - {{RTCEncodedVideoFrameMetadata/mimeType}}. + {{RTCEncodedFrameMetadata/mimeType}}. For SVC, each spatial layer is transformed separately.

@@ -672,48 +681,13 @@ An implementation is therefore free to choose whatever method works best. ## RTCEncodedAudioFrameMetadata dictionary ## {#RTCEncodedAudioFrameMetadata}
-dictionary RTCEncodedAudioFrameMetadata {
-    unsigned long synchronizationSource;
-    octet payloadType;
-    sequence<unsigned long> contributingSources;
+dictionary RTCEncodedAudioFrameMetadata : RTCEncodedFrameMetadata {
     short sequenceNumber;
-    unsigned long rtpTimestamp;
-    DOMHighResTimeStamp receiveTime;
-    DOMHighResTimeStamp captureTime;
-    DOMHighResTimeStamp senderCaptureTimeOffset;
-    DOMString mimeType;
     double audioLevel;
 };
 
### Members ### {#RTCEncodedAudioFrameMetadata-members}
-
- synchronizationSource unsigned long -
-
-

- The synchronization source (ssrc) identifier is an unsigned integer value per [[RFC3550]] - used to identify the stream of RTP packets that the encoded frame object is describing. -

-
-
- payloadType octet -
-
-

- The payload type is an unsigned integer value in the range from 0 to 127 per [[RFC3550]] - that is used to describe the format of the RTP payload. -

-
-
- contributingSources sequence<unsigned long> -
-
-

- The list of contribution sources (csrc list) as defined in [[RFC3550]]. -

-
sequenceNumber short @@ -726,57 +700,6 @@ dictionary RTCEncodedAudioFrameMetadata { Comparing two sequence numbers requires serial number arithmetic described in [[RFC1982]].

-
- rtpTimestamp unsigned long -
-
-

- The RTP timestamp identifier is an unsigned integer value per [[RFC3550]] - that reflects the sampling instant of the first octet in the RTP data packet. -

-
-
- receiveTime DOMHighResTimeStamp -
-
-

- 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}}. - Only exists for incoming audio frames. -

-
-
- captureTime DOMHighResTimeStamp -
-
-

- The capture time of this frame in the capture system's clock. - On populating this member, the user agent MUST return the value of the frame's `[[captureTime]]` slot, - shifted to be relative to {{Performance}}.{{Performance/timeOrigin}}. -

-
-
- senderCaptureTimeOffset DOMHighResTimeStamp -
-
-

- 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/captureTime}} was originated from. - On populating this member, the user agent MUST return the value of the frame's `[[senderCaptureTimeOffset]]` slot. -

-
-
- mimeType DOMString -
-
-

- The codec MIME media type/subtype defined in the IANA media types registry - [[!IANA-MEDIA-TYPES]], e.g. audio/opus. -

-
audioLevel double
@@ -836,7 +759,7 @@ interface RTCEncodedAudioFrame {

The encoded frame data. The format of the data depends on the audio codec that is used to encode/decode the frame which can be determined by looking at the - {{RTCEncodedAudioFrameMetadata/mimeType}}. + {{RTCEncodedFrameMetadata/mimeType}}. The following table gives a number of examples: