From 68d3ff66e1f60ba104e91de23df6e97b265c951d Mon Sep 17 00:00:00 2001 From: Thomas Guilbert Date: Wed, 10 Jan 2024 22:41:24 +0000 Subject: [PATCH 1/2] Clarify {Audio|Video}EncoderConfig.contentHint --- index.src.html | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/index.src.html b/index.src.html index 7a704560..5208ba99 100644 --- a/index.src.html +++ b/index.src.html @@ -52,6 +52,7 @@ spec: mst-content-hint; urlPrefix: https://www.w3.org/TR/mst-content-hint/ type: dfn; text: video content hints; url:#video-content-hints + type: dfn; text: audio content hints; url:#audio-content-hints spec: ECMASCRIPT; urlPrefix: https://tc39.es/ecma262/ type: dfn; text: the current Realm; url: #current-realm @@ -2051,6 +2052,7 @@ [EnforceRange] unsigned long numberOfChannels; [EnforceRange] unsigned long long bitrate; BitrateMode bitrateMode = "variable"; + DOMString contentHint; }; @@ -2090,6 +2092,29 @@ encouraged to check by calling {{AudioEncoder/isConfigSupported()}} with |config|. +
contentHint
+
+ An encoding [=audio content hint=] as defined by [[mst-content-hint]]. + + The User Agent MAY use this hint to set + expectations about incoming {{AudioData}} and to improve encoding quality. + If using this hint: + - The User Agent MUST respect other explicitly + set encoding options when configuring the encoder, whether they are + codec-specific encoding options or not. + - The User Agent SHOULD make a best-effort + attempt to use additional configuration options to improve encoding + quality, according to the goals defined by the corresponding + [=audio content hint=]. + + NOTE: Some encoder options are implementation specific, and mappings between + {{AudioEncoderConfig/contentHint}} and those options cannot be + prescribed. + + The User Agent MUST NOT refuse the configuration + if it doesn't support this content hint. + See {{AudioEncoder/isConfigSupported()}}. +
@@ -2233,13 +2258,22 @@ The User Agent MAY use this hint to set expectations about incoming {{VideoFrame}}s and to improve encoding quality. + If using this hint: + - The User Agent MUST respect other explicitly + set encoding options when configuring the encoder, whether they are + codec-specific encoding options or not. + - The User Agent SHOULD make a best-effort + attempt to use additional configuration options to improve encoding + quality, according to the goals defined by the corresponding + [=video content hint=]. + + NOTE: Some encoder options are implementation specific, and mappings between + {{VideoEncoderConfig/contentHint}} and those options cannot be + prescribed. The User Agent MUST NOT refuse the configuration if it doesn't support this content hint. See {{VideoEncoder/isConfigSupported()}}. - - NOTE: Any codec-specific encoding options take precedence over - {{contentHint}}. From 07950785b2d11d315b0af35b198fc39f49a654fc Mon Sep 17 00:00:00 2001 From: Thomas Guilbert Date: Mon, 5 Feb 2024 22:28:15 +0000 Subject: [PATCH 2/2] Drop AudioEncoderConfig.contentHint --- index.src.html | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/index.src.html b/index.src.html index 5208ba99..9c813158 100644 --- a/index.src.html +++ b/index.src.html @@ -52,7 +52,6 @@ spec: mst-content-hint; urlPrefix: https://www.w3.org/TR/mst-content-hint/ type: dfn; text: video content hints; url:#video-content-hints - type: dfn; text: audio content hints; url:#audio-content-hints spec: ECMASCRIPT; urlPrefix: https://tc39.es/ecma262/ type: dfn; text: the current Realm; url: #current-realm @@ -2052,7 +2051,6 @@ [EnforceRange] unsigned long numberOfChannels; [EnforceRange] unsigned long long bitrate; BitrateMode bitrateMode = "variable"; - DOMString contentHint; }; @@ -2092,29 +2090,6 @@ encouraged to check by calling {{AudioEncoder/isConfigSupported()}} with |config|. -
contentHint
-
- An encoding [=audio content hint=] as defined by [[mst-content-hint]]. - - The User Agent MAY use this hint to set - expectations about incoming {{AudioData}} and to improve encoding quality. - If using this hint: - - The User Agent MUST respect other explicitly - set encoding options when configuring the encoder, whether they are - codec-specific encoding options or not. - - The User Agent SHOULD make a best-effort - attempt to use additional configuration options to improve encoding - quality, according to the goals defined by the corresponding - [=audio content hint=]. - - NOTE: Some encoder options are implementation specific, and mappings between - {{AudioEncoderConfig/contentHint}} and those options cannot be - prescribed. - - The User Agent MUST NOT refuse the configuration - if it doesn't support this content hint. - See {{AudioEncoder/isConfigSupported()}}. -