Skip to content

Commit a5e12fc

Browse files
authored
Merge pull request #173 from w3c/idl_cleanups
Minor IDL fixes.
2 parents eefd4c2 + e2750f2 commit a5e12fc

File tree

1 file changed

+23
-66
lines changed

1 file changed

+23
-66
lines changed

index.src.html

Lines changed: 23 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,7 @@
169169
AudioDecoder Interface {#audiodecoder-interface}
170170
================================================
171171

172-
<pre class='idl'>
173-
<xmp>
172+
<xmp class='idl'>
174173
[Exposed=(Window,DedicatedWorker)]
175174
interface AudioDecoder {
176175
constructor(AudioDecoderInit init);
@@ -194,7 +193,6 @@
194193

195194
callback AudioFrameOutputCallback = undefined(AudioFrame output);
196195
</xmp>
197-
</pre>
198196

199197
Internal Slots {#audiodecoder-internal-slots}
200198
---------------------------------------------
@@ -398,8 +396,7 @@
398396
VideoDecoder Interface {#videodecoder-interface}
399397
================================================
400398

401-
<pre class='idl'>
402-
<xmp>
399+
<xmp class='idl'>
403400
[Exposed=(Window,DedicatedWorker)]
404401
interface VideoDecoder {
405402
constructor(VideoDecoderInit init);
@@ -423,7 +420,6 @@
423420

424421
callback VideoFrameOutputCallback = undefined(VideoFrame output);
425422
</xmp>
426-
</pre>
427423

428424
Internal Slots {#videodecoder-internal-slots}
429425
---------------------------------------------
@@ -645,8 +641,7 @@
645641
AudioEncoder Interface {#audioencoder-interface}
646642
================================================
647643

648-
<pre class='idl'>
649-
<xmp>
644+
<xmp class='idl'>
650645
[Exposed=(Window,DedicatedWorker)]
651646
interface AudioEncoder {
652647
constructor(AudioEncoderInit init);
@@ -670,7 +665,6 @@
670665

671666
callback EncodedAudioChunkOutputCallback = undefined(EncodedAudioChunk output);
672667
</xmp>
673-
</pre>
674668

675669
Internal Slots {#audioencoder-internal-slots}
676670
---------------------------------------------
@@ -885,8 +879,7 @@
885879
VideoEncoder Interface {#videoencoder-interface}
886880
================================================
887881

888-
<pre class='idl'>
889-
<xmp>
882+
<xmp class='idl'>
890883
[Exposed=(Window,DedicatedWorker)]
891884
interface VideoEncoder {
892885
constructor(VideoEncoderInit init);
@@ -910,7 +903,6 @@
910903

911904
callback EncodedVideoChunkOutputCallback = undefined(EncodedVideoChunk output, VideoDecoderConfig? output_config);
912905
</xmp>
913-
</pre>
914906

915907
Internal Slots {#videoencoder-internal-slots}
916908
---------------------------------------------
@@ -1217,14 +1209,12 @@
12171209
------------------------------------------------------
12181210

12191211
### AudioDecoderSupport ### {#audio-decoder-support}
1220-
<pre class='idl'>
1221-
<xmp>
1212+
<xmp class='idl'>
12221213
dictionary AudioDecoderSupport {
12231214
boolean supported;
12241215
AudioDecoderConfig config;
12251216
};
12261217
</xmp>
1227-
</pre>
12281218

12291219
<dl>
12301220
<dt><dfn dict-member for=AudioDecoderSupport>supported</dfn></dt>
@@ -1240,14 +1230,12 @@
12401230
</dl>
12411231

12421232
### VideoDecoderSupport ### {#video-decoder-support}
1243-
<pre class='idl'>
1244-
<xmp>
1233+
<xmp class='idl'>
12451234
dictionary VideoDecoderSupport {
12461235
boolean supported;
12471236
VideoDecoderConfig config;
12481237
};
12491238
</xmp>
1250-
</pre>
12511239

12521240
<dl>
12531241
<dt><dfn dict-member for=VideoDecoderSupport>supported</dfn></dt>
@@ -1263,14 +1251,12 @@
12631251
</dl>
12641252

12651253
### AudioEncoderSupport ### {#audio-encoder-support}
1266-
<pre class='idl'>
1267-
<xmp>
1254+
<xmp class='idl'>
12681255
dictionary AudioEncoderSupport {
12691256
boolean supported;
12701257
AudioEncoderConfig config;
12711258
};
12721259
</xmp>
1273-
</pre>
12741260

12751261
<dl>
12761262
<dt><dfn dict-member for=AudioEncoderSupport>supported</dfn></dt>
@@ -1286,14 +1272,12 @@
12861272
</dl>
12871273

12881274
### VideoEncoderSupport ### {#video-encoder-support}
1289-
<pre class='idl'>
1290-
<xmp>
1275+
<xmp class='idl'>
12911276
dictionary VideoEncoderSupport {
12921277
boolean supported;
12931278
VideoEncoderConfig config;
12941279
};
12951280
</xmp>
1296-
</pre>
12971281

12981282
<dl>
12991283
<dt><dfn dict-member for=VideoEncoderSupport>supported</dfn></dt>
@@ -1331,16 +1315,14 @@
13311315

13321316
AudioDecoderConfig{#audio-decoder-config}
13331317
-----------------------------------------
1334-
<pre class='idl'>
1335-
<xmp>
1318+
<xmp class='idl'>
13361319
dictionary AudioDecoderConfig {
13371320
required DOMString codec;
13381321
required unsigned long sampleRate;
13391322
required unsigned long numberOfChannels;
13401323
BufferSource description;
13411324
};
13421325
</xmp>
1343-
</pre>
13441326

13451327
To check if an {{AudioDecoderConfig}} is a <dfn>valid AudioDecoderConfig</dfn>,
13461328
run these steps:
@@ -1370,8 +1352,7 @@
13701352

13711353
VideoDecoderConfig{#video-decoder-config}
13721354
-----------------------------------------
1373-
<pre class='idl'>
1374-
<xmp>
1355+
<xmp class='idl'>
13751356
dictionary VideoDecoderConfig {
13761357
required DOMString codec;
13771358
BufferSource description;
@@ -1386,7 +1367,6 @@
13861367
HardwareAcceleration hardwareAcceleration = "allow";
13871368
};
13881369
</xmp>
1389-
</pre>
13901370

13911371
To check if a {{VideoDecoderConfig}} is a <dfn>valid VideoDecoderConfig</dfn>,
13921372
run these steps:
@@ -1475,15 +1455,13 @@
14751455

14761456
AudioEncoderConfig{#audio-encoder-config}
14771457
-----------------------------------------
1478-
<pre class='idl'>
1479-
<xmp>
1458+
<xmp class='idl'>
14801459
dictionary AudioEncoderConfig {
14811460
required DOMString codec;
14821461
unsigned long sampleRate;
14831462
unsigned long numberOfChannels;
14841463
};
14851464
</xmp>
1486-
</pre>
14871465

14881466
NOTE: Codec-specific extensions to {{AudioEncoderConfig}} may be defined by the
14891467
registrations in the [[WEBCODECS-CODEC-REGISTRY]].
@@ -1508,8 +1486,7 @@
15081486

15091487
VideoEncoderConfig{#video-encoder-config}
15101488
-----------------------------------------
1511-
<pre class='idl'>
1512-
<xmp>
1489+
<xmp class='idl'>
15131490
dictionary VideoEncoderConfig {
15141491
required DOMString codec;
15151492
unsigned long long bitrate;
@@ -1520,7 +1497,6 @@
15201497
HardwareAcceleration hardwareAcceleration = "allow";
15211498
};
15221499
</xmp>
1523-
</pre>
15241500

15251501
NOTE: Codec-specific extensions to {{VideoEncoderConfig}} may be defined by the
15261502
registrations in the [[WEBCODECS-CODEC-REGISTRY]].
@@ -1606,15 +1582,13 @@
16061582

16071583
Hardware Acceleration{#hardware-acceleration}
16081584
---------------------------------------------
1609-
<pre class='idl'>
1610-
<xmp>
1585+
<xmp class='idl'>
16111586
enum HardwareAcceleration {
16121587
"allow",
16131588
"deny",
16141589
"require",
16151590
};
16161591
</xmp>
1617-
</pre>
16181592

16191593
When supported, hardware acceleration offloads encoding or decoding to
16201594
specialized hardware.
@@ -1686,13 +1660,11 @@
16861660
VideoEncoderEncodeOptions{#video-encoder-options}
16871661
-------------------------------------------------
16881662

1689-
<pre class='idl'>
1690-
<xmp>
1663+
<xmp class='idl'>
16911664
dictionary VideoEncoderEncodeOptions {
16921665
boolean keyFrame = false;
16931666
};
16941667
</xmp>
1695-
</pre>
16961668

16971669
<dl>
16981670
<dt><dfn dict-member for=VideoEncoderEncodeOptions>keyFrame</dfn></dt>
@@ -1706,15 +1678,13 @@
17061678

17071679
CodecState{#codec-state}
17081680
------------------------
1709-
<pre class='idl'>
1710-
<xmp>
1681+
<xmp class='idl'>
17111682
enum CodecState {
17121683
"unconfigured",
17131684
"configured",
17141685
"closed"
17151686
};
17161687
</xmp>
1717-
</pre>
17181688

17191689
<dl>
17201690
<dt><dfn enum-value for=CodecState>unconfigured</dfn></dt>
@@ -1733,11 +1703,9 @@
17331703

17341704
WebCodecsErrorCallback{#error-callback}
17351705
---------------------------------------
1736-
<pre class='idl'>
1737-
<xmp>
1706+
<xmp class='idl'>
17381707
callback WebCodecsErrorCallback = undefined(DOMException error);
17391708
</xmp>
1740-
</pre>
17411709

17421710

17431711
Encoded Media Interfaces (Chunks) {#encoded-media-interfaces}
@@ -1746,8 +1714,7 @@
17461714

17471715
EncodedAudioChunk Interface {#encodedaudiochunk-interface}
17481716
------------------------------------------------------------
1749-
<pre class='idl'>
1750-
<xmp>
1717+
<xmp class='idl'>
17511718
[Exposed=(Window,DedicatedWorker)]
17521719
interface EncodedAudioChunk {
17531720
constructor(EncodedAudioChunkInit init);
@@ -1767,7 +1734,6 @@
17671734
"delta",
17681735
};
17691736
</xmp>
1770-
</pre>
17711737

17721738
### Constructors ###{#encodedaudiochunk-constructors}
17731739
<dfn constructor for=EncodedAudioChunk title="EncodedAudioChunk(init)">
@@ -1793,8 +1759,7 @@
17931759

17941760
EncodedVideoChunk Interface{#encodedvideochunk-interface}
17951761
-----------------------------------------------------------
1796-
<pre class='idl'>
1797-
<xmp>
1762+
<xmp class='idl'>
17981763
[Exposed=(Window,DedicatedWorker)]
17991764
interface EncodedVideoChunk {
18001765
constructor(EncodedVideoChunkInit init);
@@ -1816,7 +1781,6 @@
18161781
"delta",
18171782
};
18181783
</xmp>
1819-
</pre>
18201784

18211785
### Constructors ###{#encodedvideochunk-constructors}
18221786
<dfn constructor for=EncodedVideoChunk title="EncodedVideoChunk(init)">
@@ -1854,8 +1818,7 @@
18541818
AudioFrame Interface {#audioframe-interface}
18551819
---------------------------------------------
18561820

1857-
<pre class='idl'>
1858-
<xmp>
1821+
<xmp class='idl'>
18591822
[Exposed=(Window,DedicatedWorker)]
18601823
interface AudioFrame {
18611824
constructor(AudioFrameInit init);
@@ -1869,7 +1832,6 @@
18691832
required AudioBuffer buffer;
18701833
};
18711834
</xmp>
1872-
</pre>
18731835

18741836
### Internal Slots ###{#audioframe-internal-slots}
18751837
<dl>
@@ -1919,8 +1881,7 @@
19191881
VideoFrame Interface {#videoframe-interface}
19201882
--------------------------------------------
19211883

1922-
<pre class='idl'>
1923-
<xmp>
1884+
<xmp class='idl'>
19241885
[Exposed=(Window,DedicatedWorker)]
19251886
interface VideoFrame {
19261887
constructor(ImageBitmap imageBitmap, optional VideoFrameInit frameInit = {});
@@ -1961,7 +1922,6 @@
19611922
unsigned long long timestamp;
19621923
};
19631924
</xmp>
1964-
</pre>
19651925

19661926
### Internal Slots ###{#videoframe-internal-slots}
19671927
<dl>
@@ -2209,8 +2169,8 @@
22092169
it possible to efficiently add an alpha plane to an existing {{VideoFrame}}.
22102170

22112171

2212-
<pre class='idl'>
2213-
<xmp>
2172+
<xmp class='idl'>
2173+
[Exposed=(Window,DedicatedWorker)]
22142174
interface Plane {
22152175
readonly attribute unsigned long stride;
22162176
readonly attribute unsigned long rows;
@@ -2225,7 +2185,6 @@
22252185
required unsigned long rows;
22262186
};
22272187
</xmp>
2228-
</pre>
22292188

22302189
### Internal Slots ###{#plane-internal-slots}
22312190
<dl>
@@ -2269,13 +2228,11 @@
22692228
http://www.fourcc.org/pixel-format/yuv-i420/</a> for a more complete
22702229
description.
22712230

2272-
<pre class='idl'>
2273-
<xmp>
2231+
<xmp class='idl'>
22742232
enum PixelFormat {
22752233
"I420"
22762234
};
22772235
</xmp>
2278-
</pre>
22792236

22802237
<dl>
22812238
<dt><dfn enum-value for=PixelFormat>I420</dfn></dt>

0 commit comments

Comments
 (0)