Skip to content

Commit

Permalink
WIP: use abstract-op links
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisn committed Aug 12, 2024
1 parent 9682d70 commit c053d7d
Showing 1 changed file with 38 additions and 32 deletions.
70 changes: 38 additions & 32 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -740,14 +740,16 @@ spec: mimesniff; urlPrefix: https://mimesniff.spec.whatwg.org/#
<section>
<h3 id='info-algorithms'>Algorithms</h3>

<section>
<section algorithm>
<h4 id='create-media-capabilities-encoding-info'>
<dfn>Create a MediaCapabilitiesEncodingInfo</dfn>
<dfn abstract-op noexport lt="Create a MediaCapabilitiesEncodingInfo|create a MediaCapabilitiesEncodingInfo">
Create a MediaCapabilitiesEncodingInfo
</dfn>
</h4>
<p>
Given a {{MediaEncodingConfiguration}} <var>configuration</var>, this
algorithm returns a {{MediaCapabilitiesEncodingInfo}}. The following
steps are run:
To [$create a MediaCapabilitiesEncodingInfo$], given a
{{MediaEncodingConfiguration}} <var>configuration</var>, run the
following steps. They return a {{MediaCapabilitiesEncodingInfo}}:
<ol>
<li>
Let <var>info</var> be a new {{MediaCapabilitiesEncodingInfo}}
Expand Down Expand Up @@ -784,14 +786,16 @@ spec: mimesniff; urlPrefix: https://mimesniff.spec.whatwg.org/#
</p>
</section>

<section>
<section algorithm>
<h4 id='create-media-capabilities-decoding-info'>
<dfn>Create a MediaCapabilitiesDecodingInfo</dfn>
<dfn abstract-op noexport lt="Create a MediaCapabilitiesDecodingInfo|create a MediaCapabilitiesDecodingInfo">
Create a MediaCapabilitiesDecodingInfo
</dfn>
</h4>
<p>
Given a {{MediaDecodingConfiguration}} <var>configuration</var>, this
algorithm returns a {{MediaCapabilitiesDecodingInfo}}. The following
steps are run:
To [$create a MediaCapabilitiesDecodingInfo$], given a
{{MediaDecodingConfiguration}} |configuration|, perform the
following steps. They return a {{MediaCapabilitiesDecodingInfo}}:
<ol>
<li>
Let <var>info</var> be a new {{MediaCapabilitiesDecodingInfo}}
Expand All @@ -800,17 +804,17 @@ spec: mimesniff; urlPrefix: https://mimesniff.spec.whatwg.org/#
</li>
<li>
Set {{MediaCapabilitiesDecodingInfo/configuration}} to be a new
{{MediaDecodingConfiguration}}. For every property in <var>
configuration</var> create a new property with the same name and
{{MediaDecodingConfiguration}}. For every property in
|configuration| create a new property with the same name and
value in {{MediaCapabilitiesDecodingInfo/configuration}}.
</li>
<li>
If <code>configuration.keySystemConfiguration</code> [=map/exists=]:
<ol>
<li>
Set {{MediaCapabilitiesDecodingInfo/keySystemAccess}}
to the result of running the <a>Check Encrypted Decoding
Support</a> algorithm with <var>configuration</var>.
to the result of running the [$Check Encrypted Decoding
Support$] algorithm with |configuration|.
</li>
<li>
If {{MediaCapabilitiesDecodingInfo/keySystemAccess}}
Expand All @@ -829,21 +833,21 @@ spec: mimesniff; urlPrefix: https://mimesniff.spec.whatwg.org/#
</li>
<li>
If the user agent is able to decode the media represented
by <var>configuration</var>, set
by |configuration|, set
{{MediaCapabilitiesInfo/supported}} to <code>true</code>.
</li>
<li>Otherwise, set it to <code>false</code>.</li>
</ol>
</li>
<li>
If the user agent is able to decode the media represented by
<var>configuration</var> at the indicated framerate
|configuration| at the indicated framerate
without dropping frames, set {{MediaCapabilitiesInfo/smooth}}
to <code>true</code>. Otherwise set it to <code>false</code>.
</li>
<li>
If the user agent is able to decode the media represented by
<var>configuration</var> in a [=power efficient=]
|configuration| in a [=power efficient=]
manner, set {{MediaCapabilitiesInfo/powerEfficient}} to
<code>true</code>. Otherwise set it to <code>false</code>.
</li>
Expand Down Expand Up @@ -939,15 +943,17 @@ spec: mimesniff; urlPrefix: https://mimesniff.spec.whatwg.org/#
</ol>
</section>

<section>
<section algorithm>
<h4 id='is-encrypted-decode-supported'>
<dfn>Check Encrypted Decoding Support</dfn>
<dfn abstract-op noexport lt="Check Encrypted Decoding Support|check encrypted decoding support">
Check Encrypted Decoding Support
</dfn>
</h4>
<p>
Given a {{MediaDecodingConfiguration}} <var>config</var> where
{{keySystemConfiguration}} [=map/exists=], this algorithm returns a
{{MediaKeySystemAccess}} or <code>null</code> as appropriate. The
following steps are run:
To [$check encrypted decoding support$], given a {{MediaDecodingConfiguration}}
|config| where {{keySystemConfiguration}} [=map/exists=], perform the
following steps. They return a {{MediaKeySystemAccess}} or <code>null</code>
as appropriate:
<ol>
<li>
If the {{keySystem}} member of
Expand All @@ -960,7 +966,8 @@ spec: mimesniff; urlPrefix: https://mimesniff.spec.whatwg.org/#
<a>Document</a>.
</li>
<li>
Let <var>implementation</var> be the implementation of <code>config.keySystemConfiguration.keySystem</code>.
Let <var>implementation</var> be the implementation of
<code>config.keySystemConfiguration.keySystem</code>.
</li>

<li>
Expand All @@ -985,7 +992,7 @@ spec: mimesniff; urlPrefix: https://mimesniff.spec.whatwg.org/#
<code>config.keySystemConfiguration.sessionTypes</code>.
</li>
<li>
If {{MediaConfiguration/audio}} [=map/exists=] in <var>config</var>, set the
If {{MediaConfiguration/audio}} [=map/exists=] in |config|, set the
{{MediaKeySystemConfiguration/audioCapabilities}} attribute to a sequence containing a
single {{MediaKeySystemMediaCapability}}, initialized as
follows:
Expand All @@ -1011,7 +1018,7 @@ spec: mimesniff; urlPrefix: https://mimesniff.spec.whatwg.org/#
</ol>
</li>
<li>
If {{MediaConfiguration/video}} [=map/exists=] in <var>config</var>, set the
If {{MediaConfiguration/video}} [=map/exists=] in |config|, set the
videoCapabilities attribute to a sequence containing a single
{{MediaKeySystemMediaCapability}}, initialized as follows:
<ol>
Expand Down Expand Up @@ -1043,8 +1050,7 @@ spec: mimesniff; urlPrefix: https://mimesniff.spec.whatwg.org/#
</li>
<li>
If <var>supported configuration</var> is
<code>NotSupported</code>, return <code>null</code> and abort
these steps.
<code>NotSupported</code>, return <code>null</code>.
</li>
<li>
Let <var>access</var> be a new {{MediaKeySystemAccess}}
Expand Down Expand Up @@ -1129,9 +1135,9 @@ spec: mimesniff; urlPrefix: https://mimesniff.spec.whatwg.org/#
Let <var>p</var> be a new promise.
</li>
<li>
<a>In parallel</a>, run the <a>Create a
MediaCapabilitiesDecodingInfo</a> algorithm with
<var>configuration</var> and resolve <var>p</var> with its result.
<a>In parallel</a>, run the [$Create a MediaCapabilitiesEncodingInfo$]
algorithm with <var>configuration</var> and resolve <var>p</var> with
its result.
</li>
<li>
Return <var>p</var>.
Expand All @@ -1157,7 +1163,7 @@ spec: mimesniff; urlPrefix: https://mimesniff.spec.whatwg.org/#
Let <var>p</var> be a new promise.
</li>
<li>
<a>In parallel</a>, run the <a>Create a MediaCapabilitiesEncodingInfo</a>
<a>In parallel</a>, run the [$Create a MediaCapabilitiesEncodingInfo$]
algorithm with <var>configuration</var> and resolve <var>p</var>
with its result.
</li>
Expand Down

0 comments on commit c053d7d

Please sign in to comment.