Skip to content

Commit 1a53af2

Browse files
committed
Fix bikeshed-isms
bikeshed seems to not like multi-line attributes (possibly when used with markdown) also correctly set type of several definitions
1 parent 5c7ab84 commit 1a53af2

File tree

1 file changed

+50
-62
lines changed

1 file changed

+50
-62
lines changed

index.bs

Lines changed: 50 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ argument, ensure that the codec is disabled and produces no output.
8686
At construction of each {{RTCRtpSender}} or {{RTCRtpReceiver}}, run the following steps:
8787
2. Initialize [=this=].`[[transform]]` to null.
8888
3. Initialize [=this=].`[[readable]]` to a new {{ReadableStream}}.
89-
4. <a dfn for="ReadableStream">Set up</a> [=this=].`[[readable]]`. [=this=].`[[readable]]` is provided frames using the [=readEncodedData=] algorithm given |this| as parameter.
89+
4. <a dfn for="ReadableStream">Set up</a> [=this=].`[[readable]]`. [=this=].`[[readable]]` is provided frames using the [$readEncodedData$] algorithm given |this| as parameter.
9090
5. Set [=this=].`[[readable]]`.`[[owner]]` to |this|.
9191
6. Initialize [=this=].`[[writable]]` to a new {{WritableStream}}.
92-
7. <a dfn for="WritableStream">Set up</a> [=this=].`[[writable]]` with its [=WritableStream/set up/writeAlgorithm=] set to [=writeEncodedData=] given |this| as parameter and its [=WritableStream/set up/sizeAlgorithm=] to an algorithm that returns <code>0</code>.
92+
7. <a dfn for="WritableStream">Set up</a> [=this=].`[[writable]]` with its [=WritableStream/set up/writeAlgorithm=] set to [$writeEncodedData$] given |this| as parameter and its [=WritableStream/set up/sizeAlgorithm=] to an algorithm that returns <code>0</code>.
9393
<p class="note">Chunk size is set to 0 to explictly disable streams backpressure on the write side.</p>
9494
8. Set [=this=].`[[writable]]`.`[[owner]]` to |this|.
9595
9. Initialize [=this=].`[[pipeToController]]` to null.
@@ -103,15 +103,15 @@ At construction of each {{RTCRtpSender}} or {{RTCRtpReceiver}}, run the followin
103103

104104
### Stream processing ### {#stream-processing}
105105

106-
The <dfn>readEncodedData</dfn> algorithm is given a |rtcObject| as parameter. It is defined by running the following steps:
106+
The <dfn abstract-op>readEncodedData</dfn> algorithm is given a |rtcObject| as parameter. It is defined by running the following steps:
107107
1. Wait for a frame to be produced by |rtcObject|'s encoder if it is a {{RTCRtpSender}} or |rtcObject|'s packetizer if it is a {{RTCRtpReceiver}}.
108108
1. Increment |rtcObject|.`[[lastEnqueuedFrameCounter]]` by <code>1</code>.
109109
1. Let |frame| be the newly produced frame.
110110
1. Set |frame|.`[[owner]]` to |rtcObject|.
111111
1. Set |frame|.`[[counter]]` to |rtcObject|.`[[lastEnqueuedFrameCounter]]`.
112112
1. [=ReadableStream/Enqueue=] |frame| in |rtcObject|.`[[readable]]`.
113113

114-
The <dfn>writeEncodedData</dfn> algorithm is given a |rtcObject| as parameter and a |frame| as input. It is defined by running the following steps:
114+
The <dfn abstract-op>writeEncodedData</dfn> algorithm is given a |rtcObject| as parameter and a |frame| as input. It is defined by running the following steps:
115115
1. If |frame|.`[[owner]]` is not equal to |rtcObject|, abort these steps and return [=a promise resolved with=] undefined. A processor cannot create frames, or move frames between streams.
116116
1. If |frame|.`[[counter]]` is equal or smaller than |rtcObject|.`[[lastReceivedFrameCounter]]`, abort these steps and return [=a promise resolved with=] undefined. A processor cannot reorder frames, although it may delay them or drop them.
117117
1. Set |rtcObject|.`[[lastReceivedFrameCounter]]` to |frame|`[[counter]]`.
@@ -123,18 +123,18 @@ The <dfn>writeEncodedData</dfn> algorithm is given a |rtcObject| as parameter an
123123
* If |rtcObject| is a {{RTCRtpReceiver}}, enqueue |frameCopy| it to |rtcObject|'s decoder, to be processed [=in parallel=].
124124
1. Return [=a promise resolved with=] undefined.
125125

126-
On sender side, as part of [=readEncodedData=], frames produced by |rtcObject|'s encoder MUST be enqueued in |rtcObject|.`[[readable]]` in the encoder's output order.
127-
As [=writeEncodedData=] ensures that the transform cannot reorder frames, the encoder's output order is also the order followed by packetizers to generate RTP packets and assign RTP packet sequence numbers.
126+
On sender side, as part of [$readEncodedData$], frames produced by |rtcObject|'s encoder MUST be enqueued in |rtcObject|.`[[readable]]` in the encoder's output order.
127+
As [$writeEncodedData$] ensures that the transform cannot reorder frames, the encoder's output order is also the order followed by packetizers to generate RTP packets and assign RTP packet sequence numbers.
128128

129-
On receiver side, as part of [=readEncodedData=], frames produced by |rtcObject|'s packetizer MUST be enqueued in |rtcObject|.`[[readable]]` in the same encoder's output order.
129+
On receiver side, as part of [$readEncodedData$], frames produced by |rtcObject|'s packetizer MUST be enqueued in |rtcObject|.`[[readable]]` in the same encoder's output order.
130130
To ensure the order is respected, the depacketizer will typically use RTP packet sequence numbers to reorder RTP packets as needed before enqueuing frames in |rtcObject|.`[[readable]]`.
131-
As [=writeEncodedData=] ensures that the transform cannot reorder frames, this will be the order expected by |rtcObject|'s decoder.
131+
As [$writeEncodedData$] ensures that the transform cannot reorder frames, this will be the order expected by |rtcObject|'s decoder.
132132

133133
## Extension attribute ## {#attribute}
134134

135135
A RTCRtpTransform has two private slots called `[[readable]]` and `[[writable]]`.
136136

137-
Each RTCRtpTransform has an <dfn>association steps</dfn> set, which is empty by default.
137+
Each RTCRtpTransform has an <dfn abstract-op for=RTCRtpTransform>association steps</dfn> set, which is empty by default.
138138

139139
The <dfn attribute for="RTCRtpSender,RTCRtpReceiver">transform</dfn> getter steps are:
140140
1. Return [=this=].`[[transform]]`.
@@ -146,14 +146,14 @@ The `transform` setter steps are:
146146
4. Let |writer| be the result of [=WritableStream/getting a writer=] for |checkedTransform|.`[[writable]]`.
147147
5. Initialize |newPipeToController| to a new {{AbortController}}.
148148
6. If [=this=].`[[pipeToController]]` is not null, run the following steps:
149-
1. [=AbortSignal/Add=] the [=chain transform algorithm=] to [=this=].`[[pipeToController]]`.signal.
149+
1. [=AbortSignal/Add=] the [$chain transform algorithm$] to [=this=].`[[pipeToController]]`.signal.
150150
2. [=AbortSignal/signal abort=] [=this=].`[[pipeToController]]`.signal.
151-
7. Else, run the [=chain transform algorithm=] steps.
151+
7. Else, run the [$chain transform algorithm$] steps.
152152
8. Set [=this=].`[[pipeToController]]` to |newPipeToController|.
153153
9. Set [=this=].`[[transform]]` to |transform|.
154-
10. Run the steps in the set of [=association steps=] of |transform| with [=this=].
154+
10. Run the steps in the set of [$association steps$] of |transform| with [=this=].
155155

156-
The <dfn>chain transform algorithm</dfn> steps are defined as:
156+
The <dfn abstract-op>chain transform algorithm</dfn> steps are defined as:
157157
1. If |newPipeToController| is [=AbortSignal/aborted=], abort these steps.
158158
2. [=ReadableStreamDefaultReader/Release=] |reader|.
159159
3. [=WritableStreamDefaultWriter/Release=] |writer|.
@@ -267,7 +267,7 @@ The <dfn method for="SFrameTransform">setEncryptionKey(|key|, |keyID|)</dfn> met
267267

268268
# RTCRtpScriptTransform # {#scriptTransform}
269269

270-
## <dfn>RTCEncodedVideoFrameType</dfn> dictionary ## {#RTCEncodedVideoFrameType}
270+
## <dfn enum>RTCEncodedVideoFrameType</dfn> dictionary ## {#RTCEncodedVideoFrameType}
271271
<pre class="idl">
272272
// New enum for video frame types. Will eventually re-use the equivalent defined
273273
// by WebCodecs.
@@ -277,8 +277,7 @@ enum RTCEncodedVideoFrameType {
277277
"delta",
278278
};
279279
</pre>
280-
<table data-link-for="RTCEncodedVideoFrameType" data-dfn-for=
281-
"RTCEncodedVideoFrameType" class="simple">
280+
<table dfn-for="RTCEncodedVideoFrameType" class="simple">
282281
<caption>Enumeration description</caption>
283282
<thead>
284283
<tr>
@@ -288,7 +287,7 @@ enum RTCEncodedVideoFrameType {
288287
<tbody>
289288
<tr>
290289
<td>
291-
<dfn data-idl="">empty</dfn>
290+
<dfn enum-value>empty</dfn>
292291
</td>
293292
<td>
294293
<p>
@@ -298,7 +297,7 @@ enum RTCEncodedVideoFrameType {
298297
</tr>
299298
<tr>
300299
<td>
301-
<dfn data-idl="">key</dfn>
300+
<dfn enum-value>key</dfn>
302301
</td>
303302
<td>
304303
<p>
@@ -308,7 +307,7 @@ enum RTCEncodedVideoFrameType {
308307
</tr>
309308
<tr>
310309
<td>
311-
<dfn data-idl="">delta</dfn>
310+
<dfn enum-value>delta</dfn>
312311
</td>
313312
<td>
314313
<p>
@@ -319,7 +318,7 @@ enum RTCEncodedVideoFrameType {
319318
</tbody>
320319
</table>
321320

322-
## <dfn>RTCEncodedVideoFrameMetadata</dfn> dictionary ## {#RTCEncodedVideoFrameMetadata}
321+
## <dfn dictionary>RTCEncodedVideoFrameMetadata</dfn> dictionary ## {#RTCEncodedVideoFrameMetadata}
323322
<pre class="idl">
324323
dictionary RTCEncodedVideoFrameMetadata {
325324
unsigned long long frameId;
@@ -335,11 +334,10 @@ dictionary RTCEncodedVideoFrameMetadata {
335334
</pre>
336335

337336
### Members ### {#RTCEncodedVideoFrameMetadata-members}
338-
<dl data-link-for="RTCEncodedVideoFrameMetadata"
339-
data-dfn-for="RTCEncodedVideoFrameMetadata"
340-
class="dictionary-members">
337+
338+
<dl dfn-for="RTCEncodedVideoFrameMetadata" class="dictionary-members">
341339
<dt>
342-
<dfn>synchronizationSource</dfn> of type <span class="idlMemberType">unsigned long</span>
340+
<dfn dict-member>synchronizationSource</dfn> of type <span class="idlMemberType">unsigned long</span>
343341
</dt>
344342
<dd>
345343
<p>
@@ -348,7 +346,7 @@ dictionary RTCEncodedVideoFrameMetadata {
348346
</p>
349347
</dd>
350348
<dt>
351-
<dfn>payloadType</dfn> of type <span class="idlMemberType">octet</span>
349+
<dfn dict-member>payloadType</dfn> of type <span class="idlMemberType">octet</span>
352350
</dt>
353351
<dd>
354352
<p>
@@ -357,7 +355,7 @@ dictionary RTCEncodedVideoFrameMetadata {
357355
</p>
358356
</dd>
359357
<dt>
360-
<dfn>contributingSources</dfn> of type <span class=
358+
<dfn dict-member>contributingSources</dfn> of type <span class=
361359
"idlMemberType">sequence&lt;unsigned long&gt;</span>
362360
</dt>
363361
<dd>
@@ -368,7 +366,7 @@ dictionary RTCEncodedVideoFrameMetadata {
368366
</dl>
369367

370368

371-
## <dfn>RTCEncodedVideoFrame</dfn> interface ## {#RTCEncodedVideoFrame-interface}
369+
## <dfn interface>RTCEncodedVideoFrame</dfn> interface ## {#RTCEncodedVideoFrame-interface}
372370
<pre class="idl">
373371
// New interfaces to define encoded video and audio frames. Will eventually
374372
// re-use or extend the equivalent defined in WebCodecs.
@@ -382,11 +380,9 @@ interface RTCEncodedVideoFrame {
382380
</pre>
383381

384382
### Members ### {#RTCEncodedVideoFrame-members}
385-
<dl data-link-for="RTCEncodedVideoFrame"
386-
data-dfn-for="RTCEncodedVideoFrame"
387-
class="dictionary-members">
383+
<dl dfn-for="RTCEncodedVideoFrame" class="dictionary-members">
388384
<dt>
389-
<dfn>type</dfn> of type <span class="idlMemberType">RTCEncodedVideoFrameType</span>
385+
<dfn attribute>type</dfn> of type <span class="idlMemberType">RTCEncodedVideoFrameType</span>
390386
</dt>
391387
<dd>
392388
<p>
@@ -396,7 +392,7 @@ interface RTCEncodedVideoFrame {
396392
</dd>
397393

398394
<dt>
399-
<dfn>timestamp</dfn> of type <span class="idlMemberType">unsigned long</span>
395+
<dfn attribute>timestamp</dfn> of type <span class="idlMemberType">unsigned long</span>
400396
</dt>
401397
<dd>
402398
<p>
@@ -405,7 +401,7 @@ interface RTCEncodedVideoFrame {
405401
</p>
406402
</dd>
407403
<dt>
408-
<dfn>data</dfn> of type <span class="idlMemberType">ArrayBuffer</span>
404+
<dfn attribute>data</dfn> of type <span class="idlMemberType">ArrayBuffer</span>
409405
</dt>
410406
<dd>
411407
<p>
@@ -415,11 +411,9 @@ interface RTCEncodedVideoFrame {
415411
</dl>
416412

417413
### Methods ### {#RTCEncodedVideoFrame-methods}
418-
<dl data-link-for="RTCEncodedVideoFrame"
419-
data-dfn-for="RTCEncodedVideoFrame"
420-
class="dictionary-members">
414+
<dl dfn-for="RTCEncodedVideoFrame" class="dictionary-members">
421415
<dt>
422-
<dfn data-dfn-for="RTCEncodedVideoFrame" data-dfn-type="method">getMetadata()</dfn>
416+
<dfn for="RTCEncodedVideoFrame" method>getMetadata()</dfn>
423417
</dt>
424418
<dd>
425419
<p>
@@ -428,7 +422,7 @@ interface RTCEncodedVideoFrame {
428422
</dd>
429423
</dl>
430424

431-
## <dfn>RTCEncodedAudioFrameMetadata</dfn> dictionary ## {#RTCEncodedAudioFrameMetadata}
425+
## <dfn dictionary>RTCEncodedAudioFrameMetadata</dfn> dictionary ## {#RTCEncodedAudioFrameMetadata}
432426
<pre class="idl">
433427
dictionary RTCEncodedAudioFrameMetadata {
434428
unsigned long synchronizationSource;
@@ -438,11 +432,9 @@ dictionary RTCEncodedAudioFrameMetadata {
438432
};
439433
</pre>
440434
### Members ### {#RTCEncodedAudioFrameMetadata-members}
441-
<dl data-link-for="RTCEncodedAudioFrameMetadata"
442-
data-dfn-for="RTCEncodedAudioFrameMetadata"
443-
class="dictionary-members">
435+
<dl dfn-for="RTCEncodedAudioFrameMetadata" class="dictionary-members">
444436
<dt>
445-
<dfn>synchronizationSource</dfn> of type <span class="idlMemberType">unsigned long</span>
437+
<dfn dict-member>synchronizationSource</dfn> of type <span class="idlMemberType">unsigned long</span>
446438
</dt>
447439
<dd>
448440
<p>
@@ -451,7 +443,7 @@ dictionary RTCEncodedAudioFrameMetadata {
451443
</p>
452444
</dd>
453445
<dt>
454-
<dfn>payloadType</dfn> of type <span class="idlMemberType">octet</span>
446+
<dfn dict-member>payloadType</dfn> of type <span class="idlMemberType">octet</span>
455447
</dt>
456448
<dd>
457449
<p>
@@ -460,7 +452,7 @@ dictionary RTCEncodedAudioFrameMetadata {
460452
</p>
461453
</dd>
462454
<dt>
463-
<dfn>contributingSources</dfn> of type <span class=
455+
<dfn dict-member>contributingSources</dfn> of type <span class=
464456
"idlMemberType">sequence&lt;unsigned long&gt;</span>
465457
</dt>
466458
<dd>
@@ -469,7 +461,7 @@ dictionary RTCEncodedAudioFrameMetadata {
469461
</p>
470462
</dd>
471463
<dt>
472-
<dfn>sequenceNumber</dfn> of type <span class=
464+
<dfn dict-member>sequenceNumber</dfn> of type <span class=
473465
"idlMemberType">short</span>
474466
</dt>
475467
<dd>
@@ -482,7 +474,7 @@ dictionary RTCEncodedAudioFrameMetadata {
482474
</dd>
483475
</dl>
484476

485-
## <dfn>RTCEncodedAudioFrame</dfn> interface ## {#RTCEncodedAudioFrame-interface}
477+
## <dfn interface>RTCEncodedAudioFrame</dfn> interface ## {#RTCEncodedAudioFrame-interface}
486478
<pre class="idl">
487479
[Exposed=(Window,DedicatedWorker)]
488480
interface RTCEncodedAudioFrame {
@@ -493,11 +485,9 @@ interface RTCEncodedAudioFrame {
493485
</pre>
494486

495487
### Members ### {#RTCEncodedAudioFrame-members}
496-
<dl data-link-for="RTCEncodedAudioFrame"
497-
data-dfn-for="RTCEncodedAudioFrame"
498-
class="dictionary-members">
488+
<dl dfn-for="RTCEncodedAudioFrame" class="dictionary-members">
499489
<dt>
500-
<dfn>timestamp</dfn> of type <span class="idlMemberType">unsigned long</span>
490+
<dfn attribute>timestamp</dfn> of type <span class="idlMemberType">unsigned long</span>
501491
</dt>
502492
<dd>
503493
<p>
@@ -506,7 +496,7 @@ interface RTCEncodedAudioFrame {
506496
</p>
507497
</dd>
508498
<dt>
509-
<dfn>data</dfn> of type <span class="idlMemberType">ArrayBuffer</span>
499+
<dfn attribute>data</dfn> of type <span class="idlMemberType">ArrayBuffer</span>
510500
</dt>
511501
<dd>
512502
<p>
@@ -516,11 +506,9 @@ interface RTCEncodedAudioFrame {
516506
</dl>
517507

518508
### Methods ### {#RTCEncodedAudioFrame-methods}
519-
<dl data-link-for="RTCEncodedAudioFrame"
520-
data-dfn-for="RTCEncodedAudioFrame"
521-
class="dictionary-members">
509+
<dl dfn-for="RTCEncodedAudioFrame" class="dictionary-members">
522510
<dt>
523-
<dfn data-dfn-for="RTCEncodedAudioFrame" data-dfn-type="method">getMetadata()</dfn>
511+
<dfn for="RTCEncodedAudioFrame" method>getMetadata()</dfn>
524512
</dt>
525513
<dd>
526514
<p>
@@ -579,8 +567,8 @@ The <dfn constructor for="RTCRtpScriptTransform" lt="RTCRtpScriptTransform(worke
579567

580568
// FIXME: Describe error handling (worker closing flag true at RTCRtpScriptTransform creation time. And worker being terminated while transform is processing data).
581569

582-
Each RTCRtpScriptTransform has the following set of [=association steps=], given |rtcObject|:
583-
1. Let |transform| be the {{RTCRtpScriptTransform}} object that owns the [=association steps=].
570+
Each RTCRtpScriptTransform has the following set of [$association steps$], given |rtcObject|:
571+
1. Let |transform| be the {{RTCRtpScriptTransform}} object that owns the [$association steps$].
584572
1. Let |encoder| be |rtcObject|'s encoder if |rtcObject| is a {{RTCRtpSender}} or undefined otherwise.
585573
1. Let |depacketizer| be |rtcObject|'s depacketizer if |rtcObject| is a {{RTCRtpReceiver}} or undefined otherwise.
586574
1. [=Queue a task=] on the DOM manipulation [=task source=] |worker|'s global scope to run the following steps:
@@ -590,12 +578,12 @@ Each RTCRtpScriptTransform has the following set of [=association steps=], given
590578

591579
The <dfn method for="RTCRtpScriptTransformer">generateKeyFrame(|rid|)</dfn> method steps are:
592580
1. Let |promise| be a new promise.
593-
1. Run the [=generate key frame algorithm=] with |promise|, |this|.`[[encoder]]` and |rid|.
581+
1. Run the [$generate key frame algorithm$] with |promise|, |this|.`[[encoder]]` and |rid|.
594582
1. Return |promise|.
595583

596584
The <dfn method for="RTCRtpScriptTransformer">sendKeyFrameRequest()</dfn> method steps are:
597585
1. Let |promise| be a new promise.
598-
1. Run the [=send request key frame algorithm=] with |promise| and |this|.`[[depacketizer]]`.
586+
1. Run the [$send request key frame algorithm$] with |promise| and |this|.`[[depacketizer]]`.
599587
1. Return |promise|.
600588

601589
## Attributes ## {#RTCRtpScriptTransformer-attributes}
@@ -615,7 +603,7 @@ The <dfn attribute for="RTCRtpScriptTransformer">writable</dfn> getter steps are
615603

616604
## KeyFrame Algorithms ## {#KeyFrame-algorithms}
617605

618-
The <dfn>generate key frame algorithm</dfn>, given |promise|, |encoder| and |rid|, is defined by running these steps:
606+
The <dfn abstract-op>generate key frame algorithm</dfn>, given |promise|, |encoder| and |rid|, is defined by running these steps:
619607
1. If |encoder| is undefined, reject |promise| with {{InvalidStateError}}, abort these steps.
620608
1. If |encoder| is not processing video frames, reject |promise| with {{InvalidStateError}}, abort these steps.
621609
1. If |rid| is defined, validate its value. If invalid, reject |promise| with {{NotAllowedError}} and abort these steps.
@@ -647,7 +635,7 @@ By resolving the promises just before enqueuing the corresponding key frame in a
647635
the resolution callbacks of the promises are always executed just before the corresponding key frame is exposed.
648636
If the promise is associated to several rid values, it will be resolved when the first key frame corresponding to one the rid value is enqueued.
649637

650-
The <dfn>send request key frame algorithm</dfn>, given |promise| and |depacketizer|, is defined by running these steps:
638+
The <dfn abstract-op>send request key frame algorithm</dfn>, given |promise| and |depacketizer|, is defined by running these steps:
651639
1. If |depacketizer| is undefined, reject |promise| with {{InvalidStateError}}, abort these steps.
652640
1. If |depacketizer| is not processing video packets, reject |promise| with {{InvalidStateError}}, abort these steps.
653641
1. [=In parallel=], run the following steps:
@@ -671,7 +659,7 @@ partial interface RTCRtpSender {
671659
The <dfn method for="RTCRtpSender">generateKeyFrame(|rids|)</dfn> method steps are:
672660

673661
1. Let |promise| be a new promise.
674-
1. [=In parallel=], run the [=generate key frame algorithm=] with |promise|, |this|'s encoder and |rids|.
662+
1. [=In parallel=], run the [$generate key frame algorithm$] with |promise|, |this|'s encoder and |rids|.
675663
1. Return |promise|.
676664

677665
# Privacy and security considerations # {#privacy}

0 commit comments

Comments
 (0)