From 97ab44420f6b50f01e9a9065652d24ab7f34b379 Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Thu, 29 Sep 2022 18:05:46 +0200 Subject: [PATCH 01/10] describe (some) fields --- index.bs | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 864c093..852e596 100644 --- a/index.bs +++ b/index.bs @@ -300,7 +300,39 @@ dictionary RTCEncodedAudioFrameMetadata { octet payloadType; sequence<unsigned long> contributingSources; }; - + +
+
+ synchronizationSource of type 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 of type 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 of type sequence<unsigned long> +
+
+

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

+
+
+
 [Exposed=(Window,DedicatedWorker)]
 interface RTCEncodedAudioFrame {
     readonly attribute unsigned long timestamp; // RTP timestamp.

From a998526d146fbdcd7dba6acbd80ec93837a097d3 Mon Sep 17 00:00:00 2001
From: Philipp Hancke 
Date: Thu, 29 Sep 2022 18:24:04 +0200
Subject: [PATCH 02/10] tweak

---
 index.bs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/index.bs b/index.bs
index 852e596..e45aecb 100644
--- a/index.bs
+++ b/index.bs
@@ -294,13 +294,17 @@ interface RTCEncodedVideoFrame {
     attribute ArrayBuffer data;
     RTCEncodedVideoFrameMetadata getMetadata();
 };
+
+## 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 Date: Fri, 30 Sep 2022 10:56:08 +0200 Subject: [PATCH 03/10] Update index.bs Co-authored-by: Dominique Hazael-Massieux --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index e45aecb..6152a66 100644 --- a/index.bs +++ b/index.bs @@ -296,7 +296,7 @@ interface RTCEncodedVideoFrame { }; -## RTCEncodedAudioFrameMetadata dictionary # {#RTCEncodedAudioFrameMetadata} +## RTCEncodedAudioFrameMetadata dictionary ## {#RTCEncodedAudioFrameMetadata}
 dictionary RTCEncodedAudioFrameMetadata {
     unsigned long synchronizationSource;

From 32a778649cd769911901bf08f283be3ebb1ecbda Mon Sep 17 00:00:00 2001
From: Philipp Hancke 
Date: Fri, 30 Sep 2022 10:56:15 +0200
Subject: [PATCH 04/10] Update index.bs

Co-authored-by: Dominique Hazael-Massieux 
---
 index.bs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.bs b/index.bs
index 6152a66..997db93 100644
--- a/index.bs
+++ b/index.bs
@@ -304,7 +304,7 @@ dictionary RTCEncodedAudioFrameMetadata {
     sequence<unsigned long> contributingSources;
 };
 
-### Dictionary {{RTCEncodedAudioFrameMetadata}} Members # {#RTCEncodedAudioFrameMetadata-members} +### Dictionary {{RTCEncodedAudioFrameMetadata}} Members ### {#RTCEncodedAudioFrameMetadata-members}
From 565a20994254114d190f0566e87c172505c9ae86 Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Sun, 2 Oct 2022 10:25:15 +0200 Subject: [PATCH 05/10] describe some more... --- index.bs | 162 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 157 insertions(+), 5 deletions(-) diff --git a/index.bs b/index.bs index 997db93..baef4e0 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",
 };
-
+
+ + + + + + + + + + + + + + + + + + + + + +
{{RTCEncodedVideoFrameType}} Enumeration description
Enum valueDescription
+ 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. +

+
+ +## RTCEncodedVideoFrameMetadata dictionary ## {#RTCEncodedVideoFrameMetadata} +
 dictionary RTCEncodedVideoFrameMetadata {
     long long frameId;
     sequence<long long> dependencies;
@@ -284,18 +329,88 @@ dictionary RTCEncodedVideoFrameMetadata {
     octet payloadType;
     sequence<unsigned long> contributingSources;
 };
+
+ +### Members ### {#RTCEncodedVideoFrameMetadata-members} +
+
+ synchronizationSource of type 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 of type 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 of type sequence<unsigned long> +
+
+

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

+
+
+ +## 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} +
+
+ timestamp of type 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. +

+
+
+ data of type ArrayBuffer +
+
+

+ The encoded frame data. +

+
+
+ +### Methods ### {#RTCEncodedVideoFrame-methods} +
+
+ getMetadata() + returns the {{RTCEncodedVideoFrameMetadata}} associated with the frame. +
+
+ ## 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 {

+ +## RTCEncodedAudioFrame interface ## {#RTCEncodedAudioFrame-interface}
 [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} +
+
+ timestamp of type 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. +

+
+
+ data of type ArrayBuffer +
+
+

+ The encoded frame data. +

+
+
+ +### Methods ### {#RTCEncodedAudioFrame-methods} +
+
+ getMetadata() + returns the {{RTCEncodedAudioFrameMetadata}} associated with the frame. +
+
// New interfaces to expose JavaScript-based transforms. - +##Interfaces +
 [Exposed=DedicatedWorker]
 interface RTCTransformEvent : Event {
     readonly attribute RTCRtpScriptTransformer transformer;

From 912fa3ece427cbde7bab01f31a1b5a7a2bf0b781 Mon Sep 17 00:00:00 2001
From: Philipp Hancke 
Date: 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 Hancke Date: 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 {
- + From 43e493bd51396fd44efbb9a78e8066428cf40679 Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Mon, 3 Oct 2022 11:28:46 +0200 Subject: [PATCH 08/10] avoid linking failures --- index.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index a6b4bc1..e0086c2 100644 --- a/index.bs +++ b/index.bs @@ -417,7 +417,7 @@ interface RTCEncodedVideoFrame { class="dictionary-members">
getMetadata() - returns the {{RTCEncodedVideoFrameMetadata}} associated with the frame. + returns the metadata associated with the frame.
@@ -501,7 +501,7 @@ interface RTCEncodedAudioFrame { class="dictionary-members">
getMetadata() - returns the {{RTCEncodedAudioFrameMetadata}} associated with the frame. + returns the metadata associated with the frame.
From ace256c4561b7485b5388af8975dbd73d3b101b9 Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Mon, 3 Oct 2022 11:32:12 +0200 Subject: [PATCH 09/10] retrigger ci From 30ec9bb77121af72cd42cbb412539c1ea39ac4f7 Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Mon, 3 Oct 2022 11:39:39 +0200 Subject: [PATCH 10/10] fix html errors too --- index.bs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index e0086c2..e70ba00 100644 --- a/index.bs +++ b/index.bs @@ -417,8 +417,12 @@ interface RTCEncodedVideoFrame { class="dictionary-members">
getMetadata() - returns the metadata associated with the frame.
+
+

+ Returns the metadata associated with the frame. +

+
## RTCEncodedAudioFrameMetadata dictionary ## {#RTCEncodedAudioFrameMetadata} @@ -501,8 +505,12 @@ interface RTCEncodedAudioFrame { class="dictionary-members">
getMetadata() - returns the metadata associated with the frame.
+
+

+ Returns the metadata associated with the frame. +

+
{{RTCEncodedVideoFrameType}} Enumeration descriptionEnumeration description
Enum valueDescription