diff --git a/index.bs b/index.bs index 864c093..e70ba00 100644 --- a/index.bs +++ b/index.bs @@ -264,6 +264,7 @@ The setEncryptionKey(|key|, |keyID|) met # RTCRtpScriptTransform # {#scriptTransform} +## RTCEncodedVideoFrameType dictionary ## {#RTCEncodedVideoFrameType}
// New enum for video frame types. Will eventually re-use the equivalent defined // by WebCodecs. @@ -272,7 +273,51 @@ enum RTCEncodedVideoFrameType { "key", "delta", }; - ++
Enum value | Description | +
---|---|
+ empty + | +
+ + This frame contains no data. + + |
+
+ key + | +
+ + This frame can be decoded without reference to any other frames. + + |
+
+ delta + | +
+ + This frame references another frame and can not be decoded without that frame. + + |
+
dictionary RTCEncodedVideoFrameMetadata { long long frameId; sequence<long long> dependencies; @@ -284,33 +329,194 @@ dictionary RTCEncodedVideoFrameMetadata { octet payloadType; sequence<unsigned long> contributingSources; }; ++### Members ### {#RTCEncodedVideoFrameMetadata-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]]. +
+// New interfaces to define encoded video and audio frames. Will eventually // re-use or extend the equivalent defined in WebCodecs. [Exposed=(Window,DedicatedWorker)] interface RTCEncodedVideoFrame { readonly attribute RTCEncodedVideoFrameType type; - readonly attribute unsigned long timestamp; // RTP timestamp. + readonly attribute unsigned long timestamp; attribute ArrayBuffer data; RTCEncodedVideoFrameMetadata getMetadata(); }; ++### Members ### {#RTCEncodedVideoFrame-members} +
+ The type attribute allows the application to determine when a key frame is being + sent or received. +
++ 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. +
++ The encoded frame data. +
++ Returns the metadata associated with the frame. +
+dictionary RTCEncodedAudioFrameMetadata { unsigned long synchronizationSource; octet payloadType; sequence<unsigned long> contributingSources; }; - ++### 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]]. +
+[Exposed=(Window,DedicatedWorker)] interface RTCEncodedAudioFrame { - readonly attribute unsigned long timestamp; // RTP timestamp. + readonly attribute unsigned long timestamp; attribute ArrayBuffer data; RTCEncodedAudioFrameMetadata getMetadata(); }; ++### Members ### {#RTCEncodedAudioFrame-members} +
+ 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. +
++ The encoded frame data. +
++ Returns the metadata associated with the frame. +
+[Exposed=DedicatedWorker] interface RTCTransformEvent : Event { readonly attribute RTCRtpScriptTransformer transformer; @@ -415,7 +621,7 @@ The generate key frame algorithm, given |promise|, |encoder| and |rid For any {{RTCRtpScriptTransformer}} named |transformer|, the following steps are run just before any |frame| is enqueued in |transformer|.`[[readable]]`: 1. Let |encoder| be |transformer|.`[[encoder]]`. 1. If |encoder| or |encoder|.`[[pendingKeyFrameTasks]]` is undefined, abort these steps. -1. If |frame| is not a video key frame, abort these steps. +1. If |frame| is not a video {{RTCEncodedVideoFrameType/"key"}} frame, abort these steps. 1. For each |task| in |encoder|.`[[pendingKeyFrameTasks]]`, run the following steps: 1. If |frame| was generated by a video encoder identified by |task|.`[[rid]]`, run the following steps: 1. Remove |task| from |encoder|.`[[pendingKeyFrameTasks]]`.