Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define MediaCapabilitiesDecodingInfo.codecSwitchingSupported #165

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ spec: media-source; urlPrefix: https://www.w3.org/TR/media-source/
type: method
for: MediaSource; text: isTypeSupported(); url: #dom-mediasource-istypesupported

spec: media-source-codec-switching; urlPrefix: https://rawgit.com/wicg/media-source/codec-switching/index.html
chrisn marked this conversation as resolved.
Show resolved Hide resolved
type: interface
for: SourceBuffer; text: SourceBuffer; url: #sourcebuffer
type: method
for: SourceBuffer; text: changeType(); url: #dom-sourcebuffer-changetype

spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/;
type: method
for: HTMLMediaElement; text: canPlayType(); url: #dom-navigator-canplaytype
Expand Down Expand Up @@ -94,6 +100,8 @@ spec: encrypted-media; for: EME; urlPrefix: https://www.w3.org/TR/encrypted-medi
text: MediaKeysRequirement; url: dom-mediakeysrequirement
text: audioCapabilities; url: dom-mediakeysystemconfiguration-audiocapabilities
text: contentType; url: dom-mediakeysystemmediacapability-contenttype
type: method
Copy link
Member

@marcoscaceres marcoscaceres Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need this in theory. Or if we do, we need to figure out why it hasn't been exported from the other spec.

text: setMediaKeys(); url: dom-htmlmediaelement-setmediakeys

spec: encrypted-media-draft; for: EME; urlPrefix: https://w3c.github.io/encrypted-media/#
type: attribute
Expand Down Expand Up @@ -180,6 +188,22 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
</p>
</section>

<section>
<h2 id='definitions'>Definitions</h2>
<dl>
<dt><dfn>Decoding Pipeline</dfn></dt>
<dd>
A configuration of internal user agent components that implement media
decoding. For the purposes of this specification, we conceive of user
agents having distinct pipelines for encrypted vs unencrypted media.
Additionally, user agents may support several distinct encrypted media
pipelines, which must be signalled by using different
{{MediaCapabilitiesKeySystemConfiguration/keySystem}} names or different
{{KeySystemTrackConfiguration/robustness}} levels.
</dd>
</dl>
</section>

<section>
<h2 id='decoding-encoding-capabilities'>Decoding and Encoding Capabilities</h2>

Expand Down Expand Up @@ -766,6 +790,7 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/

<pre class='idl'>
dictionary MediaCapabilitiesDecodingInfo : MediaCapabilitiesInfo {
required boolean codecSwitchingSupported;
required MediaKeySystemAccess keySystemAccess;
MediaDecodingConfiguration configuration;
};
Expand Down Expand Up @@ -794,6 +819,21 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
temperature or the fans noise.
</p>

<p>
A {{MediaCapabilitiesDecodingInfo}} has an associated
<dfn dict-member for='MediaCapabilitiesDecodingInfo'>
codecSwitchingSupported</dfn> which is a boolean.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
codecSwitchingSupported</dfn> which is a boolean.
codecSwitchingSupported</dfn> that is a boolean.

</p>

<p class='note'>
Authors can use {{MediaCapabilitiesDecodingInfo/codecSwitchingSupported}}
to determine whether the user agent supports codec switching via
{{SourceBuffer/changeType()}} within the described
<a>decoding pipeline</a>. Note that switching between
<a>decoding pipelines</a> is a separate quality of implementation issue
as described by {{EME/setMediaKeys()}}.
</p>

<p>
A {{MediaCapabilitiesDecodingInfo}} has associated
<dfn dict-member for=MediaCapabilitiesDecodingInfo>keySystemAccess</dfn>
Expand Down Expand Up @@ -940,6 +980,23 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
efficiency unless the device's power source has side effects
such as enabling different decoding modules.
</li>
<li>
If <code>configuration.type</code> is set to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can type be linked to something?

{{MediaDecodingType/media-source}}:
<ol>
<li>
Let <var>pipeline</var> be the <a>decoding pipeline</a>
described by <var>configuration</var>.
</li>
<li>
If <var>pipeline</var> is able to support using
{{SourceBuffer}} {{SourceBuffer/changeType()}} to switch
between any and all of its supported codecs, set
{{MediaCapabilitiesDecodingInfo/codecSwitchingSupported}}
to <code>true</code>. Otherwise, set it to <code>false</code>.
</li>
</ol>
</li>
<li>
Return <var>info</var>.
</li>
Expand Down
Loading