From 03df57bf14a6ef9eb7cc92743bc276dd12c639a8 Mon Sep 17 00:00:00 2001
From: Palak Agarwal
+ Create a new RTCEncodedVideoFrame from the given |originalFrame| and sets its metadata to |newMetadata|.
+
+ When called, run the following steps:
+
+ 1. Set this.`[[type]]` to |originalFrame|.`[[type]]`.
+ 1. Set this.`[[data]]` to |originalFrame|.`[[data]]`.
+ 1. Set the internal representation of metadata to |newMetadata| such that this.`[[getMetadata()]]` returns |newMetadata|.
+
+
+ Create a new RTCEncodedAudioFrame from the given |originalFrame| and sets its metadata to |newMetadata|.
+
+ When called, run the following steps:
+
+ 1. Set this.`[[data]]` to |originalFrame|.`[[data]]`.
+ 1. Set the internal representation of metadata to |newMetadata| such that this.`[[getMetadata()]]` returns |newMetadata|.
+
+
- Create a new RTCEncodedVideoFrame from the given |originalFrame| and sets its metadata to |newMetadata|.
+ Creates a new {{RTCEncodedVideoFrame}} from the given |originalFrame| and sets the internal metadata to |newMetadata|.
When called, run the following steps:
1. Set this.`[[type]]` to |originalFrame|.`[[type]]`.
1. Set this.`[[data]]` to |originalFrame|.`[[data]]`.
- 1. Set the internal representation of metadata to |newMetadata| such that this.`[[getMetadata()]]` returns |newMetadata|.
+ 1. If |newMetadata| is not empty, set the internal representation of metadata to |newMetadata| such that {{RTCEncodedVideoFrame/getMetadata()}} returns |newMetadata|. Otherwise, set the internal representation of metadata to originalFrame.`[[getMetadata()]]`.
- Create a new RTCEncodedAudioFrame from the given |originalFrame| and sets its metadata to |newMetadata|.
+ Creates a new {{RTCEncodedAudioFrame}} from the given |originalFrame| and sets the internal metadata to |newMetadata|.
When called, run the following steps:
1. Set this.`[[data]]` to |originalFrame|.`[[data]]`.
- 1. Set the internal representation of metadata to |newMetadata| such that this.`[[getMetadata()]]` returns |newMetadata|.
+ 1. If |newMetadata| is not empty, set the internal representation of metadata to |newMetadata| such that {{RTCEncodedAudioFrame/getMetadata()}} returns |newMetadata|. Otherwise, set the internal representation of metadata to originalFrame.`[[getMetadata()]]`.
+
+
### Members ### {#RTCEncodedVideoFrame-members}
[Exposed=(Window,DedicatedWorker), Serializable]
interface RTCEncodedAudioFrame {
+ constructor(RTCEncodedAudioFrame originalFrame, RTCEncodedAudioFrameMetadata newMetadata);
attribute ArrayBuffer data;
RTCEncodedAudioFrameMetadata getMetadata();
};
+### Constructor ### {#RTCEncodedAudioFrame-members}
+
+
+
### Members ### {#RTCEncodedAudioFrame-members}
[Exposed=(Window,DedicatedWorker), Serializable]
interface RTCEncodedAudioFrame {
- constructor(RTCEncodedAudioFrame originalFrame, RTCEncodedAudioFrameMetadata newMetadata);
+ constructor(RTCEncodedAudioFrame originalFrame, optional RTCEncodedAudioFrameMetadata newMetadata);
attribute ArrayBuffer data;
RTCEncodedAudioFrameMetadata getMetadata();
};
@@ -659,12 +659,12 @@ interface RTCEncodedAudioFrame {
+dictionary RTCEncodedVideoFrameMetadataOptions { + RTCEncodedVideoFrameMetadata metadata; +}; + // New interfaces to define encoded video and audio frames. Will eventually // re-use or extend the equivalent defined in WebCodecs. [Exposed=(Window,DedicatedWorker), Serializable] interface RTCEncodedVideoFrame { - constructor(RTCEncodedVideoFrame originalFrame, optional RTCEncodedVideoFrameMetadata newMetadata); + constructor(RTCEncodedVideoFrame originalFrame, optional RTCEncodedVideoFrameMetadataOptions options = {}); readonly attribute RTCEncodedVideoFrameType type; attribute ArrayBuffer data; RTCEncodedVideoFrameMetadata getMetadata(); @@ -440,15 +444,15 @@ interface RTCEncodedVideoFrame {
- Creates a new {{RTCEncodedVideoFrame}} from the given |originalFrame| and sets the internal metadata to |newMetadata|. + Creates a new {{RTCEncodedVideoFrame}} from the given |originalFrame| and sets the internal `[[metadata]]` slot to |options|`[metadata]`. When called, run the following steps: 1. Set this.`[[type]]` to |originalFrame|.`[[type]]`. 1. Let this.`[[data]]` be a new ArrayBuffer object whose `[[ArrayBufferData]]` internal slot value is |originalFrame|.`[[data]]`.`[[ArrayBufferData]]`, and whose `[[ArrayBufferByteLength]]` internal slot value is |originalFrame|.`[[data]]`.`[[ArrayBufferByteLength]]`. - 1. Let `[[metadata]]` represent the metadata associated with this newly constructed frame. + 1. Let `[[metadata]]` be the internal slot that stores the metadata associated with this newly constructed frame. 1. For each {`[[key]]`,`[[value]]`} pair of |originalFrame|.`[[getMetadata()]]`, set `[[metadata]]`.`[[key]]` to `[[value]]`. - 1. For each {`[[key]]`,`[[value]]`} pair of |newMetadata|, if the `[[value]]` exists, set `[[metadata]]`.`[[key]]` to `[[value]]`. + 1. For each {`[[key]]`,`[[value]]`} pair of |options|`[metadata]`, if the `[[value]]` exists, set `[[metadata]]`.`[[key]]` to `[[value]]`.
+dictionary RTCEncodedAudioFrameMetadataOptions { + RTCEncodedAudioFrameMetadata metadata; +}; + [Exposed=(Window,DedicatedWorker), Serializable] interface RTCEncodedAudioFrame { - constructor(RTCEncodedAudioFrame originalFrame, optional RTCEncodedAudioFrameMetadata newMetadata); + constructor(RTCEncodedAudioFrame originalFrame, optional RTCEncodedAudioFrameMetadataOptions options = {}); attribute ArrayBuffer data; RTCEncodedAudioFrameMetadata getMetadata(); }; @@ -661,14 +669,14 @@ interface RTCEncodedAudioFrame {
- Creates a new {{RTCEncodedAudioFrame}} from the given |originalFrame| and sets the internal metadata to |newMetadata|. + Creates a new {{RTCEncodedAudioFrame}} from the given |originalFrame| and sets the internal `[[metadata]]` slot to |options|`[metadata]`. When called, run the following steps: 1. Let this.`[[data]]` be a new ArrayBuffer object whose `[[ArrayBufferData]]` internal slot value is |originalFrame|.`[[data]]`.`[[ArrayBufferData]]`, and whose `[[ArrayBufferByteLength]]` internal slot value is |originalFrame|.`[[data]]`.`[[ArrayBufferByteLength]]`. - 1. Let `[[metadata]]` represent the metadata associated with this newly constructed frame. + 1. Let `[[metadata]]` be the internal slot that stores the metadata associated with this newly constructed frame. 1. For each {`[[key]]`,`[[value]]`} pair of |originalFrame|.`[[getMetadata()]]`, set `[[metadata]]`.`[[key]]` to `[[value]]`. - 1. For each {`[[key]]`,`[[value]]`} pair of |newMetadata|, if the `[[value]]` exists, set `[[metadata]]`.`[[key]]` to `[[value]]`. + 1. For each {`[[key]]`,`[[value]]`} pair of |options|`[metadata]`, if the `[[value]]` exists, set `[[metadata]]`.`[[key]]` to `[[value]]`.
- Creates a new {{RTCEncodedVideoFrame}} from the given |originalFrame| and sets the internal `[[metadata]]` slot to |options|`[metadata]`. - + Creates a new {{RTCEncodedVideoFrame}} from the given |originalFrame| and sets the internal metadata to |options|`[metadata]`. + When called, run the following steps: 1. Set this.`[[type]]` to |originalFrame|.`[[type]]`. @@ -669,7 +669,7 @@ interface RTCEncodedAudioFrame {
- Creates a new {{RTCEncodedAudioFrame}} from the given |originalFrame| and sets the internal `[[metadata]]` slot to |options|`[metadata]`.
+ Creates a new {{RTCEncodedAudioFrame}} from the given |originalFrame| and sets the internal metadata to |options|`[metadata]`.
When called, run the following steps:
From 417f89617890921a02b4a4c673b8c53060ab8538 Mon Sep 17 00:00:00 2001
From: Palak Agarwal This does a "deep-copy" here.
-dictionary RTCEncodedVideoFrameMetadataOptions {
+dictionary RTCEncodedVideoFrameOptions {
RTCEncodedVideoFrameMetadata metadata;
};
@@ -430,7 +430,7 @@ dictionary RTCEncodedVideoFrameMetadataOptions {
// re-use or extend the equivalent defined in WebCodecs.
[Exposed=(Window,DedicatedWorker), Serializable]
interface RTCEncodedVideoFrame {
- constructor(RTCEncodedVideoFrame originalFrame, optional RTCEncodedVideoFrameMetadataOptions options = {});
+ constructor(RTCEncodedVideoFrame originalFrame, optional RTCEncodedVideoFrameOptions options = {});
readonly attribute RTCEncodedVideoFrameType type;
attribute ArrayBuffer data;
RTCEncodedVideoFrameMetadata getMetadata();
@@ -450,7 +450,7 @@ interface RTCEncodedVideoFrame {
1. Set this.`[[type]]` to |originalFrame|.`[[type]]`.
1. Let this.`[[data]]` be the result of CloneArrayBuffer(|originalFrame|.`[[data]]`, 0, |originalFrame|.`[[data]]`.`[[ArrayBufferByteLength]]`).
- 1. Let `[[metadata]]` be the internal slot that stores the metadata associated with this newly constructed frame.
+ 1. Let `[[metadata]]` represent the metadata associated with this newly constructed frame.
1. For each {`[[key]]`,`[[value]]`} pair of |originalFrame|.`[[getMetadata()]]`, set `[[metadata]]`.`[[key]]` to `[[value]]`.
1. For each {`[[key]]`,`[[value]]`} pair of |options|`[metadata]`, if the `[[value]]` exists, set `[[metadata]]`.`[[key]]` to `[[value]]`.
@@ -650,13 +650,13 @@ dictionary RTCEncodedAudioFrameMetadata {
## RTCEncodedAudioFrame interface ## {#RTCEncodedAudioFrame-interface}
-dictionary RTCEncodedAudioFrameMetadataOptions {
+dictionary RTCEncodedAudioFrameOptions {
RTCEncodedAudioFrameMetadata metadata;
};
[Exposed=(Window,DedicatedWorker), Serializable]
interface RTCEncodedAudioFrame {
- constructor(RTCEncodedAudioFrame originalFrame, optional RTCEncodedAudioFrameMetadataOptions options = {});
+ constructor(RTCEncodedAudioFrame originalFrame, optional RTCEncodedAudioFrameOptions options = {});
attribute ArrayBuffer data;
RTCEncodedAudioFrameMetadata getMetadata();
};
@@ -674,7 +674,7 @@ interface RTCEncodedAudioFrame {
When called, run the following steps:
1. Let this.`[[data]]` be the result of CloneArrayBuffer(|originalFrame|.`[[data]]`, 0, |originalFrame|.`[[data]]`.`[[ArrayBufferByteLength]]`).
- 1. Let `[[metadata]]` be the internal slot that stores the metadata associated with this newly constructed frame.
+ 1. Let `[[metadata]]` represent the metadata associated with this newly constructed frame.
1. For each {`[[key]]`,`[[value]]`} pair of |originalFrame|.`[[getMetadata()]]`, set `[[metadata]]`.`[[key]]` to `[[value]]`.
1. For each {`[[key]]`,`[[value]]`} pair of |options|`[metadata]`, if the `[[value]]` exists, set `[[metadata]]`.`[[key]]` to `[[value]]`.
From 8ae67388df34eb5d288e579a61c5aac804a8cbc9 Mon Sep 17 00:00:00 2001
From: Palak Agarwal
@@ -449,10 +453,11 @@ interface RTCEncodedVideoFrame {
When called, run the following steps:
1. Set this.`[[type]]` to |originalFrame|.`[[type]]`.
- 1. Let this.`[[data]]` be the result of CloneArrayBuffer(|originalFrame|.`[[data]]`, 0, |originalFrame|.`[[data]]`.`[[ArrayBufferByteLength]]`).
+ 1. Let this.`[[data]]` be the result of [[CloneArrayBuffer]](|originalFrame|.`[[data]]`, 0, |originalFrame|.`[[data]]`.`[[ArrayBufferByteLength]]`).
1. Let `[[metadata]]` represent the metadata associated with this newly constructed frame.
1. For each {`[[key]]`,`[[value]]`} pair of |originalFrame|.`[[getMetadata()]]`, set `[[metadata]]`.`[[key]]` to `[[value]]`.
- 1. For each {`[[key]]`,`[[value]]`} pair of |options|`[metadata]`, if the `[[value]]` exists, set `[[metadata]]`.`[[key]]` to `[[value]]`.
+ 1. For each {`[[key]]`,`[[value]]`} pair of |options|`[metadata]`, if `[[value]]` is not undefined
, set `[[metadata]]`.`[[key]]` to `[[value]]`.
+
undefined
, set `[[metadata]]`.`[[key]]` to `[[value]]`.
+ This does a "deep-copy" here.
undefined
, set `[[metadata]]`.`[[key]]` to `[[value]]`.
+ 1. For each {`[[key]]`,`[[value]]`} pair of |options|`[metadata]`, set `[[metadata]]`.`[[key]]` to `[[value]]`.
This does a "deep-copy" here.
@@ -681,7 +681,7 @@ interface RTCEncodedAudioFrame { 1. Let this.`[[data]]` be the result of [[CloneArrayBuffer]](|originalFrame|.`[[data]]`, 0, |originalFrame|.`[[data]]`.`[[ArrayBufferByteLength]]`). 1. Let `[[metadata]]` represent the metadata associated with this newly constructed frame. 1. For each {`[[key]]`,`[[value]]`} pair of |originalFrame|.`[[getMetadata()]]`, set `[[metadata]]`.`[[key]]` to `[[value]]`. - 1. For each {`[[key]]`,`[[value]]`} pair of |options|`[metadata]`, if `[[value]]` is notundefined
, set `[[metadata]]`.`[[key]]` to `[[value]]`.
+ 1. For each {`[[key]]`,`[[value]]`} pair of |options|`[metadata]`, set `[[metadata]]`.`[[key]]` to `[[value]]`.
This does a "deep-copy" here.
From f229c33a6929d74338e11ce85197edda3436950f Mon Sep 17 00:00:00 2001 From: Palak Agarwal- Creates a new {{RTCEncodedVideoFrame}} from the given |originalFrame| and sets the internal metadata to |options|`[metadata]`. + Creates a new {{RTCEncodedVideoFrame}} from the given |originalFrame| and |options|`[metadata]`. The newly created frame is completely independent of the + |originalFrame| with its `[[data]]` being a deep copy of |originalFrame|.`[[data]]`. The new frame's `[[metadata]]` is a deep copy of |originalFrame|.`[[metadata]]`, with + any fields replaced with deep copies of the fields present in |options|`[metadata]`. When called, run the following steps: @@ -674,8 +676,10 @@ interface RTCEncodedAudioFrame {
- Creates a new {{RTCEncodedAudioFrame}} from the given |originalFrame| and sets the internal metadata to |options|`[metadata]`.
-
+ Creates a new {{RTCEncodedAudioFrame}} from the given |originalFrame| and |options|`[metadata]`. The newly created frame is completely independent of the
+ |originalFrame| with its `[[data]]` being a deep copy of |originalFrame|.`[[data]]`. The new frame's `[[metadata]]` is a deep copy of |originalFrame|.`[[metadata]]`, with
+ any fields replaced with deep copies of the fields present in |options|`[metadata]`.
+
When called, run the following steps:
1. Let this.`[[data]]` be the result of [[CloneArrayBuffer]](|originalFrame|.`[[data]]`, 0, |originalFrame|.`[[data]]`.`[[ArrayBufferByteLength]]`).
From 18c1b3e5c86175dd8b7b0293e8059bfcbdc2beb1 Mon Sep 17 00:00:00 2001
From: Palak Agarwal
- Creates a new {{RTCEncodedVideoFrame}} from the given |originalFrame| and |options|`[metadata]`. The newly created frame is completely independent of the
- |originalFrame| with its `[[data]]` being a deep copy of |originalFrame|.`[[data]]`. The new frame's `[[metadata]]` is a deep copy of |originalFrame|.`[[metadata]]`, with
- any fields replaced with deep copies of the fields present in |options|`[metadata]`.
+ Creates a new {{RTCEncodedVideoFrame}} from the given |originalFrame| and
+ |options|.`[metadata]`. The newly created frame is completely independent of
+ |originalFrame|, with its `[[data]]` being a deep copy of |originalFrame|.`[[data]]`.
+ The new frame's `[[metadata]]` is a deep copy of |originalFrame|.`[[metadata]]`, with
+ fields replaced with deep copies of the fields present in |options|.`[metadata]`.
When called, run the following steps:
@@ -458,7 +460,7 @@ interface RTCEncodedVideoFrame {
1. Let this.`[[data]]` be the result of [[CloneArrayBuffer]](|originalFrame|.`[[data]]`, 0, |originalFrame|.`[[data]]`.`[[ArrayBufferByteLength]]`).
1. Let `[[metadata]]` represent the metadata associated with this newly constructed frame.
1. For each {`[[key]]`,`[[value]]`} pair of |originalFrame|.`[[getMetadata()]]`, set `[[metadata]]`.`[[key]]` to `[[value]]`.
- 1. For each {`[[key]]`,`[[value]]`} pair of |options|`[metadata]`, set `[[metadata]]`.`[[key]]` to `[[value]]`.
+ 1. For each {`[[key]]`,`[[value]]`} pair of |options|.`[metadata]`, set `[[metadata]]`.`[[key]]` to `[[value]]`.
This does a "deep-copy" here.
- Creates a new {{RTCEncodedAudioFrame}} from the given |originalFrame| and |options|`[metadata]`. The newly created frame is completely independent of the - |originalFrame| with its `[[data]]` being a deep copy of |originalFrame|.`[[data]]`. The new frame's `[[metadata]]` is a deep copy of |originalFrame|.`[[metadata]]`, with - any fields replaced with deep copies of the fields present in |options|`[metadata]`. + Creates a new {{RTCEncodedAudioFrame}} from the given |originalFrame| and + |options|.`[metadata]`. The newly created frame is completely independent of + |originalFrame|, with its `[[data]]` being a deep copy of |originalFrame|.`[[data]]`. + The new frame's `[[metadata]]` is a deep copy of |originalFrame|.`[[metadata]]`, with + fields replaced with deep copies of the fields present in |options|.`[metadata]`. When called, run the following steps: 1. Let this.`[[data]]` be the result of [[CloneArrayBuffer]](|originalFrame|.`[[data]]`, 0, |originalFrame|.`[[data]]`.`[[ArrayBufferByteLength]]`). 1. Let `[[metadata]]` represent the metadata associated with this newly constructed frame. 1. For each {`[[key]]`,`[[value]]`} pair of |originalFrame|.`[[getMetadata()]]`, set `[[metadata]]`.`[[key]]` to `[[value]]`. - 1. For each {`[[key]]`,`[[value]]`} pair of |options|`[metadata]`, set `[[metadata]]`.`[[key]]` to `[[value]]`. + 1. For each {`[[key]]`,`[[value]]`} pair of |options|.`[metadata]`, set `[[metadata]]`.`[[key]]` to `[[value]]`.
This does a "deep-copy" here.
From 429171d1d4c74ae449105bab70e51086dbcabb94 Mon Sep 17 00:00:00 2001 From: Palak AgarwalThis does a "deep-copy" here.
+ 1. For each {`[[key]]`,`[[value]]`} pair of |originalFrame|.`[[getMetadata()]]`, set `[[metadata]]`.`[[key]]` to a deep copy of `[[value]]`. + 1. For each {`[[key]]`,`[[value]]`} pair of |options|.`[metadata]`, set `[[metadata]]`.`[[key]]` to a deep copy of `[[value]]`.This does a "deep-copy" here.
+ 1. For each {`[[key]]`,`[[value]]`} pair of |originalFrame|.`[[getMetadata()]]`, set `[[metadata]]`.`[[key]]` to a deep copy of `[[value]]`. + 1. For each {`[[key]]`,`[[value]]`} pair of |options|.`[metadata]`, set `[[metadata]]`.`[[key]]` to a deep copy of `[[value]]`.