@@ -108,6 +108,12 @@ associated {{ReadableStream}} only when a read request has been issued on
108
108
the stream. The idea is to avoid the stream's internal buffering, which
109
109
does not give the UA enough flexibility to choose the buffering policy.
110
110
111
+ <p class="note">
112
+ Authors are encouraged to call close() on output {{VideoFrame|VideoFrames}} immediately when frames are no longer needed.
113
+ The underlying media resources are owned by the {{MediaStreamTrack}} 's source.
114
+ Failing to release them (or waiting for garbage collection) can cause the source to stop emitting new {{VideoFrame|VideoFrames}} .
115
+ </p>
116
+
111
117
### Interface definition ### {#track-processor-interface}
112
118
113
119
<pre class="idl">
@@ -224,13 +230,11 @@ It is defined by running the following steps:
224
230
At any time, the UA MAY [=list/remove=] any frame from |processor|.`[[queue]] `.
225
231
The UA may decide to remove frames from |processor|.`[[queue]] `, for example,
226
232
to prevent resource exhaustion or to improve performance in certain situations.
227
- </dd>
228
233
229
234
<p class="note">
230
235
The application may detect that frames have been dropped by noticing that there
231
236
is a gap in the timestamps of the frames.
232
237
</p>
233
- </dl>
234
238
235
239
When the `[[track]] ` of a {{MediaStreamTrackProcessor}} |processor|
236
240
[=track|ends=] , the [=processorClose=] algorithm must be
@@ -310,19 +314,22 @@ The <dfn>writeFrame</dfn> algorithm is given a |generator| and a |frame| as inpu
310
314
1. Run the [=Close VideoFrame=] algorithm with |frame|.
311
315
1. Return [=a promise resolved with=] undefined.
312
316
317
+ The <dfn>closeWritable</dfn> algorithm is given a |generator| as input.
318
+ It is defined by running the following steps.
319
+ 1. For each track `t` sourced from |generator|, [=track|end=] `t`.
320
+ 2. Return [=a promise resolved with=] undefined.
321
+
322
+ </dd>
323
+ </dl>
324
+
313
325
<p class="note">
314
326
When the media data is sent to a track, the UA may apply processing
315
327
(e.g., cropping and downscaling) to ensure that the media data sent
316
328
to the track satisfies the track's constraints. Each track may receive a
317
329
different version of the media data depending on its constraints.
318
330
</p>
319
331
320
- The <dfn>closeWritable</dfn> algorithm is given a |generator| as input.
321
- It is defined by running the following steps.
322
- 1. For each track `t` sourced from |generator|, [=track|end=] `t`.
323
- 2. Return [=a promise resolved with=] undefined.
324
-
325
- </dd>
332
+ <dl>
326
333
<dt> <dfn attribute for=VideoTrackGenerator>muted</dfn> </dt>
327
334
<dd> Mutes the {{VideoTrackGenerator}} . The getter steps are to return
328
335
[=this=] .`[[isMuted]] `. The setter steps, given a value |newValue|, are as follows:
0 commit comments