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 static async isConfigSupported() #120

Merged
merged 3 commits into from
Feb 23, 2021

Conversation

chcunningham
Copy link
Collaborator

@chcunningham chcunningham commented Dec 24, 2020

Earlier drafts wrongly assumed that support could be determined
synchronously.This remedies that by introducing a new async API
to check support prior to calling configure().

Fixes #98. See additional discussion there.


Preview | Diff

Earlier drafts wrongly assumed that support could be determined
synchronously.This remedies that by introducing a new async API
to check support prior to calling configure().

Fixes #98. See additional discussion there.
@chcunningham chcunningham linked an issue Dec 24, 2020 that may be closed by this pull request
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 6, 2021
API and motivations described here:
w3c/webcodecs#98

Spec PR here:
w3c/webcodecs#120

Bug: 1141707
Test: new layout tests
Change-Id: I3e53da5961119b4b36ec76666ad1a67cca19b963
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 8, 2021
API and motivations described here:
w3c/webcodecs#98

Spec PR here:
w3c/webcodecs#120

Bug: 1141707
Test: new layout tests
Change-Id: I3e53da5961119b4b36ec76666ad1a67cca19b963
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 8, 2021
API and motivations described here:
w3c/webcodecs#98

Spec PR here:
w3c/webcodecs#120

Bug: 1141707
Test: new layout tests
Change-Id: I3e53da5961119b4b36ec76666ad1a67cca19b963
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 8, 2021
API and motivations described here:
w3c/webcodecs#98

Spec PR here:
w3c/webcodecs#120

Bug: 1141707
Test: new layout tests
Change-Id: I3e53da5961119b4b36ec76666ad1a67cca19b963
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612684
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841376}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 8, 2021
API and motivations described here:
w3c/webcodecs#98

Spec PR here:
w3c/webcodecs#120

Bug: 1141707
Test: new layout tests
Change-Id: I3e53da5961119b4b36ec76666ad1a67cca19b963
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612684
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841376}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jan 9, 2021
…(), a=testonly

Automatic update from web-platform-tests
Implement VideoDecoder.isConfigSupported()

API and motivations described here:
w3c/webcodecs#98

Spec PR here:
w3c/webcodecs#120

Bug: 1141707
Test: new layout tests
Change-Id: I3e53da5961119b4b36ec76666ad1a67cca19b963
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612684
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841376}

--

wpt-commits: e265ce28838b485f20b11aee723486a035715216
wpt-pr: 27055
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Jan 11, 2021
…(), a=testonly

Automatic update from web-platform-tests
Implement VideoDecoder.isConfigSupported()

API and motivations described here:
w3c/webcodecs#98

Spec PR here:
w3c/webcodecs#120

Bug: 1141707
Test: new layout tests
Change-Id: I3e53da5961119b4b36ec76666ad1a67cca19b963
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612684
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841376}

--

wpt-commits: e265ce28838b485f20b11aee723486a035715216
wpt-pr: 27055
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 11, 2021
API and motivations described here:
w3c/webcodecs#98

Spec PR here:
w3c/webcodecs#120

Bug: 1141707
Test: new layout tests
Change-Id: I3a0f3cbc2bb64a86dcefdc454d6b03e72d3f36bd
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 11, 2021
API and motivations described here:
w3c/webcodecs#98

Spec PR here:
w3c/webcodecs#120

Bug: 1141707
Test: new layout tests
Change-Id: I3a0f3cbc2bb64a86dcefdc454d6b03e72d3f36bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622421
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842153}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 11, 2021
API and motivations described here:
w3c/webcodecs#98

Spec PR here:
w3c/webcodecs#120

Bug: 1141707
Test: new layout tests
Change-Id: I3a0f3cbc2bb64a86dcefdc454d6b03e72d3f36bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622421
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842153}
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Jan 11, 2021
…(), a=testonly

Automatic update from web-platform-tests
Implement VideoDecoder.isConfigSupported()

API and motivations described here:
w3c/webcodecs#98

Spec PR here:
w3c/webcodecs#120

Bug: 1141707
Test: new layout tests
Change-Id: I3e53da5961119b4b36ec76666ad1a67cca19b963
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612684
Commit-Queue: Chrome Cunningham <chcunninghamchromium.org>
Reviewed-by: Thomas Guilbert <tguilbertchromium.org>
Cr-Commit-Position: refs/heads/master{#841376}

--

wpt-commits: e265ce28838b485f20b11aee723486a035715216
wpt-pr: 27055

UltraBlame original commit: 4df452a17a2f953d1ab68743d1fd7c03e3c30a7e
pull bot pushed a commit to Mu-L/chromium that referenced this pull request Jan 12, 2021
API and motivations described here:
w3c/webcodecs#98

Spec PR here:
w3c/webcodecs#120

Bug: 1141707
Test: new layout tests
Change-Id: I3a0f3cbc2bb64a86dcefdc454d6b03e72d3f36bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622421
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842153}
Similar to MediaCapabilities and EME specs, the isConfigSupported()
promise will now include the configuration who's support is described.
This helps feature detect when parts of the input configuration
dictionary are ignored (when the UA implementation lags behind the
specification).
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jan 15, 2021
…(), a=testonly

Automatic update from web-platform-tests
Implement AudioDecoder.isConfigSupported()

API and motivations described here:
w3c/webcodecs#98

Spec PR here:
w3c/webcodecs#120

Bug: 1141707
Test: new layout tests
Change-Id: I3a0f3cbc2bb64a86dcefdc454d6b03e72d3f36bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622421
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842153}

--

wpt-commits: 87bcad098015a7b983d29b13d2e64f33b93fbc85
wpt-pr: 27135
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Jan 16, 2021
…(), a=testonly

Automatic update from web-platform-tests
Implement AudioDecoder.isConfigSupported()

API and motivations described here:
w3c/webcodecs#98

Spec PR here:
w3c/webcodecs#120

Bug: 1141707
Test: new layout tests
Change-Id: I3a0f3cbc2bb64a86dcefdc454d6b03e72d3f36bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622421
Reviewed-by: Thomas Guilbert <tguilbertchromium.org>
Commit-Queue: Chrome Cunningham <chcunninghamchromium.org>
Cr-Commit-Position: refs/heads/master{#842153}

--

wpt-commits: 87bcad098015a7b983d29b13d2e64f33b93fbc85
wpt-pr: 27135

UltraBlame original commit: e37260abb59bac6743b881820b45f60857c6bab7
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jan 19, 2021
…(), a=testonly

Automatic update from web-platform-tests
Implement AudioDecoder.isConfigSupported()

API and motivations described here:
w3c/webcodecs#98

Spec PR here:
w3c/webcodecs#120

Bug: 1141707
Test: new layout tests
Change-Id: I3a0f3cbc2bb64a86dcefdc454d6b03e72d3f36bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622421
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842153}

--

wpt-commits: 87bcad098015a7b983d29b13d2e64f33b93fbc85
wpt-pr: 27135
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Jan 25, 2021
…(), a=testonly

Automatic update from web-platform-tests
Implement AudioDecoder.isConfigSupported()

API and motivations described here:
w3c/webcodecs#98

Spec PR here:
w3c/webcodecs#120

Bug: 1141707
Test: new layout tests
Change-Id: I3a0f3cbc2bb64a86dcefdc454d6b03e72d3f36bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622421
Reviewed-by: Thomas Guilbert <tguilbertchromium.org>
Commit-Queue: Chrome Cunningham <chcunninghamchromium.org>
Cr-Commit-Position: refs/heads/master{#842153}

--

wpt-commits: 87bcad098015a7b983d29b13d2e64f33b93fbc85
wpt-pr: 27135

UltraBlame original commit: 90e13b80191eac0e913da8f1b39931f37c74b11c
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 25, 2021
Corresponding the spec change here:
w3c/webcodecs#120

The new return type contains a copy of the parsed configuration
passed to isConfigSupported(). This copy will contain only the keys
recognized by the UA, and is therefore useful as a means of feature
detection / forward compatibility.

Bug: 1141707
Change-Id: I4c17423fbffbd6ef904d086f635cf426b0cec4f9
R=sandersd
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 27, 2021
Corresponding the spec change here:
w3c/webcodecs#120

The new return type contains a copy of the parsed configuration
passed to isConfigSupported(). This copy will contain only the keys
recognized by the UA, and is therefore useful as a means of feature
detection / forward compatibility.

R=sandersd

Bug: 1141707
Change-Id: I4c17423fbffbd6ef904d086f635cf426b0cec4f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645258
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#847850}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 28, 2021
Corresponding the spec change here:
w3c/webcodecs#120

The new return type contains a copy of the parsed configuration
passed to isConfigSupported(). This copy will contain only the keys
recognized by the UA, and is therefore useful as a means of feature
detection / forward compatibility.

R=sandersd

Bug: 1141707
Change-Id: I4c17423fbffbd6ef904d086f635cf426b0cec4f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645258
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#847850}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Feb 2, 2021
…upported, a=testonly

Automatic update from web-platform-tests
Update return type of *Decoder.isConfigSupported

Corresponding the spec change here:
w3c/webcodecs#120

The new return type contains a copy of the parsed configuration
passed to isConfigSupported(). This copy will contain only the keys
recognized by the UA, and is therefore useful as a means of feature
detection / forward compatibility.

R=sandersd

Bug: 1141707
Change-Id: I4c17423fbffbd6ef904d086f635cf426b0cec4f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645258
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#847850}

--

wpt-commits: 172e406cdc521c5257ba7d16497be9f5610effba
wpt-pr: 27315
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Feb 3, 2021
…upported, a=testonly

Automatic update from web-platform-tests
Update return type of *Decoder.isConfigSupported

Corresponding the spec change here:
w3c/webcodecs#120

The new return type contains a copy of the parsed configuration
passed to isConfigSupported(). This copy will contain only the keys
recognized by the UA, and is therefore useful as a means of feature
detection / forward compatibility.

R=sandersd

Bug: 1141707
Change-Id: I4c17423fbffbd6ef904d086f635cf426b0cec4f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645258
Reviewed-by: Dan Sanders <sandersdchromium.org>
Commit-Queue: Chrome Cunningham <chcunninghamchromium.org>
Cr-Commit-Position: refs/heads/master{#847850}

--

wpt-commits: 172e406cdc521c5257ba7d16497be9f5610effba
wpt-pr: 27315

UltraBlame original commit: f76febf314e9fb86e0854d85eff5833b82e4ed70
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Feb 3, 2021
…upported, a=testonly

Automatic update from web-platform-tests
Update return type of *Decoder.isConfigSupported

Corresponding the spec change here:
w3c/webcodecs#120

The new return type contains a copy of the parsed configuration
passed to isConfigSupported(). This copy will contain only the keys
recognized by the UA, and is therefore useful as a means of feature
detection / forward compatibility.

R=sandersd

Bug: 1141707
Change-Id: I4c17423fbffbd6ef904d086f635cf426b0cec4f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645258
Reviewed-by: Dan Sanders <sandersdchromium.org>
Commit-Queue: Chrome Cunningham <chcunninghamchromium.org>
Cr-Commit-Position: refs/heads/master{#847850}

--

wpt-commits: 172e406cdc521c5257ba7d16497be9f5610effba
wpt-pr: 27315

UltraBlame original commit: f76febf314e9fb86e0854d85eff5833b82e4ed70
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Feb 3, 2021
…upported, a=testonly

Automatic update from web-platform-tests
Update return type of *Decoder.isConfigSupported

Corresponding the spec change here:
w3c/webcodecs#120

The new return type contains a copy of the parsed configuration
passed to isConfigSupported(). This copy will contain only the keys
recognized by the UA, and is therefore useful as a means of feature
detection / forward compatibility.

R=sandersd

Bug: 1141707
Change-Id: I4c17423fbffbd6ef904d086f635cf426b0cec4f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645258
Reviewed-by: Dan Sanders <sandersdchromium.org>
Commit-Queue: Chrome Cunningham <chcunninghamchromium.org>
Cr-Commit-Position: refs/heads/master{#847850}

--

wpt-commits: 172e406cdc521c5257ba7d16497be9f5610effba
wpt-pr: 27315

UltraBlame original commit: f76febf314e9fb86e0854d85eff5833b82e4ed70
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Feb 4, 2021
…upported, a=testonly

Automatic update from web-platform-tests
Update return type of *Decoder.isConfigSupported

Corresponding the spec change here:
w3c/webcodecs#120

The new return type contains a copy of the parsed configuration
passed to isConfigSupported(). This copy will contain only the keys
recognized by the UA, and is therefore useful as a means of feature
detection / forward compatibility.

R=sandersd

Bug: 1141707
Change-Id: I4c17423fbffbd6ef904d086f635cf426b0cec4f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645258
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#847850}

--

wpt-commits: 172e406cdc521c5257ba7d16497be9f5610effba
wpt-pr: 27315
@@ -209,20 +211,27 @@
<a>Enqueues a control message</a> to configure the audio decoder for
decoding chunks as described by |config|.

NOTE: Authors should first check support by calling
{{AudioDecoder/isConfigSupported()}} with |config| to avoid error paths
in the steps below.
Copy link
Collaborator

Choose a reason for hiding this comment

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

As noted in the issue, there is a race here. I see two paths forward:

  • Turn "configure" into a request to get access to a codec, make it truely async with a promise. realtime users can decide to not wait for the promise and continue enqueuing packets when they change parameters dynamically
  • Acknowledge this race and say isConfigSupported is a "best effort" call, that doesn't guarantee that remaining calls will succeed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

@chcunningham chcunningham left a comment

Choose a reason for hiding this comment

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

Thanks Paul

@@ -209,20 +211,27 @@
<a>Enqueues a control message</a> to configure the audio decoder for
decoding chunks as described by |config|.

NOTE: Authors should first check support by calling
{{AudioDecoder/isConfigSupported()}} with |config| to avoid error paths
in the steps below.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@chcunningham
Copy link
Collaborator Author

@padenot I'll go ahead with this merge and address any follow up feedback when you return.

@chcunningham chcunningham merged commit dfc781f into configure_acceleration Feb 23, 2021
@chcunningham chcunningham deleted the is_config_supported branch March 24, 2021 23:07
GrumpyOldTroll pushed a commit to GrumpyOldTroll/chromium that referenced this pull request Apr 13, 2021
Corresponding the spec change here:
w3c/webcodecs#120

The new return type contains a copy of the parsed configuration
passed to isConfigSupported(). This copy will contain only the keys
recognized by the UA, and is therefore useful as a means of feature
detection / forward compatibility.

R=​sandersd

(cherry picked from commit 16b3edb)

Bug: 1141707
Change-Id: I4c17423fbffbd6ef904d086f635cf426b0cec4f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645258
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#847850}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2665211
Auto-Submit: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/branch-heads/4389@{#560}
Cr-Branched-From: 9251c5d-refs/heads/master@{#843830}
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this pull request Oct 14, 2022
API and motivations described here:
w3c/webcodecs#98

Spec PR here:
w3c/webcodecs#120

Bug: 1141707
Test: new layout tests
Change-Id: I3e53da5961119b4b36ec76666ad1a67cca19b963
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612684
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841376}
GitOrigin-RevId: 6e5606f800fbefcc6ed776788846e82ae13e3888
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this pull request Oct 14, 2022
API and motivations described here:
w3c/webcodecs#98

Spec PR here:
w3c/webcodecs#120

Bug: 1141707
Test: new layout tests
Change-Id: I3a0f3cbc2bb64a86dcefdc454d6b03e72d3f36bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622421
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842153}
GitOrigin-RevId: 456bdd17f1d32e10406636109071aec9bf1f1f6e
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this pull request Oct 14, 2022
Corresponding the spec change here:
w3c/webcodecs#120

The new return type contains a copy of the parsed configuration
passed to isConfigSupported(). This copy will contain only the keys
recognized by the UA, and is therefore useful as a means of feature
detection / forward compatibility.

R=sandersd

Bug: 1141707
Change-Id: I4c17423fbffbd6ef904d086f635cf426b0cec4f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645258
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#847850}
GitOrigin-RevId: 16b3edb7ee7f446d1b9dd340d916bc33c7e5c4d4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spec promise<bool> IsConfigSupported()
2 participants