Skip to content

Commit 68d3ff6

Browse files
Clarify {Audio|Video}EncoderConfig.contentHint
1 parent 21e4a15 commit 68d3ff6

File tree

1 file changed

+37
-3
lines changed

1 file changed

+37
-3
lines changed

index.src.html

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252

5353
spec: mst-content-hint; urlPrefix: https://www.w3.org/TR/mst-content-hint/
5454
type: dfn; text: video content hints; url:#video-content-hints
55+
type: dfn; text: audio content hints; url:#audio-content-hints
5556

5657
spec: ECMASCRIPT; urlPrefix: https://tc39.es/ecma262/
5758
type: dfn; text: the current Realm; url: #current-realm
@@ -2051,6 +2052,7 @@
20512052
[EnforceRange] unsigned long numberOfChannels;
20522053
[EnforceRange] unsigned long long bitrate;
20532054
BitrateMode bitrateMode = "variable";
2055+
DOMString contentHint;
20542056
};
20552057
</xmp>
20562058

@@ -2090,6 +2092,29 @@
20902092
encouraged to check by calling {{AudioEncoder/isConfigSupported()}} with
20912093
|config|.
20922094
</dd>
2095+
<dt><dfn dict-member for=AudioEncoderConfig>contentHint</dfn></dt>
2096+
<dd>
2097+
An encoding [=audio content hint=] as defined by [[mst-content-hint]].
2098+
2099+
The User Agent <em class="rfc2119">MAY</em> use this hint to set
2100+
expectations about incoming {{AudioData}} and to improve encoding quality.
2101+
If using this hint:
2102+
- The User Agent <em class="rfc2119">MUST</em> respect other explicitly
2103+
set encoding options when configuring the encoder, whether they are
2104+
codec-specific encoding options or not.
2105+
- The User Agent <em class="rfc2119">SHOULD</em> make a best-effort
2106+
attempt to use additional configuration options to improve encoding
2107+
quality, according to the goals defined by the corresponding
2108+
[=audio content hint=].
2109+
2110+
NOTE: Some encoder options are implementation specific, and mappings between
2111+
{{AudioEncoderConfig/contentHint}} and those options cannot be
2112+
prescribed.
2113+
2114+
The User Agent <em class="rfc2119">MUST NOT</em> refuse the configuration
2115+
if it doesn't support this content hint.
2116+
See {{AudioEncoder/isConfigSupported()}}.
2117+
</dd>
20932118
</dl>
20942119

20952120

@@ -2233,13 +2258,22 @@
22332258

22342259
The User Agent <em class="rfc2119">MAY</em> use this hint to set
22352260
expectations about incoming {{VideoFrame}}s and to improve encoding quality.
2261+
If using this hint:
2262+
- The User Agent <em class="rfc2119">MUST</em> respect other explicitly
2263+
set encoding options when configuring the encoder, whether they are
2264+
codec-specific encoding options or not.
2265+
- The User Agent <em class="rfc2119">SHOULD</em> make a best-effort
2266+
attempt to use additional configuration options to improve encoding
2267+
quality, according to the goals defined by the corresponding
2268+
[=video content hint=].
2269+
2270+
NOTE: Some encoder options are implementation specific, and mappings between
2271+
{{VideoEncoderConfig/contentHint}} and those options cannot be
2272+
prescribed.
22362273

22372274
The User Agent <em class="rfc2119">MUST NOT</em> refuse the configuration
22382275
if it doesn't support this content hint.
22392276
See {{VideoEncoder/isConfigSupported()}}.
2240-
2241-
NOTE: Any codec-specific encoding options take precedence over
2242-
{{contentHint}}.
22432277
</dd>
22442278

22452279
</dl>

0 commit comments

Comments
 (0)