From 97ab44420f6b50f01e9a9065652d24ab7f34b379 Mon Sep 17 00:00:00 2001
From: Philipp Hancke
+ 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]].
+
+ This frame contains no data.
+
+ This frame can be decoded without reference to any other frames.
+
+ This frame references another frame and can not be decoded without that frame.
+
+ 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.
+
+ The encoded frame data.
+
+
+
[Exposed=(Window,DedicatedWorker)]
interface RTCEncodedAudioFrame {
readonly attribute unsigned long timestamp; // RTP timestamp.
From a998526d146fbdcd7dba6acbd80ec93837a097d3 Mon Sep 17 00:00:00 2001
From: Philipp Hancke
+## RTCEncodedAudioFrameMetadata dictionary # {#RTCEncodedAudioFrameMetadata}
+
dictionary RTCEncodedAudioFrameMetadata {
unsigned long synchronizationSource;
octet payloadType;
sequence<unsigned long> contributingSources;
};
+### Dictionary {{RTCEncodedAudioFrameMetadata}} Members # {#RTCEncodedAudioFrameMetadata-members}
From 867ac8ff5b0e728013fcd50398b2cb979edfe9e0 Mon Sep 17 00:00:00 2001
From: Philipp Hancke
dictionary RTCEncodedAudioFrameMetadata {
unsigned long synchronizationSource;
From 32a778649cd769911901bf08f283be3ebb1ecbda Mon Sep 17 00:00:00 2001
From: Philipp Hancke
-### Dictionary {{RTCEncodedAudioFrameMetadata}} Members # {#RTCEncodedAudioFrameMetadata-members}
+### Dictionary {{RTCEncodedAudioFrameMetadata}} Members ### {#RTCEncodedAudioFrameMetadata-members}
From 565a20994254114d190f0566e87c172505c9ae86 Mon Sep 17 00:00:00 2001
From: Philipp Hancke
// New enum for video frame types. Will eventually re-use the equivalent defined
// by WebCodecs.
@@ -272,7 +273,51 @@ enum RTCEncodedVideoFrameType {
"key",
"delta",
};
-
+
+
+
+
+## RTCEncodedVideoFrameMetadata dictionary ## {#RTCEncodedVideoFrameMetadata}
+
+
+
+
+ Enum value Description
+
+
+
+ empty
+
+
+
+
+
+
+ key
+
+
+
+
+
+
+
+ delta
+
+
+
+
dictionary RTCEncodedVideoFrameMetadata {
long long frameId;
sequence<long long> dependencies;
@@ -284,18 +329,88 @@ dictionary RTCEncodedVideoFrameMetadata {
octet payloadType;
sequence<unsigned long> contributingSources;
};
+
+
+### Members ### {#RTCEncodedVideoFrameMetadata-members}
+
+
+
+## RTCEncodedVideoFrame interface ## {#RTCEncodedVideoFrame-interface}
+
// 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}
+
+
+
+### Methods ### {#RTCEncodedVideoFrame-methods}
+
+
+
## RTCEncodedAudioFrameMetadata dictionary ## {#RTCEncodedAudioFrameMetadata}
dictionary RTCEncodedAudioFrameMetadata {
@@ -304,7 +419,7 @@ dictionary RTCEncodedAudioFrameMetadata {
sequence<unsigned long> contributingSources;
};
-### Dictionary {{RTCEncodedAudioFrameMetadata}} Members ### {#RTCEncodedAudioFrameMetadata-members}
+### Members ### {#RTCEncodedAudioFrameMetadata-members}
@@ -336,17 +451,54 @@ dictionary RTCEncodedAudioFrameMetadata {
[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. +
+[Exposed=DedicatedWorker] interface RTCTransformEvent : Event { readonly attribute RTCRtpScriptTransformer transformer; From 912fa3ece427cbde7bab01f31a1b5a7a2bf0b781 Mon Sep 17 00:00:00 2001 From: Philipp HanckeDate: Mon, 3 Oct 2022 09:53:36 +0200 Subject: [PATCH 06/10] use RTCEncodedVideoFrameType --- index.bs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/index.bs b/index.bs index baef4e0..351ca77 100644 --- a/index.bs +++ b/index.bs @@ -382,6 +382,16 @@ interface RTCEncodedVideoFrame { +
- + type of type RTCEncodedVideoFrameType +
+- +
++ The type attribute allows the application to determine when a key frame is being + sent or received. +
+- timestamp of type unsigned long
@@ -603,7 +613,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]]`. From 04e9ab0fcdc6b095c2e89f60973f7870e61994cf Mon Sep 17 00:00:00 2001 From: Philipp HanckeDate: Mon, 3 Oct 2022 11:13:25 +0200 Subject: [PATCH 07/10] fix the idl error --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 351ca77..a6b4bc1 100644 --- a/index.bs +++ b/index.bs @@ -276,7 +276,7 @@ enum RTCEncodedVideoFrameType {
Enum value | Description | From 43e493bd51396fd44efbb9a78e8066428cf40679 Mon Sep 17 00:00:00 2001 From: Philipp Hancke
---|