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} + +
+ 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. +
++ 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. +
++ The list of contribution sources (csrc list) as defined in [[RFC3550]]. +
++ 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. +
++ 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}}. +
++ 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}}. +
++ 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. +
++ The codec MIME media type/subtype defined in the IANA media types registry + [[!IANA-MEDIA-TYPES]], e.g. audio/opus or video/VP8. +
+@@ -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. -
- 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. -
-- 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. -
-- The list of contribution sources (csrc list) as defined in [[RFC3550]]. -
-- 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. -
-- 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. -
-- 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}}. -
-- 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. -
-- The codec MIME media type/subtype defined in the IANA media types registry - [[!IANA-MEDIA-TYPES]], e.g. video/VP8. -
-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}
- 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. -
-- 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. -
-- The list of contribution sources (csrc list) as defined in [[RFC3550]]. -
-- 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. -
-- 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. -
-- 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}}. -
-- 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. -
-- The codec MIME media type/subtype defined in the IANA media types registry - [[!IANA-MEDIA-TYPES]], e.g. audio/opus. -
-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: