forked from w3c/webcodecs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.bs
88 lines (79 loc) · 2.62 KB
/
index.bs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<pre class='metadata'>
Title: WebCodecs
Repository: wicg/web-codecs
Status: CG-DRAFT
ED: https://wicg.github.io/web-codecs/
Shortname: web-codecs
Level: 1
Group: wicg
Editor: Chris Cunningham, w3cid 114832, Google Inc. https://google.com/
Editor: Paul Adenot, w3cid 62410, Mozilla https://www.mozilla.org/
Abstract: WebCodecs is a flexible web API for encoding and decoding audio and video.
!Participate: <a href="https://github.com/wicg/web-codecs">Git Repository.</a>
!Participate: <a href="https://github.com/wicg/web-codecs/issues/new">File an issue.</a>
!Version History: <a href="https://github.com/wicg/web-codecs/commits">https://github.com/wicg/web-codecs/commits</a>
</pre>
<section class='non-normative'>
<h2 id='introduction'>Introduction</h2>
<em>This section is non-normative</em>
<p>
The introduction has not yet been written.
</p>
<p class='note'>
NOTE: The interfaces that follow are a work in progress.
</p>
</section>
<section>
<h2 id='video-decoder-interface'>VideoDecoder Interface</h2>
<pre class='idl'>
[Exposed=(Window)]
interface VideoDecoder {
Promise<void> Initialize(VideoDecoderInitParameters params);
Promise<void> Flush();
void Close();
readonly attribute WritableStream writable; // of EncodedVideoFrame
readonly attribute ReadableStream readable; // of VideoFrame
};
</pre>
<pre class='idl'>
[Exposed=(Window)]
dictionary VideoDecoderInitParameters {
required DOMString codec;
required DOMString profile;
// These are the "coded size", not the "visible size"
required unsigned long width;
required unsigned long height;
};
</pre>
</section>
<section>
<h2 id='video-encoder-interface'>VideoEncoder Interface</h2>
<pre class='idl'>
[Exposed=(Window)]
interface VideoEncoder {
Promise<void> Initialize(VideoEncoderInitParameters params);
void Close();
readonly attribute WritableStream writable; // of VideoFrame
readonly attribute ReadableStream readable; // of EncodedVideoFrame
};
</pre>
<pre class='idl'>
enum VideoEncoderHardwareMode {
"hardware",
"software"
};
</pre>
<pre class='idl'>
[Exposed=(Window)]
dictionary VideoEncoderInitParameters {
required VideoEncoderHardwareMode hardware_mode;
required DOMString codec;
required DOMString profile;
required unsigned long visible_width;
required unsigned long visible_height;
required unsigned long bitsPerSecond;
required double framesPerSecond;
required double maxFramesBetweenKeyFrames;
};
</pre>
</section>