@@ -186,10 +186,11 @@ The <dfn>processorPull</dfn> algorithm is given a |processor| as input. It is de
186
186
187
187
The <dfn>maybeReadFrame</dfn> algorithm is given a |processor| as input. It is defined by the following steps:
188
188
1. If |processor|.`[[queue]] ` is [=queue/empty=] , abort these steps.
189
- 2. If |processor|.`[[numPendingReads]] ` equals zero, abort these steps.
190
- 3. [=queue/Dequeue=] a frame from |processor|.`[[queue]] ` and [=ReadableStream/Enqueue=] it in |processor|.{{MediaStreamTrackProcessor/readable}} .
191
- 4. Decrement |processor|.`[[numPendingReads]] ` by 1.
192
- 5. Go to step 1.
189
+ 1. If |processor|.`[[numPendingReads]] ` equals zero, abort these steps.
190
+ 1. Let |frame| be the result of [=queue/dequeueing=] a frame media data from |processor|.`[[queue]] `.
191
+ 1. [=ReadableStream/Enqueue=] |frame| in |processor|.{{MediaStreamTrackProcessor/readable}} .
192
+ 1. Decrement |processor|.`[[numPendingReads]] ` by 1.
193
+ 1. Go to step 1.
193
194
194
195
The <dfn>processorCancel</dfn> algorithm is given a |processor| as input.
195
196
It is defined by running the following steps:
@@ -214,8 +215,10 @@ with |processor| as parameter.
214
215
215
216
The <dfn>handleNewFrame</dfn> algorithm is given a |processor| as input.
216
217
It is defined by running the following steps:
217
- 1. If |processor|.`[[queue]] ` has |processor|.`[[maxBufferSize]] ` elements, [=queue/dequeue=] an item from |processor|.`[[queue]] `.
218
- 2. [=queue/Enqueue=] the new frame in |processor|.`[[queue]] `.
218
+ 1. If |processor|.`[[queue]] ` has |processor|.`[[maxBufferSize]] ` elements, run the following steps:
219
+ 1. Let |droppedFrame| be the result of [=queue/dequeueing=] |processor|.`[[queue]] `.
220
+ 1. Run the [=Close VideoFrame=] algorithm with |droppedFrame|.
221
+ 2. [=queue/Enqueue=] the new frame media data in |processor|.`[[queue]] `.
219
222
3. [=Queue a task=] to run the [=maybeReadFrame=] algorithm with |processor| as parameter.
220
223
221
224
At any time, the UA MAY [=list/remove=] any frame from |processor|.`[[queue]] `.
@@ -301,7 +304,9 @@ is accessed for the first time, it MUST be initialized with the following steps:
301
304
The <dfn>writeFrame</dfn> algorithm is given a |generator| and a |frame| as input. It is defined by running the following steps:
302
305
1. If |frame| is not a {{VideoFrame}} object, return [=a promise rejected with=] a {{TypeError}} .
303
306
1. If the value of |frame|’s {{platform object/[[Detached]]}} internal slot is true, return [=a promise rejected with=] a {{TypeError}} .
304
- 1. If |generator|.`[[isMuted]] ` is false, send the media data backing |frame| to all live tracks sourced from |generator|.
307
+ 1. If |generator|.`[[isMuted]] ` is false, for each live track sourced from |generator|, named |track|, run the following steps:
308
+ 1. Let |clone| be the result of running the [=Clone videoFrame=] algorithm with |frame|.
309
+ 1. Send |clone| to |track|.
305
310
1. Run the [=Close VideoFrame=] algorithm with |frame|.
306
311
1. Return [=a promise resolved with=] undefined.
307
312
0 commit comments