From 82f3fc1f034b4a6030b1e801efcbef781d4fe9ec Mon Sep 17 00:00:00 2001 From: Johannes Kron Date: Fri, 8 Apr 2022 16:25:45 +0200 Subject: [PATCH 1/2] Specify in which contexts optional members are applicable --- index.bs | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/index.bs b/index.bs index 50703e0..1eb036b 100644 --- a/index.bs +++ b/index.bs @@ -243,6 +243,9 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
  • If keySystemConfiguration [=map/exists=]:
      +
    1. + The type MUST be {{media-source}} or {{file}}. +
    2. If keySystemConfiguration.audio [=map/exists=], audio MUST also [=map/exist=]. @@ -402,6 +405,10 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/ If {{VideoConfiguration/framerate}} is not finite or is not greater than 0, return false and abort these steps.
    3. +
    4. + If an optional member is specified for a {{MediaDecodingType}} or + {{MediaEncodingType}} to which it's not applicable, return + false and abort these steps.
    5. Return true.
    6. @@ -449,7 +456,9 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/ member represents that the video track includes the specified HDR metadata type, which the UA needs to be capable of interpreting for tone mapping the HDR content to a color volume and luminance of the output - device. Valid inputs are defined by {{HdrMetadataType}}. + device. Valid inputs are defined by {{HdrMetadataType}}. hdrMetadataType is + only applicable to {{MediaDecodingConfiguration}} of the types {{media-source}} + and {{file}}.

      @@ -461,7 +470,9 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/ to render the appropriate color, or something close enough. If the attached output device does not support the specified color, the UA needs to be capable of mapping the specified color to a color supported - by the output device. Valid inputs are defined by {{ColorGamut}}. + by the output device. Valid inputs are defined by {{ColorGamut}}. colorGamut + is only applicable to {{MediaDecodingConfiguration}} of the types + {{media-source}} and {{file}}.

      @@ -471,7 +482,8 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/ electro-optical algorithm supported by the rendering capabilities of a user agent, independent of the display, to map the source colors in the decoded media into the colors to be displayed. Valid inputs are defined - by {{TransferFunction}}. + by {{TransferFunction}}. transferFunction is only applicable to + {{MediaDecodingConfiguration}} of the types {{media-source}} and {{file}}.

      @@ -480,7 +492,7 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/ absent, the implementer defined default mode for this {{contentType}} is assumed (i.e., the mode you get if you don't specify one via {{RTCRtpSender/setParameters()}}). scalabilityMode is only applicable - to the {{MediaEncodingType}} {{MediaEncodingType/webrtc}}. + to {{MediaEncodingConfiguration}} of the type {{MediaEncodingType/webrtc}}.

      @@ -638,7 +650,9 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/

      The channels member - represents the audio channels used by the audio track. + represents the audio channels used by the audio track. channels is only + applicable to the decoding type {{MediaDecodingType/webrtc}} and the + encoding type {{MediaEncodingType/webrtc}}.

      @@ -657,7 +671,9 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/

      The samplerate represents the samplerate of the audio track in. The samplerate is the - number of samples of audio carried per second. + number of samples of audio carried per second. samplerate is only + applicable to the decoding type {{MediaDecodingType/webrtc}} and the + encoding type {{MediaEncodingType/webrtc}}.

      @@ -677,7 +693,8 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/ the user agent SHOULD only report this configuration as {{MediaCapabilitiesInfo/supported}} if it can support spatial rendering *for the current audio output device* without failing back to a - non-spatial mix of the stream. + non-spatial mix of the stream. spatialRendering is only applicable to + {{MediaDecodingConfiguration}} of the types {{media-source}} and {{file}}.

      From 22f5c1cbac4bb6d6595c7f4bfd1a28e45686242e Mon Sep 17 00:00:00 2001 From: Johannes Kron Date: Tue, 12 Apr 2022 13:54:58 +0200 Subject: [PATCH 2/2] Fix review comments --- index.bs | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/index.bs b/index.bs index 1eb036b..0f06665 100644 --- a/index.bs +++ b/index.bs @@ -408,7 +408,8 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
    7. If an optional member is specified for a {{MediaDecodingType}} or {{MediaEncodingType}} to which it's not applicable, return - false and abort these steps. + false and abort these steps. See applicability rules + in the member definitions below.
    8. Return true.
    9. @@ -457,7 +458,7 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/ metadata type, which the UA needs to be capable of interpreting for tone mapping the HDR content to a color volume and luminance of the output device. Valid inputs are defined by {{HdrMetadataType}}. hdrMetadataType is - only applicable to {{MediaDecodingConfiguration}} of the types {{media-source}} + only applicable to {{MediaDecodingConfiguration}} for types {{media-source}} and {{file}}.

      @@ -471,7 +472,7 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/ attached output device does not support the specified color, the UA needs to be capable of mapping the specified color to a color supported by the output device. Valid inputs are defined by {{ColorGamut}}. colorGamut - is only applicable to {{MediaDecodingConfiguration}} of the types + is only applicable to {{MediaDecodingConfiguration}} for types {{media-source}} and {{file}}.

      @@ -483,7 +484,7 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/ user agent, independent of the display, to map the source colors in the decoded media into the colors to be displayed. Valid inputs are defined by {{TransferFunction}}. transferFunction is only applicable to - {{MediaDecodingConfiguration}} of the types {{media-source}} and {{file}}. + {{MediaDecodingConfiguration}} for types {{media-source}} and {{file}}.

      @@ -492,7 +493,7 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/ absent, the implementer defined default mode for this {{contentType}} is assumed (i.e., the mode you get if you don't specify one via {{RTCRtpSender/setParameters()}}). scalabilityMode is only applicable - to {{MediaEncodingConfiguration}} of the type {{MediaEncodingType/webrtc}}. + to {{MediaEncodingConfiguration}} for type {{MediaEncodingType/webrtc}}.

      @@ -504,7 +505,8 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/ {{scalabilityMode}} in the sense that streams encoded with modes using spatial scalability (e.g. "L2T1") can only be decoded if spatialScalability is supported. spatialScalability is only applicable - to {{MediaDecodingConfiguration}}. + to {{MediaDecodingConfiguration}} for types {{media-source}}, {{file}}, + and {{MediaDecodingType/webrtc}}.

      @@ -651,8 +653,9 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/

      The channels member represents the audio channels used by the audio track. channels is only - applicable to the decoding type {{MediaDecodingType/webrtc}} and the - encoding type {{MediaEncodingType/webrtc}}. + applicable to the decoding types {{media-source}}, {{file}}, and + {{MediaDecodingType/webrtc}} and the encoding type + {{MediaEncodingType/webrtc}}.

      @@ -672,8 +675,9 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/ The samplerate represents the samplerate of the audio track in. The samplerate is the number of samples of audio carried per second. samplerate is only - applicable to the decoding type {{MediaDecodingType/webrtc}} and the - encoding type {{MediaEncodingType/webrtc}}. + applicable to the decoding types {{media-source}}, {{file}}, and + {{MediaDecodingType/webrtc}} and the encoding type + {{MediaEncodingType/webrtc}}.

      @@ -694,7 +698,7 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/ {{MediaCapabilitiesInfo/supported}} if it can support spatial rendering *for the current audio output device* without failing back to a non-spatial mix of the stream. spatialRendering is only applicable to - {{MediaDecodingConfiguration}} of the types {{media-source}} and {{file}}. + {{MediaDecodingConfiguration}} for types {{media-source}} and {{file}}.