Skip to content

Commit c85fc84

Browse files
authored
Merge pull request #155 from fippo/describe-all-the-things
describe (some) fields
2 parents 7f8ae89 + 30ec9bb commit c85fc84

File tree

1 file changed

+212
-6
lines changed

1 file changed

+212
-6
lines changed

index.bs

Lines changed: 212 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ The <dfn method for="SFrameTransform">setEncryptionKey(|key|, |keyID|)</dfn> met
267267

268268
# RTCRtpScriptTransform # {#scriptTransform}
269269

270+
## <dfn>RTCEncodedVideoFrameType</dfn> dictionary ## {#RTCEncodedVideoFrameType}
270271
<pre class="idl">
271272
// New enum for video frame types. Will eventually re-use the equivalent defined
272273
// by WebCodecs.
@@ -275,7 +276,51 @@ enum RTCEncodedVideoFrameType {
275276
"key",
276277
"delta",
277278
};
278-
279+
</pre>
280+
<table data-link-for="RTCEncodedVideoFrameType" data-dfn-for=
281+
"RTCEncodedVideoFrameType" class="simple">
282+
<caption>Enumeration description</caption>
283+
<thead>
284+
<tr>
285+
<th>Enum value</th><th>Description</th>
286+
</tr>
287+
</thead>
288+
<tbody>
289+
<tr>
290+
<td>
291+
<dfn data-idl="">empty</dfn>
292+
</td>
293+
<td>
294+
<p>
295+
This frame contains no data.
296+
</p>
297+
</td>
298+
</tr>
299+
<tr>
300+
<td>
301+
<dfn data-idl="">key</dfn>
302+
</td>
303+
<td>
304+
<p>
305+
This frame can be decoded without reference to any other frames.
306+
</p>
307+
</td>
308+
</tr>
309+
<tr>
310+
<td>
311+
<dfn data-idl="">delta</dfn>
312+
</td>
313+
<td>
314+
<p>
315+
This frame references another frame and can not be decoded without that frame.
316+
</p>
317+
</td>
318+
</tr>
319+
</tbody>
320+
</table>
321+
322+
## <dfn>RTCEncodedVideoFrameMetadata</dfn> dictionary ## {#RTCEncodedVideoFrameMetadata}
323+
<pre class="idl">
279324
dictionary RTCEncodedVideoFrameMetadata {
280325
long long frameId;
281326
sequence&lt;long long&gt; dependencies;
@@ -287,33 +332,194 @@ dictionary RTCEncodedVideoFrameMetadata {
287332
octet payloadType;
288333
sequence&lt;unsigned long&gt; contributingSources;
289334
};
335+
</pre>
290336

337+
### Members ### {#RTCEncodedVideoFrameMetadata-members}
338+
<dl data-link-for="RTCEncodedVideoFrameMetadata"
339+
data-dfn-for="RTCEncodedVideoFrameMetadata"
340+
class="dictionary-members">
341+
<dt>
342+
<dfn>synchronizationSource</dfn> of type <span class="idlMemberType">unsigned long</span>
343+
</dt>
344+
<dd>
345+
<p>
346+
The synchronization source (ssrc) identifier is an unsigned integer value per [[RFC3550]]
347+
used to identify the stream of RTP packets that the encoded frame object is describing.
348+
</p>
349+
</dd>
350+
<dt>
351+
<dfn>payloadType</dfn> of type <span class="idlMemberType">octet</span>
352+
</dt>
353+
<dd>
354+
<p>
355+
The payload type is an unsigned integer value in the range from 0 to 127 per [[RFC3550]]
356+
that is used to describe the format of the RTP payload.
357+
</p>
358+
</dd>
359+
<dt>
360+
<dfn>contributingSources</dfn> of type <span class=
361+
"idlMemberType">sequence&lt;unsigned long&gt;</span>
362+
</dt>
363+
<dd>
364+
<p>
365+
The list of contribution sources (csrc list) as defined in [[RFC3550]].
366+
</p>
367+
</dd>
368+
</dl>
369+
370+
371+
## <dfn>RTCEncodedVideoFrame</dfn> interface ## {#RTCEncodedVideoFrame-interface}
372+
<pre class="idl">
291373
// New interfaces to define encoded video and audio frames. Will eventually
292374
// re-use or extend the equivalent defined in WebCodecs.
293375
[Exposed=(Window,DedicatedWorker)]
294376
interface RTCEncodedVideoFrame {
295377
readonly attribute RTCEncodedVideoFrameType type;
296-
readonly attribute unsigned long timestamp; // RTP timestamp.
378+
readonly attribute unsigned long timestamp;
297379
attribute ArrayBuffer data;
298380
RTCEncodedVideoFrameMetadata getMetadata();
299381
};
382+
</pre>
300383

384+
### Members ### {#RTCEncodedVideoFrame-members}
385+
<dl data-link-for="RTCEncodedVideoFrame"
386+
data-dfn-for="RTCEncodedVideoFrame"
387+
class="dictionary-members">
388+
<dt>
389+
<dfn>type</dfn> of type <span class="idlMemberType">RTCEncodedVideoFrameType</span>
390+
</dt>
391+
<dd>
392+
<p>
393+
The type attribute allows the application to determine when a key frame is being
394+
sent or received.
395+
</p>
396+
</dd>
397+
398+
<dt>
399+
<dfn>timestamp</dfn> of type <span class="idlMemberType">unsigned long</span>
400+
</dt>
401+
<dd>
402+
<p>
403+
The RTP timestamp identifier is an unsigned integer value per [[RFC3550]]
404+
that reflects the sampling instant of the first octet in the RTP data packet.
405+
</p>
406+
</dd>
407+
<dt>
408+
<dfn>data</dfn> of type <span class="idlMemberType">ArrayBuffer</span>
409+
</dt>
410+
<dd>
411+
<p>
412+
The encoded frame data.
413+
</p>
414+
</dd>
415+
</dl>
416+
417+
### Methods ### {#RTCEncodedVideoFrame-methods}
418+
<dl data-link-for="RTCEncodedVideoFrame"
419+
data-dfn-for="RTCEncodedVideoFrame"
420+
class="dictionary-members">
421+
<dt>
422+
<dfn data-dfn-for="RTCEncodedVideoFrame" data-dfn-type="method">getMetadata()</dfn>
423+
</dt>
424+
<dd>
425+
<p>
426+
Returns the metadata associated with the frame.
427+
</p>
428+
</dd>
429+
</dl>
430+
431+
## <dfn>RTCEncodedAudioFrameMetadata</dfn> dictionary ## {#RTCEncodedAudioFrameMetadata}
432+
<pre class="idl">
301433
dictionary RTCEncodedAudioFrameMetadata {
302434
unsigned long synchronizationSource;
303435
octet payloadType;
304436
sequence&lt;unsigned long&gt; contributingSources;
305437
};
306-
438+
</pre>
439+
### Members ### {#RTCEncodedAudioFrameMetadata-members}
440+
<dl data-link-for="RTCEncodedAudioFrameMetadata"
441+
data-dfn-for="RTCEncodedAudioFrameMetadata"
442+
class="dictionary-members">
443+
<dt>
444+
<dfn>synchronizationSource</dfn> of type <span class="idlMemberType">unsigned long</span>
445+
</dt>
446+
<dd>
447+
<p>
448+
The synchronization source (ssrc) identifier is an unsigned integer value per [[RFC3550]]
449+
used to identify the stream of RTP packets that the encoded frame object is describing.
450+
</p>
451+
</dd>
452+
<dt>
453+
<dfn>payloadType</dfn> of type <span class="idlMemberType">octet</span>
454+
</dt>
455+
<dd>
456+
<p>
457+
The payload type is an unsigned integer value in the range from 0 to 127 per [[RFC3550]]
458+
that is used to describe the format of the RTP payload.
459+
</p>
460+
</dd>
461+
<dt>
462+
<dfn>contributingSources</dfn> of type <span class=
463+
"idlMemberType">sequence&lt;unsigned long&gt;</span>
464+
</dt>
465+
<dd>
466+
<p>
467+
The list of contribution sources (csrc list) as defined in [[RFC3550]].
468+
</p>
469+
</dd>
470+
</dl>
471+
472+
## <dfn>RTCEncodedAudioFrame</dfn> interface ## {#RTCEncodedAudioFrame-interface}
473+
<pre class="idl">
307474
[Exposed=(Window,DedicatedWorker)]
308475
interface RTCEncodedAudioFrame {
309-
readonly attribute unsigned long timestamp; // RTP timestamp.
476+
readonly attribute unsigned long timestamp;
310477
attribute ArrayBuffer data;
311478
RTCEncodedAudioFrameMetadata getMetadata();
312479
};
480+
</pre>
313481

482+
### Members ### {#RTCEncodedAudioFrame-members}
483+
<dl data-link-for="RTCEncodedAudioFrame"
484+
data-dfn-for="RTCEncodedAudioFrame"
485+
class="dictionary-members">
486+
<dt>
487+
<dfn>timestamp</dfn> of type <span class="idlMemberType">unsigned long</span>
488+
</dt>
489+
<dd>
490+
<p>
491+
The RTP timestamp identifier is an unsigned integer value per [[RFC3550]]
492+
that reflects the sampling instant of the first octet in the RTP data packet.
493+
</p>
494+
</dd>
495+
<dt>
496+
<dfn>data</dfn> of type <span class="idlMemberType">ArrayBuffer</span>
497+
</dt>
498+
<dd>
499+
<p>
500+
The encoded frame data.
501+
</p>
502+
</dd>
503+
</dl>
504+
505+
### Methods ### {#RTCEncodedAudioFrame-methods}
506+
<dl data-link-for="RTCEncodedAudioFrame"
507+
data-dfn-for="RTCEncodedAudioFrame"
508+
class="dictionary-members">
509+
<dt>
510+
<dfn data-dfn-for="RTCEncodedAudioFrame" data-dfn-type="method">getMetadata()</dfn>
511+
</dt>
512+
<dd>
513+
<p>
514+
Returns the metadata associated with the frame.
515+
</p>
516+
</dd>
517+
</dl>
314518

315-
// New interfaces to expose JavaScript-based transforms.
316519

520+
// New interfaces to expose JavaScript-based transforms.
521+
##Interfaces
522+
<pre class="idl">
317523
[Exposed=DedicatedWorker]
318524
interface RTCTransformEvent : Event {
319525
readonly attribute RTCRtpScriptTransformer transformer;
@@ -418,7 +624,7 @@ The <dfn>generate key frame algorithm</dfn>, given |promise|, |encoder| and |rid
418624
For any {{RTCRtpScriptTransformer}} named |transformer|, the following steps are run just before any |frame| is enqueued in |transformer|.`[[readable]]`:
419625
1. Let |encoder| be |transformer|.`[[encoder]]`.
420626
1. If |encoder| or |encoder|.`[[pendingKeyFrameTasks]]` is undefined, abort these steps.
421-
1. If |frame| is not a video key frame, abort these steps.
627+
1. If |frame| is not a video {{RTCEncodedVideoFrameType/"key"}} frame, abort these steps.
422628
1. For each |task| in |encoder|.`[[pendingKeyFrameTasks]]`, run the following steps:
423629
1. If |frame| was generated by a video encoder identified by |task|.`[[rid]]`, run the following steps:
424630
1. Remove |task| from |encoder|.`[[pendingKeyFrameTasks]]`.

0 commit comments

Comments
 (0)